Class 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 Detail

      • QNameRegistry

        public QNameRegistry()
        PUBLIC: Creates an empty registry.
    • 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.