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 aProperty.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAMEThe name of the PropertySchema.-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USER
-
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_PROPERTY, NAME_REGEX, PROPERTIES_PROPERTY, VERSION_PROPERTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDescription()Returns the description of the type.List<String>getExtendedTypes()Returns the 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.List<PropertyDefinition>getProperties()Returns the properties defined by this type.booleanisAbstract()Checks if the type is abstract.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
-
Methods inherited from interface org.gcube.informationsystem.types.reference.Type
getAccessType, getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getVersion, getVersionAsString, isFinal, isLocked, setAdditionalProperty, setExtendedTypes, setLocked
-
-
-
-
Field Detail
-
NAME
static final String NAME
The name of the PropertySchema.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void setID(UUID uuid)
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
void setMetadata(Metadata metadata)
Sets the metadata for the element.- Specified by:
setMetadatain interfaceIdentifiableElement- Specified by:
setMetadatain interfaceType- Parameters:
metadata- TheMetadatato associate with the element.
-
getName
@ISProperty(name="name", readonly=true, mandatory=true) String getName()
Returns the name of the type.
-
getDescription
@ISProperty(name="description", readonly=false, mandatory=true) String getDescription()
Returns the description of the type.- Specified by:
getDescriptionin interfaceType- Returns:
- The type description.
-
isAbstract
@ISProperty(name="abstract", readonly=true, mandatory=true) boolean isAbstract()
Checks if the type is abstract.- Specified by:
isAbstractin interfaceType- Returns:
trueif the type is abstract,falseotherwise.
-
getExtendedTypes
@ISProperty(name="extendedTypes", readonly=true, mandatory=true) List<String> 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.
-
-