Interface ResourceSchema
-
- All Superinterfaces:
Element,EntityElement,EntitySchema,IdentifiableElement,Serializable,Type
- All Known Implementing Classes:
ResourceSchemaImpl
@TypeMetadata(name="ResourceSchema", description="Defines the type of a Resource, extending EntitySchema with the ConsistsOf and IsRelatedTo constraints (as LinkedEntity lists) that specify which Facet and Resource types it can be linked to.", version="1.1.0") @Change(version="1.1.0",description="\'consistsOf\' and \'isRelatedTo\' are always present, empty when the Resource declares none. A Resource type definition has no \'properties\'.") @Change(version="1.0.0",description="First Version") public interface ResourceSchema extends EntitySchema
Defines the type of aResource.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONSISTS_OF_PROPERTYThe property name for the ConsistsOf constraints (facets).static StringIS_RELATED_TO_PROPERTYThe property name for the IsRelatedTo constraints (related resources).static StringNAMEThe name of the ResourceSchema.static StringVERSIONThe version of this type definition.-
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 List<LinkedEntity>getConsistsOf()Returns the list of ConsistsOf constraints (target Facet types) associated with this resource type.List<LinkedEntity>getIsRelatedTo()Returns the list of IsRelatedTo constraints (related resource types) for this resource type.List<PropertyDefinition>getProperties()Returns the properties defined by this type.-
Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Methods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
getID, getMetadata, setID, setMetadata
-
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
getAccessType, getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getID, getMetadata, getVersion, getVersionAsString, isFinal, isLocked, setAdditionalProperty, setExtendedTypes, setID, setLocked, setMetadata
-
-
-
-
Field Detail
-
NAME
static final String NAME
The name of the ResourceSchema.- See Also:
- Constant Field Values
-
VERSION
static final String VERSION
The version of this type definition.- See Also:
- Constant Field Values
-
CONSISTS_OF_PROPERTY
static final String CONSISTS_OF_PROPERTY
The property name for the ConsistsOf constraints (facets).- See Also:
- Constant Field Values
-
IS_RELATED_TO_PROPERTY
static final String IS_RELATED_TO_PROPERTY
The property name for the IsRelatedTo constraints (related resources).- See Also:
- Constant Field Values
-
-
Method Detail
-
getProperties
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.A Resource holds no property of its own:
propertiesis not a member of a Resource type definition, which neither writes it nor reads it.- Specified by:
getPropertiesin interfaceType- Returns:
- always
null.
-
getConsistsOf
@ISProperty(name="consistsOf", readonly=false, mandatory=true) List<LinkedEntity> getConsistsOf()
Returns the list of ConsistsOf constraints (target Facet types) associated with this resource type.- Returns:
- A list of
LinkedEntityobjects representing the ConsistsOf constraints.
-
getIsRelatedTo
@ISProperty(name="isRelatedTo", readonly=false, mandatory=true) List<LinkedEntity> getIsRelatedTo()
Returns the list of IsRelatedTo constraints (related resource types) for this resource type.- Returns:
- A list of
LinkedEntityobjects representing the IsRelatedTo constraints.
-
-