org.jscience.ml.gml.xml.schema
Class NamespaceResolver

java.lang.Object
  extended by org.jscience.ml.gml.xml.schema.NamespaceResolver

public class NamespaceResolver
extends java.lang.Object

Helps in resolving namespaces. Namespaces are statically maintained, so this could pose a problem for program dealing with different files and perhaps namespaces with conflicting Ids.


Method Summary
 void addNamespace(java.lang.String prefix, java.lang.String uri)
           
 java.lang.String[] getAllExpressions()
           
 java.lang.String[] getAllNamespaces()
           
 java.lang.String[] getAllPrefixes()
           
static NamespaceResolver getInstance()
          Returns an instance of this class' object.
 java.lang.String namespace(java.lang.String prefix)
           
 java.lang.String prefix(java.lang.String namespace)
           
 boolean prefixExists(java.lang.String prefix)
           
 java.lang.String resolveNamespacePrefix(java.lang.String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static NamespaceResolver getInstance()
Returns an instance of this class' object.

Returns:
DOCUMENT ME!

addNamespace

public void addNamespace(java.lang.String prefix,
                         java.lang.String uri)
Parameters:
prefix - DOCUMENT ME!
uri - DOCUMENT ME!

resolveNamespacePrefix

public java.lang.String resolveNamespacePrefix(java.lang.String prefix)
Parameters:
prefix - DOCUMENT ME!
Returns:
DOCUMENT ME!

namespace

public java.lang.String namespace(java.lang.String prefix)
Parameters:
prefix - DOCUMENT ME!
Returns:
DOCUMENT ME!

prefix

public java.lang.String prefix(java.lang.String namespace)
Parameters:
namespace - DOCUMENT ME!
Returns:
DOCUMENT ME!

prefixExists

public boolean prefixExists(java.lang.String prefix)
Parameters:
prefix - DOCUMENT ME!
Returns:
DOCUMENT ME!

getAllPrefixes

public java.lang.String[] getAllPrefixes()
Returns:
DOCUMENT ME!

getAllNamespaces

public java.lang.String[] getAllNamespaces()
Returns:
DOCUMENT ME!

getAllExpressions

public java.lang.String[] getAllExpressions()
Returns:
DOCUMENT ME!