Class Relationship

java.lang.Object
com.structurizr.model.ModelItem
com.structurizr.model.Relationship
All Implemented Interfaces:
PropertyHolder, Comparable<ModelItem>

public final class Relationship extends ModelItem
A relationship between two elements.
  • Method Details

    • getModel

      public Model getModel()
    • setModel

      protected void setModel(Model model)
    • getCanonicalName

      public String getCanonicalName()
      Specified by:
      getCanonicalName in class ModelItem
    • getSource

      public Element getSource()
    • getSourceId

      public String getSourceId()
      Gets the ID of the source element.
      Returns:
      the ID of the source element, as a String
    • getDestination

      public Element getDestination()
    • getDestinationId

      public String getDestinationId()
      Gets the ID of the destination element.
      Returns:
      the ID of the destination element, as a String
    • getDescription

      public String getDescription()
    • getTechnology

      public String getTechnology()
      Gets the technology associated with this relationship (e.g. HTTPS, JDBC, etc).
      Returns:
      the technology as a String, or null if a technology is not specified
    • getInteractionStyle

      public InteractionStyle getInteractionStyle()
      Gets the interaction style (synchronous or asynchronous).
      Returns:
      an InteractionStyle, or null if an interaction style has not been specified
    • getLinkedRelationshipId

      public String getLinkedRelationshipId()
    • getDefaultTags

      public Set<String> getDefaultTags()
      Specified by:
      getDefaultTags in class ModelItem
    • toString

      public String toString()
      Overrides:
      toString in class Object