Interface Type
- All Superinterfaces:
Element,IdentifiableElement,Serializable
- All Known Subinterfaces:
ConsistsOfType,EntityType,FacetType,IsRelatedToType,PropertyType,RelationType<S,,T> ResourceType
- All Known Implementing Classes:
ConsistsOfTypeImpl,EntityTypeImpl,FacetTypeImpl,IsRelatedToTypeImpl,PropertyTypeImpl,RelationTypeImpl,ResourceTypeImpl,TypeImpl
@TypeMetadata(name="Type",
description="This is the base type to define any Type",
version="1.0.0")
@Change(version="1.0.0",
description="First Version")
public interface Type
extends IdentifiableElement
The base interface for all type definitions in the Information System model.
A type definition describes the structure of an element, including its name, version, properties, and inheritance relationships.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe property name for the 'abstract' flag.static final StringThe property name for the type's changelog.static final StringThe property name for the type's description.static final StringThe property name for the set of extended types.static final StringThe property name for the 'final' flag.static final StringThe name of the base Type.static final StringThe property name for the type's name.static final StringThe property name for the set of property definitions.static final StringThe property name for the type's version.Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, TYPE_PROPERTYFields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionReturns theAccessTypeof this type definition.Returns the changelog for this type.Returns the changelog with versions represented as strings.Returns the description of the type.Returns the set of types that this type extends.getID()Returns the unique identifier (UUID) of the element.Returns the metadata associated with the element.getName()Returns the name of the type.Returns the set of properties defined by this type.Returns the version of the type.Returns the version of the type as a string.booleanChecks if the type is abstract.booleanisFinal()Checks if the type is final.voidSets the unique identifier (UUID) for the element.voidsetMetadata(Metadata metadata) Sets the metadata for the element.Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Field Details
-
NAME
The name of the base Type.- See Also:
-
NAME_PROPERTY
The property name for the type's name.- See Also:
-
DESCRIPTION_PROPERTY
The property name for the type's description.- See Also:
-
VERSION_PROPERTY
The property name for the type's version.- See Also:
-
CHANGELOG_PROPERTY
The property name for the type's changelog.- See Also:
-
ABSTRACT_PROPERTY
The property name for the 'abstract' flag.- See Also:
-
FINAL_PROPERTY
The property name for the 'final' flag.- See Also:
-
EXTENDED_TYPES_PROPERTY
The property name for the set of extended types.- See Also:
-
PROPERTIES_PROPERTY
The property name for the set of property definitions.- See Also:
-
-
Method Details
-
getID
UUID getID()Returns the unique identifier (UUID) of the element.- Specified by:
getIDin interfaceIdentifiableElement- Returns:
- The
UUIDof the element.
-
setID
Sets the unique identifier (UUID) for the element.- Specified by:
setIDin interfaceIdentifiableElement- Parameters:
uuid- TheUUIDto set.
-
getMetadata
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 interfaceIdentifiableElement- Returns:
- The
Metadataof the element, ornullif none is set.
-
setMetadata
Sets the metadata for the element.- Specified by:
setMetadatain interfaceIdentifiableElement- Parameters:
metadata- TheMetadatato associate with the element.
-
getName
String getName()Returns the name of the type.- Returns:
- The type name.
-
getDescription
String getDescription()Returns the description of the type.- Returns:
- The type description.
-
getVersion
Version getVersion()Returns the version of the type.- Returns:
- The type version.
-
getVersionAsString
String getVersionAsString()Returns the version of the type as a string.- Returns:
- The version string.
-
getChangelog
Returns the changelog for this type.- Returns:
- A map of versions to change descriptions.
-
getChangelogWithVersionAsString
Returns the changelog with versions represented as strings.- Returns:
- A map of version strings to change descriptions.
-
isAbstract
boolean isAbstract()Checks if the type is abstract.- Returns:
trueif the type is abstract,falseotherwise.
-
isFinal
boolean isFinal()Checks if the type is final.- Returns:
trueif the type is final,falseotherwise.
-
getExtendedTypes
Returns the set of types that this type extends.- Returns:
- A set of parent type names.
-
getProperties
Set<PropertyDefinition> getProperties()Returns the set of properties defined by this type.- Returns:
- A set of
PropertyDefinitions.
-
getAccessType
AccessType getAccessType()Returns theAccessTypeof this type definition.- Returns:
- The access type.
-