Class Entity
- java.lang.Object
-
- de.digitalcollections.model.identifiable.Identifiable
-
- de.digitalcollections.model.identifiable.entity.Entity
-
- Direct Known Subclasses:
Agent,Article,Collection,DigitalObject,Expression,GeoLocation,Item,Manifestation,Project,Topic,Website,Work
public class 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
-
-
Field Summary
Fields Modifier and Type Field Description protected CustomAttributescustomAttributesprotected EntityTypeentityTypeprotected longrefId-
Fields inherited from class de.digitalcollections.model.identifiable.Identifiable
created, description, identifiers, label, lastModified, previewImage, previewImageRenderingHints, type
-
-
Constructor Summary
Constructors Constructor Description Entity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ObjectgetCustomAttribute(String attributeName)CustomAttributesgetCustomAttributes()EntityTypegetEntityType()longgetRefId()Get the system wide unique reference id.inthashCode()voidsetCustomAttribute(String attributeName, 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 class de.digitalcollections.model.identifiable.Identifiable
addIdentifier, getCreated, getDescription, getIdentifierByNamespace, getIdentifiers, getLabel, getLastModified, getPreviewImage, getPreviewImageRenderingHints, getType, getUuid, setCreated, setDescription, setIdentifiers, setLabel, setLabel, setLastModified, setPreviewImage, setPreviewImageRenderingHints, setType, setUuid
-
-
-
-
Field Detail
-
customAttributes
protected CustomAttributes customAttributes
-
entityType
protected EntityType entityType
-
refId
protected long refId
-
-
Method Detail
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classIdentifiable
-
getCustomAttribute
public Object getCustomAttribute(String attributeName)
- Parameters:
attributeName- attribute name of custom attribute- Returns:
- value of custom attribute or null
-
getCustomAttributes
public CustomAttributes getCustomAttributes()
- Returns:
- custom attributes
-
getEntityType
public EntityType getEntityType()
- Returns:
- the type of the entity (one of the types this system can manage, defined in enum EntityType).
-
getRefId
public 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
-
hashCode
public int hashCode()
- Overrides:
hashCodein classIdentifiable
-
setCustomAttribute
public void setCustomAttribute(String attributeName, 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
public void setCustomAttributes(CustomAttributes customAttributes)
Set custom attributes (name, value).- Parameters:
customAttributes- custom attributes to be set
-
setEntityType
public void setEntityType(EntityType entityType)
- Parameters:
entityType- the type of the entity
-
setRefId
public void setRefId(long refId)
- Parameters:
refId- system wide unique entity reference id.
-
-