net.ontopia.topicmaps.utils
Class QNameRegistry

java.lang.Object
  extended by net.ontopia.topicmaps.utils.QNameRegistry

public class QNameRegistry
extends java.lang.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
QNameRegistry()
          PUBLIC: Creates an empty registry.
 
Method Summary
 QNameLookup getLookup(TopicMapIF topicmap)
          PUBLIC: Returns a QNameLookup object bound to a specific topic map.
 void registerPrefix(java.lang.String prefix, java.lang.String uri)
          PUBLIC: Registers a new prefix.
 LocatorIF resolve(java.lang.String qname)
          PUBLIC: Creates a locator from a QName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QNameRegistry

public QNameRegistry()
PUBLIC: Creates an empty registry.

Method Detail

registerPrefix

public void registerPrefix(java.lang.String prefix,
                           java.lang.String uri)
PUBLIC: Registers a new prefix.


resolve

public LocatorIF resolve(java.lang.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.



Copyright © 2000-2012 Ontopia.