Class NamespaceRegistry
java.lang.Object
org.opentest4j.reporting.events.api.NamespaceRegistry
Registry of namespaces for writing a document.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic NamespaceRegistry.Builderbuilder(org.opentest4j.reporting.schema.Namespace defaultNamespace) Create a new builder with the supplied default namespace.static NamespaceRegistry.BuilderCreate a new builder with the supplied default namespace and schema location.booleancontainsUri(String uri) Check whether a namespace with the supplied URI is registered with this registry.Set<org.opentest4j.reporting.schema.Namespace> Get additional namespaces registered with this registry.org.opentest4j.reporting.schema.NamespaceGet the default namespace of this registry.getPrefix(org.opentest4j.reporting.schema.Namespace namespace) Get the prefix for the supplied namespace registered with this registry.Get all schema locations registered with this registry.
-
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 namespaceschemaLocation- 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
Get additional namespaces registered with this registry.- Returns:
- additional namespaces
-
getPrefix
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
Get all schema locations registered with this registry.- Returns:
- schema locations
-
containsUri
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
-