org.coode.xml
Class XMLWriterNamespaceManager

java.lang.Object
  extended by org.coode.xml.XMLWriterNamespaceManager
Direct Known Subclasses:
OWLOntologyXMLNamespaceManager

public class XMLWriterNamespaceManager
extends java.lang.Object

Author: Matthew Horridge
The University Of Manchester
Medical Informatics Group
Date: 30-May-2006

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm

Developed as part of the CO-ODE project http://www.co-ode.org


Constructor Summary
XMLWriterNamespaceManager(java.lang.String defaultNamespace)
           
 
Method Summary
 void addWellKnownNamespace(java.lang.String prefix, java.lang.String namespace)
           
 void createPrefixForNamespace(java.lang.String namespace)
           
 java.lang.String getDefaultNamespace()
           
 java.lang.String getDefaultPrefix()
          Search for a prefix other than "" for the default namespace
 java.lang.String getNamespaceForPrefix(java.lang.String prefix)
           
 java.util.Set<java.lang.String> getNamespaces()
           
 java.util.Set<java.lang.String> getPrefixes()
           
 java.lang.String getPrefixForNamespace(java.lang.String namespace)
           
 java.util.Map<java.lang.String,java.lang.String> getPrefixNamespaceMap()
           
 java.lang.String getQName(java.lang.String name)
           
 void setDefaultNamespace(java.lang.String namespace)
           
 void setPrefix(java.lang.String prefix, java.lang.String namespace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLWriterNamespaceManager

public XMLWriterNamespaceManager(java.lang.String defaultNamespace)
Method Detail

addWellKnownNamespace

public void addWellKnownNamespace(java.lang.String prefix,
                                  java.lang.String namespace)

setPrefix

public void setPrefix(java.lang.String prefix,
                      java.lang.String namespace)

getPrefixForNamespace

public java.lang.String getPrefixForNamespace(java.lang.String namespace)

setDefaultNamespace

public void setDefaultNamespace(java.lang.String namespace)

getNamespaceForPrefix

public java.lang.String getNamespaceForPrefix(java.lang.String prefix)

getQName

public java.lang.String getQName(java.lang.String name)

createPrefixForNamespace

public void createPrefixForNamespace(java.lang.String namespace)

getDefaultNamespace

public java.lang.String getDefaultNamespace()

getPrefixes

public java.util.Set<java.lang.String> getPrefixes()

getNamespaces

public java.util.Set<java.lang.String> getNamespaces()

getPrefixNamespaceMap

public java.util.Map<java.lang.String,java.lang.String> getPrefixNamespaceMap()

getDefaultPrefix

public java.lang.String getDefaultPrefix()
Search for a prefix other than "" for the default namespace

Returns:
the first prefix found for the default namespace that is not ""