Class WellKnown

java.lang.Object
dev.metaschema.core.qname.WellKnown

public final class WellKnown extends Object
Maintains a mapping between well known namespace URIs and associated prefixes.
  • Method Details

    • getWellKnownPrefixesToNamespaces

      @NonNull @Deprecated(since="2.2.0", forRemoval=true) public static Map<String,String> getWellKnownPrefixesToNamespaces()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the mapping of prefix to namespace URI for all well-known namespaces provided by default to the static context.

      This method has been deprecated. It is generally preferred to call getWellKnownUriForPrefix(String) instead.

      Returns:
      the mapping of prefix to namespace URI for all well-known namespaces
    • getWellKnownURIsToPrefixes

      @NonNull @Deprecated(since="2.2.0", forRemoval=true) public static Map<String,String> getWellKnownURIsToPrefixes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the mapping of namespace URIs to prefixes for all well-known namespaces provided by default to the static context.

      This method has been deprecated. It is generally preferred to call getWellKnownPrefixForUri(String) instead.

      Returns:
      the mapping of namespace URI to prefix for all well-known namespaces
    • getWellKnownPrefixForUri

      @Nullable public static String getWellKnownPrefixForUri(@NonNull String uri)
      Get the namespace prefix associated with the provided URI, if the URI is well-known.
      Parameters:
      uri - the URI to get the prefix for
      Returns:
      the prefix or null if the provided URI is not well-known
    • getWellKnownUriForPrefix

      @Nullable public static String getWellKnownUriForPrefix(@NonNull String prefix)
      Get the namespace associated with the provided prefix, if the prefix is well-known.
      Parameters:
      prefix - the prefix
      Returns:
      the URI associated with the prefix or null if the provided prefix is not well-known