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
public class EntitySchemaImpl extends TypeImpl implements EntitySchema
The default implementation of theEntitySchemainterface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected MetadatametadataThe metadata of the entity type.-
Fields inherited from class org.gcube.informationsystem.types.impl.TypeImpl
abstractType, additionalProperties, changelog, DEFAULT_CHANGELOG_MAP, description, extendedTypes, finalClass, locked, name, properties, uuid, version
-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USER
-
Fields inherited from interface org.gcube.informationsystem.types.reference.entities.EntitySchema
NAME
-
Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTY
-
Fields 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, NAME_REGEX, PROPERTIES_PROPERTY, VERSION_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEntitySchemaImpl()Default constructor.EntitySchemaImpl(Class<? extends EntityElement> clz)Constructs a newEntitySchemaImplfrom a class.EntitySchemaImpl(String name)Constructs a newEntitySchemaImplwith the given type name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessTypegetAccessType()Returns theAccessTypeof this type definition.static EntitySchemagetEntitySchemaInstance(Class<? extends EntityElement> clz)Returns an instance ofEntitySchemafor the given class.MetadatagetMetadata()Returns the metadata associated with the element.voidsetMetadata(Metadata metadata)Sets the metadata for the element.StringtoString()-
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, setVersion
-
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, setID
-
Methods inherited from interface org.gcube.informationsystem.types.reference.entities.EntitySchema
getDescription, getExtendedTypes, getName, isAbstract
-
Methods inherited from interface org.gcube.informationsystem.types.reference.Type
getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getID, getProperties, getVersion, getVersionAsString, isFinal, isLocked, setAdditionalProperty, setExtendedTypes, setID, setLocked
-
-
-
-
Field Detail
-
metadata
protected Metadata metadata
The metadata of the entity type.
-
-
Constructor Detail
-
EntitySchemaImpl
protected EntitySchemaImpl()
Default constructor.
-
EntitySchemaImpl
public EntitySchemaImpl(String name)
Constructs a newEntitySchemaImplwith the given type name.- Parameters:
name- The type name.
-
EntitySchemaImpl
public EntitySchemaImpl(Class<? extends EntityElement> clz)
Constructs a newEntitySchemaImplfrom a class.- Parameters:
clz- The class.
-
-
Method Detail
-
getEntitySchemaInstance
public static EntitySchema getEntitySchemaInstance(Class<? extends EntityElement> clz)
Returns an instance ofEntitySchemafor the given class.- Parameters:
clz- The class.- Returns:
- The entity type definition.
-
getMetadata
public Metadata 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
public void setMetadata(Metadata metadata)
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.
-
getAccessType
public AccessType getAccessType()
Returns theAccessTypeof this type definition.- Specified by:
getAccessTypein interfaceType- Overrides:
getAccessTypein classTypeImpl- Returns:
- The access type.
-
-