Class RelationTypeImpl<S extends EntityType,T extends EntityType>
java.lang.Object
org.gcube.informationsystem.types.impl.TypeImpl
org.gcube.informationsystem.types.impl.relations.RelationTypeImpl<S,T>
- Type Parameters:
S- the source typeT- the target type
- All Implemented Interfaces:
Serializable,Element,IdentifiableElement,RelationElement<S,,T> RelationType<S,,T> Type
- Direct Known Subclasses:
ConsistsOfTypeImpl,IsRelatedToTypeImpl
public class RelationTypeImpl<S extends EntityType,T extends EntityType>
extends TypeImpl
implements RelationType<S,T>
The implementation of the
RelationType.- Author:
- Luca Frosini (ISTI - CNR), F. R. Pisano (ISTI - CNR)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SThe source of the relation.protected TThe target of the relation.Fields inherited from class org.gcube.informationsystem.types.impl.TypeImpl
abstractType, changelog, DEFAULT_CHANGELOG_MAP, description, extendedTypes, finalClass, metadata, name, properties, uuid, versionFields 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.relations.RelationType
NAMEFields inherited from interface org.gcube.informationsystem.types.reference.Type
ABSTRACT_PROPERTY, CHANGELOG_PROPERTY, DESCRIPTION_PROPERTY, EXTENDED_TYPES_PROPERTY, FINAL_PROPERTY, NAME, NAME_PROPERTY, PROPERTIES_PROPERTY, VERSION_PROPERTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor.RelationTypeImpl(Class<? extends RelationElement<?, ?>> clz) Constructs a newRelationTypeImplfrom a class. -
Method Summary
Modifier and TypeMethodDescriptionReturns theAccessTypeof this type definition.protected Type[]getParametersFromSuperClasses(Class<? extends RelationElement<?, ?>> clz) Returns the generic parameters from the superclasses of the given class.static RelationType<?,?> getRelationTypeDefinitionInstance(Class<? extends RelationElement<?, ?>> clz) Returns aRelationTypeinstance for the given class.Returns the source entity of the relation.Returns the target entity of the relation.voidSets the source entity of the relation.voidSets the target entity of the relation.toString()Methods inherited from class org.gcube.informationsystem.types.impl.TypeImpl
getChangelog, getChangelogWithVersionAsString, getDescription, getExtendedTypes, getGenericClass, getID, getInstance, getMetadata, getName, getProperties, getTypeName, getVersion, getVersionAsString, isAbstract, isFinal, retrieveListOfProperties, retrieveSuperClasses, setChangelog, setID, setMetadata, setVersionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeNameMethods inherited from interface org.gcube.informationsystem.base.reference.relations.RelationElement
getID, getMetadata, setID, setMetadataMethods inherited from interface org.gcube.informationsystem.types.reference.relations.RelationType
getDescription, getExtendedTypes, getName, getProperties, isAbstractMethods inherited from interface org.gcube.informationsystem.types.reference.Type
getChangelog, getChangelogWithVersionAsString, getID, getMetadata, getVersion, getVersionAsString, isFinal, setID, setMetadata
-
Field Details
-
source
The source of the relation. -
target
The target of the relation.
-
-
Constructor Details
-
RelationTypeImpl
protected RelationTypeImpl()Default constructor. -
RelationTypeImpl
Constructs a newRelationTypeImplfrom a class.- Parameters:
clz- The class.
-
-
Method Details
-
getRelationTypeDefinitionInstance
public static RelationType<?,?> getRelationTypeDefinitionInstance(Class<? extends RelationElement<?, ?>> clz) Returns aRelationTypeinstance for the given class.- Parameters:
clz- the class- Returns:
- a
RelationTypeinstance
-
getParametersFromSuperClasses
Returns the generic parameters from the superclasses of the given class.- Parameters:
clz- the class- Returns:
- the generic parameters
-
getSource
Returns the source entity of the relation.- Specified by:
getSourcein interfaceRelationElement<S extends EntityType,T extends EntityType> - Specified by:
getSourcein interfaceRelationType<S extends EntityType,T extends EntityType> - Returns:
- The source entity.
-
setSource
Sets the source entity of the relation.- Specified by:
setSourcein interfaceRelationElement<S extends EntityType,T extends EntityType> - Parameters:
source- The source entity to set.
-
getTarget
Returns the target entity of the relation.- Specified by:
getTargetin interfaceRelationElement<S extends EntityType,T extends EntityType> - Specified by:
getTargetin interfaceRelationType<S extends EntityType,T extends EntityType> - Returns:
- The target entity.
-
setTarget
Sets the target entity of the relation.- Specified by:
setTargetin interfaceRelationElement<S extends EntityType,T extends EntityType> - Parameters:
target- The target entity to set.
-
getAccessType
Returns theAccessTypeof this type definition.- Specified by:
getAccessTypein interfaceType- Overrides:
getAccessTypein classTypeImpl- Returns:
- The access type.
-
toString
-