Package net.ontopia.topicmaps.utils
Class QNameRegistry
- java.lang.Object
-
- net.ontopia.topicmaps.utils.QNameRegistry
-
public class QNameRegistry extends Object
PUBLIC: A utility class for producing full URIs from QNames. Allows QName prefixes to be registered, and has a set of predefined QName prefixes. Also allows topics to be looked up, via the QNameLookup class.- Since:
- 5.0.0
-
-
Constructor Summary
Constructors Constructor Description QNameRegistry()
PUBLIC: Creates an empty registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QNameLookup
getLookup(TopicMapIF topicmap)
PUBLIC: Returns a QNameLookup object bound to a specific topic map.void
registerPrefix(String prefix, String uri)
PUBLIC: Registers a new prefix.LocatorIF
resolve(String qname)
PUBLIC: Creates a locator from a QName.
-
-
-
Method Detail
-
registerPrefix
public void registerPrefix(String prefix, String uri)
PUBLIC: Registers a new prefix.
-
resolve
public LocatorIF resolve(String qname)
PUBLIC: Creates a locator from a QName.- Throws:
OntopiaRuntimeException
- if the syntax is incorrect, the prefix is not bound, or the resulting locator is not a valid URI.
-
getLookup
public QNameLookup getLookup(TopicMapIF topicmap)
PUBLIC: Returns a QNameLookup object bound to a specific topic map.
-
-