Interface Entity
- All Superinterfaces:
Identifiable
- All Known Subinterfaces:
Agent,Article<A>,Collection,CorporateBody,DigitalObject,Expression,Family,GeoLocation,HumanSettlement,Item,Manifestation,Person,Project,Topic,Website,Work
- All Known Implementing Classes:
AgentImpl,ArticleImpl,CollectionImpl,CorporateBodyImpl,DigitalObjectImpl,EntityImpl,ExpressionImpl,FamilyImpl,GeoLocationImpl,HumanSettlementImpl,ItemImpl,ManifestationImpl,PersonImpl,ProjectImpl,TopicImpl,WebsiteImpl,WorkImpl
public interface Entity extends Identifiable
Entities are uniquely identifiable objects, often also uniquely identifiable outside of this
technical system - by additionally having unique identifiers of other systems (like GND-Id,
VIAF-ID, etc.). An entity is of a specific entity type, like e.g. cultural object, item,
manifestation, work, digital object, person, corporation.
Bibliographic entity types for example are defined in the “Functional Requirements for Bibliographic Records” (FRBR; deutsch ‚Funktionale Anforderungen an bibliographische Datensätze‘): see Wikipedia “Functional Requirements for Bibliographic Records”, URLs:
https://de.wikipedia.org/wiki/Functional_Requirements_for_Bibliographic_Records https://en.wikipedia.org/wiki/Functional_Requirements_for_Bibliographic_Records
-
Method Summary
Modifier and Type Method Description default java.lang.ObjectgetCustomAttribute(java.lang.String attributeName)CustomAttributesgetCustomAttributes()EntityTypegetEntityType()longgetRefId()Get the system wide unique reference id.default booleanhasCustomAttribute(java.lang.String attributeName)voidsetCustomAttribute(java.lang.String attributeName, java.lang.Object attributeValue)Sets custom Attribute of given name to given value (overwriting existing value).voidsetCustomAttributes(CustomAttributes customAttributes)Set custom attributes (name, value).voidsetEntityType(EntityType entityType)voidsetRefId(long refId)Methods inherited from interface de.digitalcollections.model.api.identifiable.Identifiable
addIdentifier, getCreated, getDescription, getIdentifierByNamespace, getIdentifiers, getLabel, getLastModified, getPreviewImage, getPreviewImageRenderingHints, getType, getUuid, setCreated, setDescription, setIdentifiers, setLabel, setLastModified, setPreviewImage, setPreviewImageRenderingHints, setType, setUuid
-
Method Details
-
getEntityType
EntityType getEntityType()- Returns:
- the type of the entity (one of the types this system can manage, defined in enum EntityType).
-
setEntityType
- Parameters:
entityType- the type of the entity
-
getRefId
long getRefId()Get the system wide unique reference id. Makes it possible to create very short permanent URIs by using a number.- Returns:
- system wide unique entity reference id
-
setRefId
void setRefId(long refId)- Parameters:
refId- system wide unique entity reference id.
-
getCustomAttributes
CustomAttributes getCustomAttributes()- Returns:
- custom attributes
-
getCustomAttribute
default java.lang.Object getCustomAttribute(java.lang.String attributeName)- Parameters:
attributeName- attribute name of custom attribute- Returns:
- value of custom attribute or null
-
hasCustomAttribute
default boolean hasCustomAttribute(java.lang.String attributeName)- Parameters:
attributeName- attribute name for lookup- Returns:
- true if map contains custom attribute of given name
-
setCustomAttribute
void setCustomAttribute(java.lang.String attributeName, java.lang.Object attributeValue)Sets custom Attribute of given name to given value (overwriting existing value).- Parameters:
attributeName- name of custom attributeattributeValue- value of custom attibute
-
setCustomAttributes
Set custom attributes (name, value).- Parameters:
customAttributes- custom attributes to be set
-