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
Fields Modifier and Type Field Description static StringNAMEThe name of the RelationType.-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, TYPE_PROPERTY
-
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, NAME_PROPERTY, PROPERTIES_PROPERTY, VERSION_PROPERTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDescription()Returns the description of the type.Set<String>getExtendedTypes()Returns the set of types that this type extends.StringgetName()Returns the name of the type.Set<PropertyDefinition>getProperties()Returns the set of 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, getChangelog, getChangelogWithVersionAsString, getID, getMetadata, getVersion, getVersionAsString, isFinal, setID, setMetadata
-
-
-
-
Field Detail
-
NAME
static final String NAME
The name of the RelationType.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
@ISProperty(name="name", readonly=true, mandatory=true, nullable=false) String 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
@ISProperty(name="abstract", readonly=true, mandatory=true, nullable=false) 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, 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.
-
-