Class IdentifiersRegister

java.lang.Object
com.structurizr.dsl.IdentifiersRegister

public class IdentifiersRegister extends Object
A register of elements and relationships that were created with an identifier in the DSL.
  • Method Details

    • getElementIdentifiers

      public Set<String> getElementIdentifiers()
      Gets the set of element identifiers.
      Returns:
      a Set of String identifiers
    • getRelationshipIdentifiers

      public Set<String> getRelationshipIdentifiers()
      Gets the set of relationship identifiers.
      Returns:
      a Set of String identifiers
    • getElement

      public com.structurizr.model.Element getElement(String identifier)
      Gets the element identified by the specified identifier.
      Parameters:
      identifier - a String identifier
      Returns:
      an Element, or null if one doesn't exist
    • getRelationship

      public com.structurizr.model.Relationship getRelationship(String identifier)
      Gets the relationship identified by the specified identifier.
      Parameters:
      identifier - a String identifier
      Returns:
      a Relationship, or null if one doesn't exist
    • findIdentifier

      public String findIdentifier(com.structurizr.model.Element element)
      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

      public String findIdentifier(com.structurizr.model.Relationship relationship)
      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)