Class NamespaceRegistry

java.lang.Object
org.opentest4j.reporting.events.api.NamespaceRegistry

public class NamespaceRegistry extends Object
Registry of namespaces for writing a document.
See Also:
  • Method Details

    • builder

      public static NamespaceRegistry.Builder builder(org.opentest4j.reporting.schema.Namespace defaultNamespace)
      Create a new builder with the supplied default namespace.
      Parameters:
      defaultNamespace - the default namespace
      Returns:
      a new builder
    • builder

      public static NamespaceRegistry.Builder builder(org.opentest4j.reporting.schema.Namespace defaultNamespace, String schemaLocation)
      Create a new builder with the supplied default namespace and schema location.
      Parameters:
      defaultNamespace - the default namespace
      schemaLocation - the schema location of the default namespace
      Returns:
      a new builder
    • getDefaultNamespace

      public org.opentest4j.reporting.schema.Namespace getDefaultNamespace()
      Get the default namespace of this registry.
      Returns:
      the default namespace
    • getAdditionalNamespaces

      public Set<org.opentest4j.reporting.schema.Namespace> getAdditionalNamespaces()
      Get additional namespaces registered with this registry.
      Returns:
      additional namespaces
    • getPrefix

      public Optional<String> getPrefix(org.opentest4j.reporting.schema.Namespace namespace)
      Get the prefix for the supplied namespace registered with this registry.
      Parameters:
      namespace - the namespace to look up the prefix for
      Returns:
      the prefix for the namespace or empty if the namespace is not as an additional namespace
    • getSchemaLocations

      public Map<org.opentest4j.reporting.schema.Namespace,String> getSchemaLocations()
      Get all schema locations registered with this registry.
      Returns:
      schema locations
    • containsUri

      public boolean containsUri(String uri)
      Check whether a namespace with the supplied URI is registered with this registry.
      Parameters:
      uri - the namespace URI to look up
      Returns:
      whether the namespace is registered