Package lu.kbra.modelizer_next.domain
Class LinkModel
java.lang.Object
lu.kbra.modelizer_next.domain.LinkModel
Persistent model of a relationship between two link ends, optionally connected to an association
class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the association class ID.Returns the cardinality from.Returns the cardinality to.getFrom()Returns the from.getId()Returns the ID.getLabel()Returns the label.Returns the label from.Returns the label to.Returns the line color.getTo()Returns the to.booleanhasLabel()Checks whether this object has a label.booleanChecks whether this object has a label from.booleanChecks whether this object has a label to.booleanChecks whether this object has a target label.booleanChecks whether self linking is enabled or applies.voidsetAssociationClassId(String associationClassId) Sets the association class ID.voidsetCardinalityFrom(Cardinality cardinalityFrom) Sets the cardinality from.voidsetCardinalityTo(Cardinality cardinalityTo) Sets the cardinality to.voidSets the from.voidSets the ID.voidSets the label.voidsetLabelFrom(String labelFrom) Sets the label from.voidsetLabelTo(String labelTo) Sets the label to.voidsetLineColor(Color lineColor) Sets the line color.voidSets the to.toString()Builds a debug string for this link model.
-
Constructor Details
-
LinkModel
public LinkModel()Creates a link model instance.
-
-
Method Details
-
getAssociationClassId
Returns the association class ID.- Returns:
- the association class ID
-
getCardinalityFrom
Returns the cardinality from.- Returns:
- the cardinality from
-
getCardinalityTo
Returns the cardinality to.- Returns:
- the cardinality to
-
getFrom
Returns the from.- Returns:
- the from
-
getId
Returns the ID.- Returns:
- the ID
-
getLabel
Returns the label.- Returns:
- the label
-
getLabelFrom
Returns the label from.- Returns:
- the label from
-
getLabelTo
Returns the label to.- Returns:
- the label to
-
getLineColor
Returns the line color.- Returns:
- the line color
-
getTo
Returns the to.- Returns:
- the to
-
hasLabel
public boolean hasLabel()Checks whether this object has a label.- Returns:
trueif label exists; otherwisefalse
-
hasLabelFrom
public boolean hasLabelFrom()Checks whether this object has a label from.- Returns:
trueif label from exists; otherwisefalse
-
hasLabelTo
public boolean hasLabelTo()Checks whether this object has a label to.- Returns:
trueif label to exists; otherwisefalse
-
hasTargetLabel
public boolean hasTargetLabel()Checks whether this object has a target label.- Returns:
trueif target label exists; otherwisefalse
-
isSelfLinking
public boolean isSelfLinking()Checks whether self linking is enabled or applies.- Returns:
trueif self linking is enabled or applies; otherwisefalse
-
setAssociationClassId
Sets the association class ID.- Parameters:
associationClassId- id of the element to read or modify
-
setCardinalityFrom
Sets the cardinality from.- Parameters:
cardinalityFrom- cardinality from value used by the operation
-
setCardinalityTo
Sets the cardinality to.- Parameters:
cardinalityTo- cardinality to value used by the operation
-
setFrom
Sets the from.- Parameters:
from- start point or source value
-
setId
Sets the ID.- Parameters:
id- stable id of the model element
-
setLabel
Sets the label.- Parameters:
name- name value to read, write, or display
-
setLabelFrom
Sets the label from.- Parameters:
labelFrom- text value for label from
-
setLabelTo
Sets the label to.- Parameters:
labelTo- text value for label to
-
setLineColor
Sets the line color.- Parameters:
lineColor- color value to use
-
setTo
Sets the to.- Parameters:
to- target point or destination value
-
toString
Builds a debug string for this link model.
-