Class LinkModel

java.lang.Object
lu.kbra.modelizer_next.domain.LinkModel

public class LinkModel extends Object
Persistent model of a relationship between two link ends, optionally connected to an association class.
  • Constructor Details

    • LinkModel

      public LinkModel()
      Creates a link model instance.
  • Method Details

    • getAssociationClassId

      public String getAssociationClassId()
      Returns the association class ID.
      Returns:
      the association class ID
    • getCardinalityFrom

      public Cardinality getCardinalityFrom()
      Returns the cardinality from.
      Returns:
      the cardinality from
    • getCardinalityTo

      public Cardinality getCardinalityTo()
      Returns the cardinality to.
      Returns:
      the cardinality to
    • getFrom

      public LinkEnd getFrom()
      Returns the from.
      Returns:
      the from
    • getId

      public String getId()
      Returns the ID.
      Returns:
      the ID
    • getLabel

      public String getLabel()
      Returns the label.
      Returns:
      the label
    • getLabelFrom

      public String getLabelFrom()
      Returns the label from.
      Returns:
      the label from
    • getLabelTo

      public String getLabelTo()
      Returns the label to.
      Returns:
      the label to
    • getLineColor

      public Color getLineColor()
      Returns the line color.
      Returns:
      the line color
    • getTo

      public LinkEnd getTo()
      Returns the to.
      Returns:
      the to
    • hasLabel

      public boolean hasLabel()
      Checks whether this object has a label.
      Returns:
      true if label exists; otherwise false
    • hasLabelFrom

      public boolean hasLabelFrom()
      Checks whether this object has a label from.
      Returns:
      true if label from exists; otherwise false
    • hasLabelTo

      public boolean hasLabelTo()
      Checks whether this object has a label to.
      Returns:
      true if label to exists; otherwise false
    • hasTargetLabel

      public boolean hasTargetLabel()
      Checks whether this object has a target label.
      Returns:
      true if target label exists; otherwise false
    • isSelfLinking

      public boolean isSelfLinking()
      Checks whether self linking is enabled or applies.
      Returns:
      true if self linking is enabled or applies; otherwise false
    • setAssociationClassId

      public void setAssociationClassId(String associationClassId)
      Sets the association class ID.
      Parameters:
      associationClassId - id of the element to read or modify
    • setCardinalityFrom

      public void setCardinalityFrom(Cardinality cardinalityFrom)
      Sets the cardinality from.
      Parameters:
      cardinalityFrom - cardinality from value used by the operation
    • setCardinalityTo

      public void setCardinalityTo(Cardinality cardinalityTo)
      Sets the cardinality to.
      Parameters:
      cardinalityTo - cardinality to value used by the operation
    • setFrom

      public void setFrom(LinkEnd from)
      Sets the from.
      Parameters:
      from - start point or source value
    • setId

      public void setId(String id)
      Sets the ID.
      Parameters:
      id - stable id of the model element
    • setLabel

      public void setLabel(String name)
      Sets the label.
      Parameters:
      name - name value to read, write, or display
    • setLabelFrom

      public void setLabelFrom(String labelFrom)
      Sets the label from.
      Parameters:
      labelFrom - text value for label from
    • setLabelTo

      public void setLabelTo(String labelTo)
      Sets the label to.
      Parameters:
      labelTo - text value for label to
    • setLineColor

      public void setLineColor(Color lineColor)
      Sets the line color.
      Parameters:
      lineColor - color value to use
    • setTo

      public void setTo(LinkEnd to)
      Sets the to.
      Parameters:
      to - target point or destination value
    • toString

      public String toString()
      Builds a debug string for this link model.
      Overrides:
      toString in class Object
      Returns:
      a debug string for this object