Interface PropertySchema
- All Superinterfaces:
Element,IdentifiableElement,PropertyElement,Serializable,Type
- All Known Implementing Classes:
PropertySchemaImpl
@TypeMetadata(name="PropertySchema",
description="Defines the type of a Property, combining PropertyElement\'s identity and metadata with Type\'s structural fields (name, description, abstract flag, extended types, and PropertyDefinitions).",
version="1.0.0")
@Change(version="1.0.0",
description="First Version")
public interface PropertySchema
extends PropertyElement, Type
Defines the type of a
Property.- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsFields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USERFields 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_PROPERTY, NAME_REGEX, PROPERTIES_PROPERTY, VERSION_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of the type.Returns the 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 properties defined by this type.booleanChecks if the type is abstract.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
getTypeNameMethods inherited from interface org.gcube.informationsystem.types.reference.Type
getAccessType, getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getVersion, getVersionAsString, isFinal, isLocked, setAdditionalProperty, setExtendedTypes, setLocked
-
Field Details
-
NAME
The name of the PropertySchema.- See Also:
-
-
Method Details
-
getID
@ISProperty(name="id", description="This UUID is used to identify the instance uniquely.", readonly=true, mandatory=true) UUID getID()Returns the unique identifier (UUID) of the element.- Specified by:
getIDin interfaceIdentifiableElement- Specified by:
getIDin interfaceType- Returns:
- The
UUIDof the element.
-
setID
Sets the unique identifier (UUID) for the element.- Specified by:
setIDin interfaceIdentifiableElement- Specified by:
setIDin interfaceType- Parameters:
uuid- TheUUIDto set.
-
getMetadata
@ISProperty(name="metadata", mandatory=true, description="Metadata associated with the instance that is automatically created/updated by the system.") 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- Specified by:
getMetadatain interfaceType- Returns:
- The
Metadataof the element, ornullif none is set.
-
setMetadata
Sets the metadata for the element.- Specified by:
setMetadatain interfaceIdentifiableElement- Specified by:
setMetadatain interfaceType- Parameters:
metadata- TheMetadatato associate with the element.
-
getName
Returns the name of the type. -
getDescription
Returns the description of the type.- Specified by:
getDescriptionin interfaceType- Returns:
- The type description.
-
isAbstract
Checks if the type is abstract.- Specified by:
isAbstractin interfaceType- Returns:
trueif the type is abstract,falseotherwise.
-
getExtendedTypes
Returns the types that this type extends.A
Listbecause the order carries meaning: it is the declaration order of the direct parents -- the local precedence order C3 linearization requires -- and it must survive serialization and persistence unchanged. ASetwould map to an unordered store and lose it.- Specified by:
getExtendedTypesin interfaceType- Returns:
- The parent type names, in declaration order.
-
getProperties
@ISProperty(name="properties", readonly=false, mandatory=true) List<PropertyDefinition> getProperties()Returns the properties defined by this type.A
Listbecause the order carries meaning: properties are read in the order the Java class declares them, which is the intended reading order for anyone looking at the type definition. ASetwould map to an unordered store and lose it.- Specified by:
getPropertiesin interfaceType- Returns:
- The
PropertyDefinitions, in declaration order.
-