Class EntityTypeImpl
java.lang.Object
org.gcube.informationsystem.types.impl.TypeImpl
org.gcube.informationsystem.types.impl.entities.EntityTypeImpl
- All Implemented Interfaces:
Serializable,Element,EntityElement,IdentifiableElement,EntityType,Type
- Direct Known Subclasses:
FacetTypeImpl,ResourceTypeImpl
The default implementation of the
EntityType interface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
-
Field Summary
FieldsFields inherited from class org.gcube.informationsystem.types.impl.TypeImpl
abstractType, changelog, DEFAULT_CHANGELOG_MAP, description, extendedTypes, finalClass, name, properties, uuid, versionFields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, TYPE_PROPERTYFields inherited from interface org.gcube.informationsystem.types.reference.entities.EntityType
NAMEFields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTYFields inherited from interface org.gcube.informationsystem.types.reference.Type
ABSTRACT_PROPERTY, CHANGELOG_PROPERTY, DESCRIPTION_PROPERTY, EXTENDED_TYPES_PROPERTY, FINAL_PROPERTY, NAME, NAME_PROPERTY, PROPERTIES_PROPERTY, VERSION_PROPERTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor.EntityTypeImpl(Class<? extends EntityElement> clz) Constructs a newEntityTypeImplfrom a class. -
Method Summary
Modifier and TypeMethodDescriptionReturns theAccessTypeof this type definition.static EntityTypegetEntityTypeDefinitionInstance(Class<? extends EntityElement> clz) Returns an instance ofEntityTypefor the given class.Returns the metadata associated with the element.voidsetMetadata(Metadata metadata) Sets the metadata for the element.toString()Methods inherited from class org.gcube.informationsystem.types.impl.TypeImpl
getChangelog, getChangelogWithVersionAsString, getDescription, getExtendedTypes, getGenericClass, getID, getInstance, getName, getProperties, getTypeName, getVersion, getVersionAsString, isAbstract, isFinal, retrieveListOfProperties, retrieveSuperClasses, setChangelog, setID, setVersionMethods 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, setIDMethods inherited from interface org.gcube.informationsystem.types.reference.entities.EntityType
getDescription, getExtendedTypes, getName, isAbstractMethods inherited from interface org.gcube.informationsystem.types.reference.Type
getChangelog, getChangelogWithVersionAsString, getID, getProperties, getVersion, getVersionAsString, isFinal, setID
-
Field Details
-
metadata
The metadata of the entity type.
-
-
Constructor Details
-
EntityTypeImpl
protected EntityTypeImpl()Default constructor. -
EntityTypeImpl
Constructs a newEntityTypeImplfrom a class.- Parameters:
clz- The class.
-
-
Method Details
-
getEntityTypeDefinitionInstance
Returns an instance ofEntityTypefor the given class.- Parameters:
clz- The class.- Returns:
- The entity type definition.
-
getMetadata
Returns the metadata associated with the element.The metadata is included in JSON serialization only if it is not null.
- Specified by:
getMetadatain interfaceEntityElement- Specified by:
getMetadatain interfaceIdentifiableElement- Specified by:
getMetadatain interfaceType- Overrides:
getMetadatain classTypeImpl- Returns:
- The
Metadataof the element, ornullif none is set.
-
setMetadata
Sets the metadata for the element.- Specified by:
setMetadatain interfaceEntityElement- Specified by:
setMetadatain interfaceIdentifiableElement- Specified by:
setMetadatain interfaceType- Overrides:
setMetadatain classTypeImpl- Parameters:
metadata- TheMetadatato associate with the element.
-
toString
-
getAccessType
Returns theAccessTypeof this type definition.- Specified by:
getAccessTypein interfaceType- Overrides:
getAccessTypein classTypeImpl- Returns:
- The access type.
-