Class Entity
- java.lang.Object
-
- de.digitalcollections.model.UniqueObject
-
- 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Entity.EntityBuilder<C extends Entity,B extends Entity.EntityBuilder<C,B>>
-
Nested classes/interfaces inherited from class de.digitalcollections.model.identifiable.Identifiable
Identifiable.IdentifiableBuilder<C extends Identifiable,B extends Identifiable.IdentifiableBuilder<C,B>>
-
Nested classes/interfaces inherited from class de.digitalcollections.model.UniqueObject
UniqueObject.UniqueObjectBuilder<C extends UniqueObject,B extends UniqueObject.UniqueObjectBuilder<C,B>>
-
-
Field Summary
Fields Modifier and Type Field Description protected CustomAttributes
customAttributes
protected LocalDate
navDate
A "navigable" date, required when you need to the display the digital object on a timeline.protected long
refId
-
Fields inherited from class de.digitalcollections.model.identifiable.Identifiable
description, identifiableObjectType, identifiers, label, localizedUrlAliases, previewImage, previewImageRenderingHints, type
-
Fields inherited from class de.digitalcollections.model.UniqueObject
created, lastModified, uuid
-
-
Constructor Summary
Constructors Constructor Description Entity()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
Object
getCustomAttribute(String attributeName)
CustomAttributes
getCustomAttributes()
EntityType
getEntityType()
Deprecated, for removal: This API element is subject to removal in a future version.UseIdentifiable.getType()
andIdentifiable.getIdentifiableObjectType()
instead.LocalDate
getNavDate()
long
getRefId()
Get the system wide unique reference id.int
hashCode()
protected void
init()
Use to initialize member variables, used by default constructor and buildervoid
setCustomAttribute(String attributeName, Object attributeValue)
Sets custom Attribute of given name to given value (overwriting existing value).void
setCustomAttributes(CustomAttributes customAttributes)
Set custom attributes (name, value).void
setNavDate(LocalDate navDate)
Sets the "navigation" datevoid
setRefId(long refId)
-
Methods inherited from class de.digitalcollections.model.identifiable.Identifiable
addIdentifier, getDescription, getIdentifiableObjectType, getIdentifierByNamespace, getIdentifiers, getLabel, getLocalizedUrlAliases, getPreviewImage, getPreviewImageRenderingHints, getPrimaryUrlAlias, getType, setDescription, setIdentifiableObjectType, setIdentifiers, setLabel, setLabel, setLocalizedUrlAliases, setPreviewImage, setPreviewImageRenderingHints, setType
-
Methods inherited from class de.digitalcollections.model.UniqueObject
getCreated, getLastModified, getUuid, setCreated, setLastModified, setUuid
-
-
-
-
Field Detail
-
customAttributes
protected CustomAttributes customAttributes
-
navDate
protected LocalDate navDate
A "navigable" date, required when you need to the display the digital object on a timeline.
-
refId
protected long refId
-
-
Method Detail
-
equals
public boolean equals(Object o)
- Overrides:
equals
in 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
@Deprecated(forRemoval=true, since="10.0.0") public EntityType getEntityType()
Deprecated, for removal: This API element is subject to removal in a future version.UseIdentifiable.getType()
andIdentifiable.getIdentifiableObjectType()
instead.- Returns:
- the type of the entity (one of the types this system can manage, defined in enum EntityType).
-
getNavDate
public LocalDate getNavDate()
- Returns:
- a date for "navigation" purposes, e.g. a timeline
-
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:
hashCode
in classIdentifiable
-
init
protected void init()
Description copied from class:UniqueObject
Use to initialize member variables, used by default constructor and builder- Overrides:
init
in 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
-
setNavDate
public void setNavDate(LocalDate navDate)
Sets the "navigation" date- Parameters:
navDate
- the "navigation" date
-
setRefId
public void setRefId(long refId)
- Parameters:
refId
- system wide unique entity reference id.
-
-