Class NamespaceUtil

java.lang.Object
org.semanticweb.owlapi.util.NamespaceUtil
All Implemented Interfaces:
Serializable

public class NamespaceUtil extends Object implements Serializable
A utility class which can generate namespaces, local names and namespace prefixes in accordance with the XML specifications.
Since:
2.0.0
Author:
Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
See Also:
  • Constructor Details

    • NamespaceUtil

      public NamespaceUtil()
      Default constructor.
  • Method Details

    • getPrefix

      public String getPrefix(String namespace)
      Gets a prefix for the given namespace. If a mapping has not been specified then a prefix will be computed and stored for the specified namespace.
      Parameters:
      namespace - The namespace whose prefix is to be retrieved.
      Returns:
      The prefix for the specified namespace.
    • getNamespace2PrefixMap

      public Map<String,String> getNamespace2PrefixMap()
      Returns:
      namespace to prefix map
    • setPrefix

      public void setPrefix(String namespace, String prefix)
      Sets the prefix for the specified namespace. This will override any computed prefix and take precedence over any computed prefix.
      Parameters:
      namespace - The namespace whose prefix is to be set.
      prefix - The prefix for the namespace