Package schema2template.model
Class NamespaceDictionary
- java.lang.Object
-
- schema2template.model.NamespaceDictionary
-
public class NamespaceDictionary extends Object
Translation NS URI <-> NS Localname
-
-
Constructor Summary
Constructors Constructor Description NamespaceDictionary()
Construct a new empty dictionary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLocalNamespace(String nsUri)
Translate URI to local namespaceString
getNamespaceURI(String nsLocal)
Translate local namespace to URIstatic NamespaceDictionary
getStandardDictionary()
Construct an example dictionary as needed by the OpenDocument schema filevoid
put(String nsLocal, String nsUri)
Register a new translation
-
-
-
Method Detail
-
put
public void put(String nsLocal, String nsUri)
Register a new translation- Parameters:
nsLocal
- short namespacensUri
- 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
-
-