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
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.base.reference.relations.RelationElement
SOURCE_PROPERTY, TARGET_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, PROPERTIES_PROPERTY, VERSION_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of the type.Returns the types that this type extends.getName()Returns the name of the type.Returns the properties defined by this type.Returns the source entity of the relation.Returns the target entity of the relation.booleanChecks if the type is abstract.Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeNameMethods inherited from interface org.gcube.informationsystem.base.reference.relations.RelationElement
getID, getMetadata, setID, setMetadata, setSource, setTargetMethods 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 Details
-
NAME
The name of the RelationSchema.- See Also:
-
-
Method Details
-
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.
-
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.
-