Class Identifiable
- java.lang.Object
-
- de.digitalcollections.model.UniqueObject
-
- de.digitalcollections.model.identifiable.Identifiable
-
- Direct Known Subclasses:
Entity
,FamilyName
,FileResource
,GivenName
,Node
,Webpage
public class Identifiable extends UniqueObject
An Identifiable is an uniquely identifiableEntity
orFileResource
, having one or more uniqueIdentifier
(s).
- FileResources have one (or more) technical (system wide) Identifiers (e.g. an UUID)
- Entities additionally have one (or more) “domain-specific” (system independent) Identifiers (e.g. GND-ID, VIAF-ID)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
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 LocalizedStructuredContent
description
protected IdentifiableObjectType
identifiableObjectType
protected Set<Identifier>
identifiers
protected LocalizedText
label
protected LocalizedUrlAliases
localizedUrlAliases
protected ImageFileResource
previewImage
protected RenderingHintsPreviewImage
previewImageRenderingHints
protected IdentifiableType
type
-
Fields inherited from class de.digitalcollections.model.UniqueObject
created, lastModified, uuid
-
-
Constructor Summary
Constructors Constructor Description Identifiable()
-
Method Summary
-
Methods inherited from class de.digitalcollections.model.UniqueObject
getCreated, getLastModified, getUuid, setCreated, setLastModified, setUuid
-
-
-
-
Field Detail
-
description
protected LocalizedStructuredContent description
-
identifiableObjectType
protected IdentifiableObjectType identifiableObjectType
-
identifiers
protected Set<Identifier> identifiers
-
label
protected LocalizedText label
-
localizedUrlAliases
protected LocalizedUrlAliases localizedUrlAliases
-
previewImage
protected ImageFileResource previewImage
-
previewImageRenderingHints
protected RenderingHintsPreviewImage previewImageRenderingHints
-
type
protected IdentifiableType type
-
-
Method Detail
-
addIdentifier
public void addIdentifier(Identifier identifier)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classUniqueObject
-
getDescription
public LocalizedStructuredContent getDescription()
-
getIdentifiableObjectType
public IdentifiableObjectType getIdentifiableObjectType()
-
getIdentifierByNamespace
public Identifier getIdentifierByNamespace(String namespace)
-
getIdentifiers
public Set<Identifier> getIdentifiers()
-
getLabel
public LocalizedText getLabel()
-
getLocalizedUrlAliases
public LocalizedUrlAliases getLocalizedUrlAliases()
-
getPreviewImage
public ImageFileResource getPreviewImage()
-
getPreviewImageRenderingHints
public RenderingHintsPreviewImage getPreviewImageRenderingHints()
-
getPrimaryUrlAlias
public UrlAlias getPrimaryUrlAlias(Locale locale, Website website)
Returns the primary (= currently active) url alias of this Identifiable for a specified language and website. If no related url alias is found the website independent url alias of the given locale is returned (that has been generated during saving from the Identifiable's label).- Parameters:
locale
- target locale for retrieving primary url aliaswebsite
- target website for retrieving primary url alias- Returns:
- primary url alias for website and locale or default
-
getType
public IdentifiableType getType()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classUniqueObject
-
init
protected void init()
Description copied from class:UniqueObject
Use to initialize member variables, used by default constructor and builder- Overrides:
init
in classUniqueObject
-
setDescription
public void setDescription(LocalizedStructuredContent description)
-
setIdentifiableObjectType
public void setIdentifiableObjectType(IdentifiableObjectType identifiableObjectType)
-
setIdentifiers
public void setIdentifiers(Set<Identifier> identifiers)
-
setLabel
public void setLabel(String label)
-
setLabel
public void setLabel(LocalizedText label)
-
setLocalizedUrlAliases
public void setLocalizedUrlAliases(LocalizedUrlAliases localizedUrlAliases)
-
setPreviewImage
public void setPreviewImage(ImageFileResource previewImage)
-
setPreviewImageRenderingHints
public void setPreviewImageRenderingHints(RenderingHintsPreviewImage previewImageRenderingHints)
-
setType
public void setType(IdentifiableType identifiableType)
-
-