Class ResourceSchemaImpl
- java.lang.Object
-
- org.gcube.informationsystem.types.impl.TypeImpl
-
- org.gcube.informationsystem.types.impl.entities.EntitySchemaImpl
-
- org.gcube.informationsystem.types.impl.entities.ResourceSchemaImpl
-
- All Implemented Interfaces:
Serializable,Element,EntityElement,IdentifiableElement,EntitySchema,ResourceSchema,Type
public final class ResourceSchemaImpl extends EntitySchemaImpl implements ResourceSchema
The default implementation of theResourceSchemainterface.A Resource holds no property of its own, so
propertiesis not a member of its definition: it is never written, and it is skipped when a representation carries it.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<LinkedEntity>consistsOfThe ConsistsOf constraints of the resource type, empty when it declares none.protected List<LinkedEntity>isRelatedToThe IsRelatedTo constraints of the resource type, empty when it declares none.-
Fields inherited from class org.gcube.informationsystem.types.impl.entities.EntitySchemaImpl
metadata
-
Fields inherited from class org.gcube.informationsystem.types.impl.TypeImpl
abstractType, additionalProperties, changelog, DEFAULT_CHANGELOG_MAP, description, extendedTypes, finalClass, locked, name, properties, uuid, version
-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USER
-
Fields inherited from interface org.gcube.informationsystem.types.reference.entities.EntitySchema
NAME
-
Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.types.reference.entities.ResourceSchema
CONSISTS_OF_PROPERTY, IS_RELATED_TO_PROPERTY, NAME, VERSION
-
Fields inherited from interface org.gcube.informationsystem.types.reference.Type
ABSTRACT_PROPERTY, CHANGELOG_PROPERTY, DESCRIPTION_PROPERTY, EXTENDED_TYPES_PROPERTY, FINAL_PROPERTY, LOCKED_PROPERTY, NAME, NAME_PROPERTY, NAME_REGEX, PROPERTIES_PROPERTY, VERSION_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedResourceSchemaImpl()Default constructor.ResourceSchemaImpl(Class<? extends Resource> clz)Constructs a newResourceSchemaImplfrom a class.ResourceSchemaImpl(String name)Constructs a newResourceSchemaImplwith the given type name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessTypegetAccessType()Returns theAccessTypeof this type definition.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()Gets the properties of the type.protected voidsetConsistsOf(List<LinkedEntity> consistsOf)Sets the ConsistsOf constraints; anulllist means none.protected voidsetIsRelatedTo(List<LinkedEntity> isRelatedTo)Sets the IsRelatedTo constraints; anulllist means none.-
Methods inherited from class org.gcube.informationsystem.types.impl.entities.EntitySchemaImpl
getEntitySchemaInstance, getMetadata, setMetadata, toString
-
Methods inherited from class org.gcube.informationsystem.types.impl.TypeImpl
getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getDescription, getExtendedTypes, getGenericClass, getID, getInstance, getName, getTypeName, getVersion, getVersionAsString, isAbstract, isFinal, isLocked, retrieveListOfProperties, retrieveSuperClasses, setAdditionalProperty, setChangelog, setExtendedTypes, setID, setLocked, setVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getID, getMetadata, getVersion, getVersionAsString, isFinal, isLocked, setAdditionalProperty, setExtendedTypes, setID, setLocked, setMetadata
-
-
-
-
Field Detail
-
consistsOf
protected List<LinkedEntity> consistsOf
The ConsistsOf constraints of the resource type, empty when it declares none.
-
isRelatedTo
protected List<LinkedEntity> isRelatedTo
The IsRelatedTo constraints of the resource type, empty when it declares none.
-
-
Constructor Detail
-
ResourceSchemaImpl
protected ResourceSchemaImpl()
Default constructor.
-
ResourceSchemaImpl
public ResourceSchemaImpl(String name)
Constructs a newResourceSchemaImplwith the given type name.- Parameters:
name- The type name.
-
-
Method Detail
-
getConsistsOf
public List<LinkedEntity> getConsistsOf()
Returns the list of ConsistsOf constraints (target Facet types) associated with this resource type.- Specified by:
getConsistsOfin interfaceResourceSchema- Returns:
- A list of
LinkedEntityobjects representing the ConsistsOf constraints.
-
getIsRelatedTo
public List<LinkedEntity> getIsRelatedTo()
Returns the list of IsRelatedTo constraints (related resource types) for this resource type.- Specified by:
getIsRelatedToin interfaceResourceSchema- Returns:
- A list of
LinkedEntityobjects representing the IsRelatedTo constraints.
-
getProperties
public List<PropertyDefinition> getProperties()
Gets the properties of the type.- Specified by:
getPropertiesin interfaceResourceSchema- Specified by:
getPropertiesin interfaceType- Overrides:
getPropertiesin classTypeImpl- Returns:
- always
null: a Resource type declares no property.
-
setConsistsOf
protected void setConsistsOf(List<LinkedEntity> consistsOf)
Sets the ConsistsOf constraints; anulllist means none.- Parameters:
consistsOf- The constraints.
-
setIsRelatedTo
protected void setIsRelatedTo(List<LinkedEntity> isRelatedTo)
Sets the IsRelatedTo constraints; anulllist means none.- Parameters:
isRelatedTo- The constraints.
-
getAccessType
public AccessType getAccessType()
Returns theAccessTypeof this type definition.- Specified by:
getAccessTypein interfaceType- Overrides:
getAccessTypein classEntitySchemaImpl- Returns:
- The access type.
-
-