Package org.semanticweb.owlapi.util
Class NamespaceUtil
java.lang.Object
org.semanticweb.owlapi.util.NamespaceUtil
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
NamespaceUtil
public NamespaceUtil()Default constructor.
-
-
Method Details
-
getPrefix
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
- Returns:
- namespace to prefix map
-
setPrefix
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
-