Package com.structurizr.view
Class RelationshipView
java.lang.Object
com.structurizr.view.RelationshipView
- All Implemented Interfaces:
Comparable<RelationshipView>
This class represents an instance of a Relationship on a View.
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(RelationshipView relationshipView) boolean
Gets the description of this relationship (used in dynamic views only).getId()
Gets the ID of the relationship this RelationshipView represents.getOrder()
Gets the order of this relationship (used in dynamic views only; e.g.Gets the position of the annotation along the line.Gets the relationship that this RelationshipView represents.Gets the routing algorithm used when rendering this relationship.getUrl()
Gets the URL where more information about this relationship instance can be found.Gets the set of vertices used to render the relationship.int
hashCode()
Gets whether this relationship view represents a response (used in dynamic views only).void
setPosition
(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
Sets the URL where more information about this relationship instance can be found.void
setVertices
(Collection<Vertex> vertices) Sets the collection of vertices used when rendering this relationship.toString()
-
Method Details
-
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
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
-
getUrl
Gets the URL where more information about this relationship instance can be found.- Returns:
- a URL as a String
-
setUrl
Sets the URL where more information about this relationship instance can be found.- Parameters:
url
- the URL as a String- Throws:
IllegalArgumentException
- if the URL is not a well-formed URL
-
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
-
isResponse
Gets whether this relationship view represents a response (used in dynamic views only).- Returns:
- true if a response, false or null otherwise
-
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
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
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
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<RelationshipView>
-