schema2template.model
Class NamespaceDictionary

java.lang.Object
  extended by schema2template.model.NamespaceDictionary

public class NamespaceDictionary
extends Object

Translation NS URI <-> NS Localname


Constructor Summary
NamespaceDictionary()
          Construct a new empty dictionary
 
Method Summary
 String getLocalNamespace(String nsUri)
          Translate URI to local namespace
 String getNamespaceURI(String nsLocal)
          Translate local namespace to URI
static NamespaceDictionary getStandardDictionary()
          Construct an example dictionary as needed by the OpenDocument schema file
 void put(String nsLocal, String nsUri)
          Register a new translation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceDictionary

public NamespaceDictionary()
Construct a new empty dictionary

Method Detail

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


Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.