Package com.structurizr.dsl
Class IdentifiersRegister
java.lang.Object
com.structurizr.dsl.IdentifiersRegister
A register of elements and relationships that were created with an identifier in the DSL.
-
Method Summary
Modifier and TypeMethodDescriptionfindIdentifier(com.structurizr.model.Element element) Finds the identifier used when defining an element.findIdentifier(com.structurizr.model.Relationship relationship) Finds the identifier used when defining a relationship.com.structurizr.model.ElementgetElement(String identifier) Gets the element identified by the specified identifier.Gets the set of element identifiers.com.structurizr.model.RelationshipgetRelationship(String identifier) Gets the relationship identified by the specified identifier.Gets the set of relationship identifiers.
-
Method Details
-
getElementIdentifiers
Gets the set of element identifiers.- Returns:
- a Set of String identifiers
-
getRelationshipIdentifiers
Gets the set of relationship identifiers.- Returns:
- a Set of String identifiers
-
getElement
Gets the element identified by the specified identifier.- Parameters:
identifier- a String identifier- Returns:
- an Element, or null if one doesn't exist
-
getRelationship
Gets the relationship identified by the specified identifier.- Parameters:
identifier- a String identifier- Returns:
- a Relationship, or null if one doesn't exist
-
findIdentifier
Finds the identifier used when defining an element.- Parameters:
element- an Element instance- Returns:
- a String identifier (could be null if no identifier was explicitly specified)
-
findIdentifier
Finds the identifier used when defining a relationship.- Parameters:
relationship- a Relationship instance- Returns:
- a String identifier (could be null if no identifier was explicitly specified, or for implied relationships)
-