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 boolean
equals(java.lang.Object o)
java.lang.String
getDescription()
Gets the description of this relationship (used in dynamic views only).java.lang.String
getId()
Gets the ID of the relationship this RelationshipView represents.java.lang.String
getOrder()
Gets the order of this relationship (used in dynamic views only; e.g.java.lang.Integer
getPosition()
Gets the position of the annotation along the line.Relationship
getRelationship()
Gets the relationship that this RelationshipView represents.Routing
getRouting()
Gets the routing algorithm used when rendering this relationship.java.util.Collection<Vertex>
getVertices()
Gets the set of vertices used to render the relationship.int
hashCode()
void
setDescription(java.lang.String description)
Sets the description of this relationship (used in dynamic views only).void
setOrder(java.lang.String order)
Sets the order of this relationship (used in dynamic views only; e.g.void
setPosition(java.lang.Integer position)
Sets the position of the annotation along the line.void
setRouting(Routing routing)
Sets the routing algorithm used when rendering this relationship.void
setVertices(java.util.Collection<Vertex> vertices)
Sets the collection of vertices used when rendering this relationship.java.lang.String
toString()
-
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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-