Interface RelationSchema<S extends EntitySchema,T extends EntitySchema>
-
- Type Parameters:
S- The type of the source entity.T- The type of the target entity.
- All Superinterfaces:
Element,IdentifiableElement,RelationElement<S,T>,Serializable,Type
- All Known Subinterfaces:
ConsistsOfSchema,IsRelatedToSchema
- All Known Implementing Classes:
ConsistsOfSchemaImpl,IsRelatedToSchemaImpl,RelationSchemaImpl
@TypeMetadata(name="RelationSchema", description="The base type for all relation type definitions in the Information System model, specializing Type for the relation-type family (ConsistsOfSchema and IsRelatedToSchema).", version="1.0.0") @Change(version="1.0.0", description="First Version") public interface RelationSchema<S extends EntitySchema,T extends EntitySchema> extends Type, RelationElement<S,T>
The base interface for all relation type definitions.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAMEThe name of the RelationSchema.-
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.base.reference.relations.RelationElement
SOURCE_PROPERTY, TARGET_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.StringgetName()Returns the name of the type.List<PropertyDefinition>getProperties()Returns the properties defined by this type.SgetSource()Returns the source entity of the relation.TgetTarget()Returns the target entity of the relation.booleanisAbstract()Checks if the type is abstract.-
Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Methods inherited from interface org.gcube.informationsystem.base.reference.relations.RelationElement
getID, getMetadata, setID, setMetadata, setSource, setTarget
-
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 RelationSchema.- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
getSource
S getSource()
Returns the source entity of the relation.- Specified by:
getSourcein interfaceRelationElement<S extends EntitySchema,T extends EntitySchema>- Returns:
- The source entity.
-
getTarget
T getTarget()
Returns the target entity of the relation.- Specified by:
getTargetin interfaceRelationElement<S extends EntitySchema,T extends EntitySchema>- Returns:
- The target entity.
-
-