Class EntityImpl
- java.lang.Object
-
- org.gcube.informationsystem.base.impl.ElementImpl
-
- org.gcube.informationsystem.base.impl.entities.EntityElementImpl
-
- org.gcube.informationsystem.model.impl.entities.EntityImpl
-
- All Implemented Interfaces:
Serializable,Element,EntityElement,IdentifiableElement,Entity,ERElement,ModelElement
- Direct Known Subclasses:
FacetImpl,ResourceImpl
public abstract class EntityImpl extends EntityElementImpl implements Entity
The default abstract implementation of theEntityinterface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<UUID,String>contextsThe contexts in which the entity exists.protected StringexpectedtypeThe expected type.protected List<String>supertypesThe list of supertypes.-
Fields inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl
metadata, uuid
-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
NAME
-
Fields inherited from interface org.gcube.informationsystem.model.reference.ERElement
CONTEXTS_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEntityImpl()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<UUID,String>getContexts()Returns a map of contexts where this element is present.StringgetExpectedtype()Returns the name of the expected type.List<String>getSupertypes()Returns the list of supertypes for this element.protected voidsetContexts(Map<UUID,String> contexts)Sets the contexts in which the entity exists.-
Methods inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl
getID, getMetadata, setID, setMetadata
-
Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl
getTypeName, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Methods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
getID, getMetadata, setID, setMetadata
-
-
-
-
Method Detail
-
getSupertypes
public List<String> getSupertypes()
Returns the list of supertypes for this element.This list is included in JSON serialization only if it is not empty.
- Specified by:
getSupertypesin interfaceModelElement- Returns:
- A
Listof supertype names.
-
getExpectedtype
public String getExpectedtype()
Returns the name of the expected type.This is used during deserialization to indicate the original type when a fallback to a supertype was necessary. It is included in JSON serialization only if it is not empty.
- Specified by:
getExpectedtypein interfaceModelElement- Returns:
- The expected type name.
-
getContexts
public Map<UUID,String> getContexts()
Returns a map of contexts where this element is present.The map keys are the context UUIDs, and the values are the context names. This property is included in JSON serialization only if it is not null.
- Specified by:
getContextsin interfaceERElement- Returns:
- A
Mapof context UUIDs to context names, ornull.
-
-