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 ofExtrinsicObject
through theExtrinsicObjectDecorator
class. 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 ExtrinsicObject
decoratedExtrinsic
static String
VERSION_ID_SLOT
Attribute 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 void
addInvalidAssociation(String slotName)
static List<ExtendedExtrinsicObject>
asSearchCoreExtrinsics(List<ExtrinsicObject> extObjList)
Utility method to convert list of ExtrinsicObjects to SearchCoreExtrinsic objectsSet<Classification>
getClassifications()
String
getContentVersion()
String
getDescription()
Set<ExternalIdentifier>
getExternalIdentifiers()
String
getGuid()
String
getHome()
String
getLid()
String
getLidvid()
String
getMimeType()
String
getName()
String
getObjectType()
Slot
getSlot(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 slotObjectStatus
getStatus()
String
getVersionName()
boolean
hasValidAssociationValues()
void
setValidAssociationValues(boolean validAssociationValues)
boolean
slotIsAssociationReference(String slotName)
Check if slot is an association reference by checking if the slot name ends with a "_ref"boolean
slotValueIsLidvid(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:
getGuid
in classIdentifiable
- Returns:
- the guid
-
getLid
public String getLid()
- Overrides:
getLid
in classRegistryObject
- Returns:
- the lid
-
getName
public String getName()
- Overrides:
getName
in classRegistryObject
- Returns:
- the name
-
getSlot
public Slot getSlot(String slotName)
Description copied from class:Identifiable
Convenience method to look up a slot with a given name.- Overrides:
getSlot
in classIdentifiable
- Parameters:
slotName
- to look for within the list of slots- Returns:
- Slot of null if not found
-
getObjectType
public String getObjectType()
- Overrides:
getObjectType
in classRegistryObject
- Returns:
- the objectType
-
getContentVersion
public String getContentVersion()
- Overrides:
getContentVersion
in classExtrinsicObject
-
getDescription
public String getDescription()
- Overrides:
getDescription
in classRegistryObject
- Returns:
- the description
-
getHome
public String getHome()
- Overrides:
getHome
in classIdentifiable
- Returns:
- the home
-
getMimeType
public String getMimeType()
- Overrides:
getMimeType
in classExtrinsicObject
-
getSlots
public Set<Slot> getSlots()
- Overrides:
getSlots
in classIdentifiable
- Returns:
- the slots
-
getVersionName
public String getVersionName()
- Overrides:
getVersionName
in classRegistryObject
- Returns:
- the internally tracked version
-
getExternalIdentifiers
public Set<ExternalIdentifier> getExternalIdentifiers()
- Overrides:
getExternalIdentifiers
in classRegistryObject
-
getClassifications
public Set<Classification> getClassifications()
- Overrides:
getClassifications
in classRegistryObject
-
getStatus
public ObjectStatus getStatus()
- Overrides:
getStatus
in classRegistryObject
- Returns:
- the status
-
-