Class LinkedEntityImpl
java.lang.Object
org.gcube.informationsystem.base.impl.ElementImpl
org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
org.gcube.informationsystem.types.impl.properties.LinkedEntityImpl
- All Implemented Interfaces:
Serializable,Comparable<LinkedEntity>,Element,PropertyElement,SchemaMixedElement,ModelElement,Property,LinkedEntity
The default implementation of the
LinkedEntity interface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe description of the link.protected IntegerThe maximum cardinality.protected IntegerThe minimum cardinality.protected StringThe relation of the link.protected StringThe source of the link.protected StringThe target of the link.Fields inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
additionalProperties, allowedAdditionalKeys, expectedtype, supertypesFields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTYFields inherited from interface org.gcube.informationsystem.types.reference.properties.LinkedEntity
DESCRIPTION_PROPERTY, MAX_PROPERTY, MIN_PROPERTY, NAME, RELATION_PROPERTY, SOURCE_PROPERTY, TARGET_PROPERTYFields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcompareIntegers(Integer thisInt, Integer otherInt) Compares two integers.intcompareTo(LinkedEntity other) booleanReturns the description of the link.getMax()Returns the maximum cardinality of the link.getMin()Returns the minimum cardinality of the link.Returns the name of the relation type.Returns the name of the source entity type.Returns the name of the target entity type.inthashCode()voidsetDescription(String description) Sets the description of the link.voidSets the maximum cardinality of the link.voidSets the minimum cardinality of the link.voidsetRelation(String relation) Sets the name of the relation type.voidSets the name of the source entity type.voidSets the name of the target entity type.Methods inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
addAllowedAdditionalKey, getAdditionalProperties, getAdditionalProperty, getExpectedtype, getSupertypes, setAdditionalProperties, setAdditionalPropertyMethods inherited from class org.gcube.informationsystem.base.impl.ElementImpl
getTypeName, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Field Details
-
source
The source of the link. -
relation
The relation of the link. -
target
The target of the link. -
description
The description of the link. -
min
The minimum cardinality. -
max
The maximum cardinality.
-
-
Constructor Details
-
LinkedEntityImpl
public LinkedEntityImpl()Default constructor.
-
-
Method Details
-
getSource
Returns the name of the source entity type.- Specified by:
getSourcein interfaceLinkedEntity- Returns:
- The source type name.
-
setSource
Sets the name of the source entity type.- Specified by:
setSourcein interfaceLinkedEntity- Parameters:
source- The source type name.
-
getRelation
Returns the name of the relation type.- Specified by:
getRelationin interfaceLinkedEntity- Returns:
- The relation type name.
-
setRelation
Sets the name of the relation type.- Specified by:
setRelationin interfaceLinkedEntity- Parameters:
relation- The relation type name.
-
getTarget
Returns the name of the target entity type.- Specified by:
getTargetin interfaceLinkedEntity- Returns:
- The target type name.
-
setTarget
Sets the name of the target entity type.- Specified by:
setTargetin interfaceLinkedEntity- Parameters:
target- The target type name.
-
getDescription
Returns the description of the link.- Specified by:
getDescriptionin interfaceLinkedEntity- Returns:
- The description.
-
setDescription
Sets the description of the link.- Specified by:
setDescriptionin interfaceLinkedEntity- Parameters:
description- The description.
-
getMin
Returns the minimum cardinality of the link.- Specified by:
getMinin interfaceLinkedEntity- Returns:
- The minimum cardinality.
-
setMin
Sets the minimum cardinality of the link.- Specified by:
setMinin interfaceLinkedEntity- Parameters:
min- The minimum cardinality.
-
getMax
Returns the maximum cardinality of the link.- Specified by:
getMaxin interfaceLinkedEntity- Returns:
- The maximum cardinality.
-
setMax
Sets the maximum cardinality of the link.- Specified by:
setMaxin interfaceLinkedEntity- Parameters:
max- The maximum cardinality.
-
hashCode
public int hashCode() -
equals
-
compareIntegers
Compares two integers.- Parameters:
thisInt- The first integer.otherInt- The second integer.- Returns:
- The result of the comparison.
-
compareTo
- Specified by:
compareToin interfaceComparable<LinkedEntity>
-