Class EntitySchemaImpl
java.lang.Object
org.gcube.informationsystem.types.impl.TypeImpl
org.gcube.informationsystem.types.impl.entities.EntitySchemaImpl
- All Implemented Interfaces:
Serializable,Element,EntityElement,IdentifiableElement,EntitySchema,Type
- Direct Known Subclasses:
FacetSchemaImpl,ResourceSchemaImpl
The default implementation of the
EntitySchema interface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
-
Field Summary
FieldsFields inherited from class org.gcube.informationsystem.types.impl.TypeImpl
abstractType, additionalProperties, changelog, DEFAULT_CHANGELOG_MAP, description, extendedTypes, finalClass, locked, name, properties, uuid, versionFields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USERFields inherited from interface org.gcube.informationsystem.types.reference.entities.EntitySchema
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, LOCKED_PROPERTY, NAME, NAME_PROPERTY, PROPERTIES_PROPERTY, VERSION_PROPERTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor.EntitySchemaImpl(Class<? extends EntityElement> clz) Constructs a newEntitySchemaImplfrom a class.EntitySchemaImpl(String name) Constructs a newEntitySchemaImplwith the given type name. -
Method Summary
Modifier and TypeMethodDescriptionReturns theAccessTypeof this type definition.static EntitySchemagetEntitySchemaInstance(Class<? extends EntityElement> clz) Returns an instance ofEntitySchemafor 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
getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getDescription, getExtendedTypes, getGenericClass, getID, getInstance, getName, getProperties, getTypeName, getVersion, getVersionAsString, isAbstract, isFinal, isLocked, retrieveListOfProperties, retrieveSuperClasses, setAdditionalProperty, setChangelog, setExtendedTypes, setID, setLocked, 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.EntitySchema
getDescription, getExtendedTypes, getName, isAbstractMethods inherited from interface org.gcube.informationsystem.types.reference.Type
getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getID, getProperties, getVersion, getVersionAsString, isFinal, isLocked, setAdditionalProperty, setExtendedTypes, setID, setLocked
-
Field Details
-
metadata
The metadata of the entity type.
-
-
Constructor Details
-
EntitySchemaImpl
protected EntitySchemaImpl()Default constructor. -
EntitySchemaImpl
Constructs a newEntitySchemaImplwith the given type name.- Parameters:
name- The type name.
-
EntitySchemaImpl
Constructs a newEntitySchemaImplfrom a class.- Parameters:
clz- The class.
-
-
Method Details
-
getEntitySchemaInstance
Returns an instance ofEntitySchemafor 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.
-