com.japisoft.fastparser.document
Class NamespaceContext

java.lang.Object
  |
  +--com.japisoft.fastparser.fio.FastVector
        |
        +--com.japisoft.fastparser.document.NamespaceContext
All Implemented Interfaces:
java.lang.Cloneable

public class NamespaceContext
extends FastVector

Context for namespace. It stores available prefix with tied namespace uri

Version:
1.0
Author:
japisoft

Constructor Summary
NamespaceContext()
           
 
Method Summary
 void addPrefixScope(java.lang.String prefix, java.lang.String uri)
          Add a current prefix for this uri
 java.lang.String currentDefaultNamespace()
           
 java.lang.String getPrefixURI(java.lang.String prefix)
           
 boolean isPrefixAvaiable(java.lang.String prefix)
           
 void popDefaultNamespace()
          Remove the last default namespace
 void pushDefaultNamespace(java.lang.String defaultNamespace)
          Reset the default namespace
 void removePrefixScope(java.lang.String prefix)
          Remove a prefix that should not be accessible
 
Methods inherited from class com.japisoft.fastparser.fio.FastVector
add, clone, contains, elements, ensureCapacity, get, indexOf, indexOf, insertElementAt, remove, removeElementAt, setSize, size, trimToSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceContext

public NamespaceContext()
Method Detail

currentDefaultNamespace

public java.lang.String currentDefaultNamespace()
Returns:
the default namespace from the attribute xmlns

pushDefaultNamespace

public void pushDefaultNamespace(java.lang.String defaultNamespace)
Reset the default namespace

Parameters:
defaultNamespace -

popDefaultNamespace

public void popDefaultNamespace()
Remove the last default namespace


addPrefixScope

public void addPrefixScope(java.lang.String prefix,
                           java.lang.String uri)
Add a current prefix for this uri


removePrefixScope

public void removePrefixScope(java.lang.String prefix)
Remove a prefix that should not be accessible


isPrefixAvaiable

public boolean isPrefixAvaiable(java.lang.String prefix)
Returns:
true if this prefix is available

getPrefixURI

public java.lang.String getPrefixURI(java.lang.String prefix)
Returns:
the URI for this prefix