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
public final class LinkedEntityImpl extends PropertyElementImpl implements LinkedEntity
The default implementation of theLinkedEntityinterface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdescriptionThe description of the link.protected IntegermaxThe maximum cardinality.protected IntegerminThe minimum cardinality.protected StringrelationThe relation of the link.protected StringsourceThe source of the link.protected StringtargetThe target of the link.-
Fields inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
additionalProperties, allowedAdditionalKeys, expectedtype, supertypes
-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.types.reference.properties.LinkedEntity
DESCRIPTION_PROPERTY, MAX_PROPERTY, MIN_PROPERTY, NAME, RELATION_PROPERTY, SOURCE_PROPERTY, TARGET_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description LinkedEntityImpl()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcompareIntegers(Integer thisInt, Integer otherInt)Compares two integers.intcompareTo(LinkedEntity other)booleanequals(Object obj)StringgetDescription()Returns the description of the link.IntegergetMax()Returns the maximum cardinality of the link.IntegergetMin()Returns the minimum cardinality of the link.StringgetRelation()Returns the name of the relation type.StringgetSource()Returns the name of the source entity type.StringgetTarget()Returns the name of the target entity type.inthashCode()voidsetDescription(String description)Sets the description of the link.voidsetMax(Integer max)Sets the maximum cardinality of the link.voidsetMin(Integer min)Sets the minimum cardinality of the link.voidsetRelation(String relation)Sets the name of the relation type.voidsetSource(String source)Sets the name of the source entity type.voidsetTarget(String target)Sets the name of the target entity type.-
Methods inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
addAllowedAdditionalKey, getAdditionalProperties, getAdditionalProperty, getExpectedtype, getSupertypes, setAdditionalProperties, setAdditionalProperty
-
Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl
getTypeName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
-
-
-
Field Detail
-
source
protected String source
The source of the link.
-
relation
protected String relation
The relation of the link.
-
target
protected String target
The target of the link.
-
description
protected String description
The description of the link.
-
min
protected Integer min
The minimum cardinality.
-
max
protected Integer max
The maximum cardinality.
-
-
Method Detail
-
getSource
public String getSource()
Returns the name of the source entity type.- Specified by:
getSourcein interfaceLinkedEntity- Returns:
- The source type name.
-
setSource
public void setSource(String source)
Sets the name of the source entity type.- Specified by:
setSourcein interfaceLinkedEntity- Parameters:
source- The source type name.
-
getRelation
public String getRelation()
Returns the name of the relation type.- Specified by:
getRelationin interfaceLinkedEntity- Returns:
- The relation type name.
-
setRelation
public void setRelation(String relation)
Sets the name of the relation type.- Specified by:
setRelationin interfaceLinkedEntity- Parameters:
relation- The relation type name.
-
getTarget
public String getTarget()
Returns the name of the target entity type.- Specified by:
getTargetin interfaceLinkedEntity- Returns:
- The target type name.
-
setTarget
public void setTarget(String target)
Sets the name of the target entity type.- Specified by:
setTargetin interfaceLinkedEntity- Parameters:
target- The target type name.
-
getDescription
public String getDescription()
Returns the description of the link.- Specified by:
getDescriptionin interfaceLinkedEntity- Returns:
- The description.
-
setDescription
public void setDescription(String description)
Sets the description of the link.- Specified by:
setDescriptionin interfaceLinkedEntity- Parameters:
description- The description.
-
getMin
public Integer getMin()
Returns the minimum cardinality of the link.- Specified by:
getMinin interfaceLinkedEntity- Returns:
- The minimum cardinality.
-
setMin
public void setMin(Integer min)
Sets the minimum cardinality of the link.- Specified by:
setMinin interfaceLinkedEntity- Parameters:
min- The minimum cardinality.
-
getMax
public Integer getMax()
Returns the maximum cardinality of the link.- Specified by:
getMaxin interfaceLinkedEntity- Returns:
- The maximum cardinality.
-
setMax
public void setMax(Integer max)
Sets the maximum cardinality of the link.- Specified by:
setMaxin interfaceLinkedEntity- Parameters:
max- The maximum cardinality.
-
compareIntegers
protected int compareIntegers(Integer thisInt, Integer otherInt)
Compares two integers.- Parameters:
thisInt- The first integer.otherInt- The second integer.- Returns:
- The result of the comparison.
-
compareTo
public int compareTo(LinkedEntity other)
- Specified by:
compareToin interfaceComparable<LinkedEntity>
-
-