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
The default abstract implementation of the
Entity interface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe contexts in which the entity exists.protected StringThe expected type.The list of supertypes.Fields inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl
metadata, uuidFields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTYFields inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
NAMEFields inherited from interface org.gcube.informationsystem.model.reference.ERElement
CONTEXTS_PROPERTYFields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTYFields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a map of contexts where this element is present.Returns the name of the expected type.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, setMetadataMethods inherited from class org.gcube.informationsystem.base.impl.ElementImpl
getTypeName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeNameMethods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
getID, getMetadata, setID, setMetadata
-
Field Details
-
supertypes
The list of supertypes. -
expectedtype
The expected type. -
contexts
The contexts in which the entity exists.
-
-
Constructor Details
-
EntityImpl
protected EntityImpl()Default constructor.
-
-
Method Details
-
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
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
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.
-
setContexts
Sets the contexts in which the entity exists.- Parameters:
contexts- The contexts.
-