Class NamespaceDictionary

java.lang.Object
schema2template.grammar.NamespaceDictionary

public class NamespaceDictionary extends Object
Translation NS URI <-> NS Localname
  • Constructor Details

    • NamespaceDictionary

      public NamespaceDictionary()
      Construct a new empty dictionary
  • Method Details

    • put

      public void put(String nsLocal, String nsUri)
      Register a new translation
      Parameters:
      nsLocal - short namespace
      nsUri - namespace URI
    • getNamespaceURI

      public String getNamespaceURI(String nsLocal)
      Translate local namespace to URI
      Parameters:
      nsLocal - short namespace
      Returns:
      namespace URI
    • getLocalNamespace

      public String getLocalNamespace(String nsUri)
      Translate URI to local namespace
      Parameters:
      nsUri - namespace URI
      Returns:
      short namespace
    • getStandardDictionary

      public static NamespaceDictionary getStandardDictionary()
      Construct an example dictionary as needed by the OpenDocument schema file
      Returns:
      namespace Dictionary