Package com.structurizr.view
Class RelationshipView
java.lang.Object
com.structurizr.view.RelationshipView
public final class RelationshipView
extends java.lang.Object
This class represents an instance of a Relationship on a View.
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetDescription()Gets the description of this relationship (used in dynamic views only).java.lang.StringgetId()Gets the ID of the relationship this RelationshipView represents.java.lang.StringgetOrder()Gets the order of this relationship (used in dynamic views only; e.g.java.lang.IntegergetPosition()Gets the position of the annotation along the line.RelationshipgetRelationship()Gets the relationship that this RelationshipView represents.RoutinggetRouting()Gets the routing algorithm used when rendering this relationship.java.util.Collection<Vertex>getVertices()Gets the set of vertices used to render the relationship.inthashCode()voidsetDescription(java.lang.String description)Sets the description of this relationship (used in dynamic views only).voidsetOrder(java.lang.String order)Sets the order of this relationship (used in dynamic views only; e.g.voidsetPosition(java.lang.Integer position)Sets the position of the annotation along the line.voidsetRouting(Routing routing)Sets the routing algorithm used when rendering this relationship.voidsetVertices(java.util.Collection<Vertex> vertices)Sets the collection of vertices used when rendering this relationship.java.lang.StringtoString()
-
Method Details
-
getId
public java.lang.String getId()Gets the ID of the relationship this RelationshipView represents.- Returns:
- the ID, as a String
-
getRelationship
Gets the relationship that this RelationshipView represents.- Returns:
- a Relationship instance
-
getDescription
public java.lang.String getDescription()Gets the description of this relationship (used in dynamic views only).- Returns:
- the description, as a String or an empty string if a description has not been set
-
setDescription
public void setDescription(java.lang.String description)Sets the description of this relationship (used in dynamic views only).- Parameters:
description- the description, as a String
-
getOrder
public java.lang.String getOrder()Gets the order of this relationship (used in dynamic views only; e.g. 1.0, 1.1, 2.0, etc).- Returns:
- the order, as a String
-
setOrder
public void setOrder(java.lang.String order)Sets the order of this relationship (used in dynamic views only; e.g. 1.0, 1.1, 2.0, etc).- Parameters:
order- the order, as a String
-
getVertices
Gets the set of vertices used to render the relationship.- Returns:
- a collection of Vertex objects
-
setVertices
Sets the collection of vertices used when rendering this relationship.- Parameters:
vertices- a Collection of Vertex instances
-
getRouting
Gets the routing algorithm used when rendering this relationship.- Returns:
- a Routing instance, or null if not explicitly set
-
setRouting
Sets the routing algorithm used when rendering this relationship.- Parameters:
routing- a Routing instance, or null to not explicitly set this property
-
getPosition
public java.lang.Integer getPosition()Gets the position of the annotation along the line.- Returns:
- an integer between 0 (start of the line) to 100 (end of the line) inclusive
-
setPosition
public void setPosition(java.lang.Integer position)Sets the position of the annotation along the line.- Parameters:
position- the position, as an integer between 0 (start of the line) to 100 (end of the line) inclusive
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-