Class RelationSchemaImpl<S extends EntitySchema,T extends EntitySchema>
java.lang.Object
org.gcube.informationsystem.types.impl.TypeImpl
org.gcube.informationsystem.types.impl.relations.RelationSchemaImpl<S,T>
- Type Parameters:
S- the source typeT- the target type
- All Implemented Interfaces:
Serializable,Element,IdentifiableElement,RelationElement<S,,T> RelationSchema<S,,T> Type
- Direct Known Subclasses:
ConsistsOfSchemaImpl,IsRelatedToSchemaImpl
public class RelationSchemaImpl<S extends EntitySchema,T extends EntitySchema>
extends TypeImpl
implements RelationSchema<S,T>
The implementation of the
RelationSchema.- 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, additionalProperties, changelog, DEFAULT_CHANGELOG_MAP, description, extendedTypes, finalClass, locked, metadata, name, properties, uuid, versionFields 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.relations.RelationSchema
NAMEFields inherited from interface org.gcube.informationsystem.types.reference.Type
ABSTRACT_PROPERTY, CHANGELOG_PROPERTY, DESCRIPTION_PROPERTY, EXTENDED_TYPES_PROPERTY, FINAL_PROPERTY, LOCKED_PROPERTY, NAME, NAME_PROPERTY, PROPERTIES_PROPERTY, VERSION_PROPERTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor.RelationSchemaImpl(Class<? extends RelationElement<?, ?>> clz) Constructs a newRelationSchemaImplfrom 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 RelationSchema<?,?> getRelationSchemaInstance(Class<? extends RelationElement<?, ?>> clz) Returns aRelationSchemainstance 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
getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getDescription, getExtendedTypes, getGenericClass, getID, getInstance, getMetadata, getName, getProperties, getTypeName, getVersion, getVersionAsString, isAbstract, isFinal, isLocked, retrieveListOfProperties, retrieveSuperClasses, setAdditionalProperty, setChangelog, setExtendedTypes, setID, setLocked, 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.RelationSchema
getDescription, getExtendedTypes, getName, getProperties, isAbstractMethods inherited from interface org.gcube.informationsystem.types.reference.Type
getAdditionalProperties, getChangelog, getChangelogWithVersionAsString, getID, getMetadata, getVersion, getVersionAsString, isFinal, isLocked, setAdditionalProperty, setExtendedTypes, setID, setLocked, setMetadata
-
Field Details
-
source
The source of the relation. -
target
The target of the relation.
-
-
Constructor Details
-
RelationSchemaImpl
protected RelationSchemaImpl()Default constructor. -
RelationSchemaImpl
Constructs a newRelationSchemaImplfrom a class.- Parameters:
clz- The class.
-
-
Method Details
-
getRelationSchemaInstance
public static RelationSchema<?,?> getRelationSchemaInstance(Class<? extends RelationElement<?, ?>> clz) Returns aRelationSchemainstance for the given class.- Parameters:
clz- the class- Returns:
- a
RelationSchemainstance
-
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 EntitySchema,T extends EntitySchema> - Specified by:
getSourcein interfaceRelationSchema<S extends EntitySchema,T extends EntitySchema> - Returns:
- The source entity.
-
setSource
Sets the source entity of the relation.- Specified by:
setSourcein interfaceRelationElement<S extends EntitySchema,T extends EntitySchema> - Parameters:
source- The source entity to set.
-
getTarget
Returns the target entity of the relation.- Specified by:
getTargetin interfaceRelationElement<S extends EntitySchema,T extends EntitySchema> - Specified by:
getTargetin interfaceRelationSchema<S extends EntitySchema,T extends EntitySchema> - Returns:
- The target entity.
-
setTarget
Sets the target entity of the relation.- Specified by:
setTargetin interfaceRelationElement<S extends EntitySchema,T extends EntitySchema> - 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
-