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
Fields Modifier and Type Field Description static StringABSTRACT_PROPERTYThe property name for the 'abstract' flag.static StringCHANGELOG_PROPERTYThe property name for the type's changelog.static StringDESCRIPTION_PROPERTYThe property name for the type's description.static StringEXTENDED_TYPES_PROPERTYThe property name for the set of extended types.static StringFINAL_PROPERTYThe property name for the 'final' flag.static StringNAMEThe name of the base Type.static StringNAME_PROPERTYThe property name for the type's name.static StringPROPERTIES_PROPERTYThe property name for the set of property definitions.static StringVERSION_PROPERTYThe property name for the type's version.-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, TYPE_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccessTypegetAccessType()Returns theAccessTypeof this type definition.Map<Version,String>getChangelog()Returns the changelog for this type.Map<String,String>getChangelogWithVersionAsString()Returns the changelog with versions represented as strings.StringgetDescription()Returns the description of the type.Set<String>getExtendedTypes()Returns the set of types that this type extends.UUIDgetID()Returns the unique identifier (UUID) of the element.MetadatagetMetadata()Returns the metadata associated with the element.StringgetName()Returns the name of the type.Set<PropertyDefinition>getProperties()Returns the set of properties defined by this type.VersiongetVersion()Returns the version of the type.StringgetVersionAsString()Returns the version of the type as a string.booleanisAbstract()Checks if the type is abstract.booleanisFinal()Checks if the type is final.voidsetID(UUID uuid)Sets 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 Detail
-
NAME
static final String NAME
The name of the base Type.- See Also:
- Constant Field Values
-
NAME_PROPERTY
static final String NAME_PROPERTY
The property name for the type's name.- See Also:
- Constant Field Values
-
DESCRIPTION_PROPERTY
static final String DESCRIPTION_PROPERTY
The property name for the type's description.- See Also:
- Constant Field Values
-
VERSION_PROPERTY
static final String VERSION_PROPERTY
The property name for the type's version.- See Also:
- Constant Field Values
-
CHANGELOG_PROPERTY
static final String CHANGELOG_PROPERTY
The property name for the type's changelog.- See Also:
- Constant Field Values
-
ABSTRACT_PROPERTY
static final String ABSTRACT_PROPERTY
The property name for the 'abstract' flag.- See Also:
- Constant Field Values
-
FINAL_PROPERTY
static final String FINAL_PROPERTY
The property name for the 'final' flag.- See Also:
- Constant Field Values
-
EXTENDED_TYPES_PROPERTY
static final String EXTENDED_TYPES_PROPERTY
The property name for the set of extended types.- See Also:
- Constant Field Values
-
PROPERTIES_PROPERTY
static final String PROPERTIES_PROPERTY
The property name for the set of property definitions.- See Also:
- Constant Field Values
-
-
Method Detail
-
getID
UUID getID()
Returns the unique identifier (UUID) of the element.- Specified by:
getIDin interfaceIdentifiableElement- Returns:
- The
UUIDof the element.
-
setID
void setID(UUID uuid)
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
void setMetadata(Metadata metadata)
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
Map<Version,String> getChangelog()
Returns the changelog for this type.- Returns:
- A map of versions to change descriptions.
-
getChangelogWithVersionAsString
Map<String,String> 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
Set<String> 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.
-
-