Interface RelationType<S extends EntityType,T extends EntityType>
- 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:
ConsistsOfType,IsRelatedToType
- All Known Implementing Classes:
ConsistsOfTypeImpl,IsRelatedToTypeImpl,RelationTypeImpl
@TypeMetadata(name="RelationType",
description="This type provides information for any RelationType",
version="1.0.0")
@Change(version="1.0.0",
description="First Version")
public interface RelationType<S extends EntityType,T extends EntityType>
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, TYPE_PROPERTYFields 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, NAME_PROPERTY, PROPERTIES_PROPERTY, VERSION_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of the type.Returns the set of types that this type extends.getName()Returns the name of the type.Returns the set of 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, getChangelog, getChangelogWithVersionAsString, getID, getMetadata, getVersion, getVersionAsString, isFinal, setID, setMetadata
-
Field Details
-
NAME
The name of the RelationType.- See Also:
-
-
Method Details
-
getName
Returns the name of the type. -
getDescription
@ISProperty(name="description", readonly=false, mandatory=true, nullable=false) String 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
@ISProperty(name="extendedTypes", readonly=true, mandatory=true, nullable=false) Set<String> getExtendedTypes()Returns the set of types that this type extends.- Specified by:
getExtendedTypesin interfaceType- Returns:
- A set of parent type names.
-
getProperties
@ISProperty(name="properties", readonly=false, mandatory=true, nullable=false) Set<PropertyDefinition> getProperties()Returns the set of properties defined by this type.- Specified by:
getPropertiesin interfaceType- Returns:
- A set of
PropertyDefinitions.
-
getSource
S getSource()Returns the source entity of the relation.- Specified by:
getSourcein interfaceRelationElement<S extends EntityType,T extends EntityType> - Returns:
- The source entity.
-
getTarget
T getTarget()Returns the target entity of the relation.- Specified by:
getTargetin interfaceRelationElement<S extends EntityType,T extends EntityType> - Returns:
- The target entity.
-