Class ExtendedExtrinsicObject
- java.lang.Object
-
- gov.nasa.pds.registry.model.Identifiable
-
- gov.nasa.pds.registry.model.RegistryObject
-
- gov.nasa.pds.registry.model.ExtrinsicObject
-
- gov.nasa.pds.registry.model.wrapper.ExtendedExtrinsicObject
-
- All Implemented Interfaces:
Serializable
public class ExtendedExtrinsicObject extends ExtrinsicObject
Class leverages the Decorator Pattern by inheriting the functions ofExtrinsicObjectthrough theExtrinsicObjectDecoratorclass. Currently no methods are overridden, however, this provides that flexibility that should be a part of extending a class.- Author:
- jpadams
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ExtrinsicObjectdecoratedExtrinsicstatic StringVERSION_ID_SLOTAttribute for version of a product.
-
Constructor Summary
Constructors Constructor Description ExtendedExtrinsicObject(ExtrinsicObject extObject)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInvalidAssociation(String slotName)static List<ExtendedExtrinsicObject>asSearchCoreExtrinsics(List<ExtrinsicObject> extObjList)Utility method to convert list of ExtrinsicObjects to SearchCoreExtrinsic objectsSet<Classification>getClassifications()StringgetContentVersion()StringgetDescription()Set<ExternalIdentifier>getExternalIdentifiers()StringgetGuid()StringgetHome()StringgetLid()StringgetLidvid()StringgetMimeType()StringgetName()StringgetObjectType()SlotgetSlot(String slotName)Convenience method to look up a slot with a given name.Set<Slot>getSlots()List<String>getSlotValues(String slotName)Returns a list of Strings that pertain to a particular slotObjectStatusgetStatus()StringgetVersionName()booleanhasValidAssociationValues()voidsetValidAssociationValues(boolean validAssociationValues)booleanslotIsAssociationReference(String slotName)Check if slot is an association reference by checking if the slot name ends with a "_ref"booleanslotValueIsLidvid(String slotValue)Check is slot is a lidvid.-
Methods inherited from class gov.nasa.pds.registry.model.ExtrinsicObject
equals, hashCode, setContentVersion, setMimeType
-
Methods inherited from class gov.nasa.pds.registry.model.RegistryObject
setClassifications, setDescription, setExternalIdentifiers, setLid, setName, setObjectType, setStatus, setVersionName
-
Methods inherited from class gov.nasa.pds.registry.model.Identifiable
addSlot, setGuid, setHome, setSlots
-
-
-
-
Field Detail
-
VERSION_ID_SLOT
public static final String VERSION_ID_SLOT
Attribute for version of a product.- See Also:
- Constant Field Values
-
decoratedExtrinsic
protected ExtrinsicObject decoratedExtrinsic
-
-
Constructor Detail
-
ExtendedExtrinsicObject
public ExtendedExtrinsicObject(ExtrinsicObject extObject)
-
-
Method Detail
-
getSlotValues
public List<String> getSlotValues(String slotName)
Returns a list of Strings that pertain to a particular slot- Parameters:
slotName-- Returns:
- Throws:
SearchCoreFatalException
-
getLidvid
public String getLidvid()
-
slotIsAssociationReference
public boolean slotIsAssociationReference(String slotName)
Check if slot is an association reference by checking if the slot name ends with a "_ref"- Parameters:
slotName-- Returns:
-
slotValueIsLidvid
public boolean slotValueIsLidvid(String slotValue)
Check is slot is a lidvid. By PDS4 model definition, lidvids are the only slot values that will contain ::- Parameters:
slotValue-- Returns:
-
hasValidAssociationValues
public boolean hasValidAssociationValues()
-
setValidAssociationValues
public void setValidAssociationValues(boolean validAssociationValues)
-
addInvalidAssociation
public void addInvalidAssociation(String slotName)
-
asSearchCoreExtrinsics
public static List<ExtendedExtrinsicObject> asSearchCoreExtrinsics(List<ExtrinsicObject> extObjList)
Utility method to convert list of ExtrinsicObjects to SearchCoreExtrinsic objects- Parameters:
extObjList-- Returns:
-
getGuid
public String getGuid()
- Overrides:
getGuidin classIdentifiable- Returns:
- the guid
-
getLid
public String getLid()
- Overrides:
getLidin classRegistryObject- Returns:
- the lid
-
getName
public String getName()
- Overrides:
getNamein classRegistryObject- Returns:
- the name
-
getSlot
public Slot getSlot(String slotName)
Description copied from class:IdentifiableConvenience method to look up a slot with a given name.- Overrides:
getSlotin classIdentifiable- Parameters:
slotName- to look for within the list of slots- Returns:
- Slot of null if not found
-
getObjectType
public String getObjectType()
- Overrides:
getObjectTypein classRegistryObject- Returns:
- the objectType
-
getContentVersion
public String getContentVersion()
- Overrides:
getContentVersionin classExtrinsicObject
-
getDescription
public String getDescription()
- Overrides:
getDescriptionin classRegistryObject- Returns:
- the description
-
getHome
public String getHome()
- Overrides:
getHomein classIdentifiable- Returns:
- the home
-
getMimeType
public String getMimeType()
- Overrides:
getMimeTypein classExtrinsicObject
-
getSlots
public Set<Slot> getSlots()
- Overrides:
getSlotsin classIdentifiable- Returns:
- the slots
-
getVersionName
public String getVersionName()
- Overrides:
getVersionNamein classRegistryObject- Returns:
- the internally tracked version
-
getExternalIdentifiers
public Set<ExternalIdentifier> getExternalIdentifiers()
- Overrides:
getExternalIdentifiersin classRegistryObject
-
getClassifications
public Set<Classification> getClassifications()
- Overrides:
getClassificationsin classRegistryObject
-
getStatus
public ObjectStatus getStatus()
- Overrides:
getStatusin classRegistryObject- Returns:
- the status
-
-