org.enhydra.apache.xerces.utils
Class NamespacesScope

java.lang.Object
  |
  +--org.enhydra.apache.xerces.utils.NamespacesScope

public class NamespacesScope
extends Object

NamespacesScope provides a data structure for mapping namespace prefixes to their URI's. The mapping accurately reflects the scoping of namespaces at a particular instant in time.


Inner Class Summary
static interface NamespacesScope.NamespacesHandler
          NamespacesHandler allows a client to be notified when namespace scopes change
 
Constructor Summary
NamespacesScope()
           
NamespacesScope(NamespacesScope.NamespacesHandler handler)
           
NamespacesScope(NamespacesScope.NamespacesHandler handler, int elemDepth, int[][] map)
           
 
Method Summary
 Object clone()
           
 void decreaseDepth()
          Remove a namespace mappng
 int getNamespaceForPrefix(int prefix)
          retreive the namespace URI for a prefix
 void increaseDepth()
          Add a new namespace mapping
 void setNamespaceForPrefix(int prefix, int namespace)
          set the namespace URI for given prefix
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespacesScope

public NamespacesScope()

NamespacesScope

public NamespacesScope(NamespacesScope.NamespacesHandler handler)

NamespacesScope

public NamespacesScope(NamespacesScope.NamespacesHandler handler,
                       int elemDepth,
                       int[][] map)
Method Detail

setNamespaceForPrefix

public void setNamespaceForPrefix(int prefix,
                                  int namespace)
                           throws Exception
set the namespace URI for given prefix
Parameters:
prefix - the StringPool handler of the prefix
namespace - the StringPool handle of the namespace URI

getNamespaceForPrefix

public int getNamespaceForPrefix(int prefix)
retreive the namespace URI for a prefix
Parameters:
prefix - the StringPool handle of the prefix

increaseDepth

public void increaseDepth()
                   throws Exception
Add a new namespace mapping

decreaseDepth

public void decreaseDepth()
                   throws Exception
Remove a namespace mappng

clone

public Object clone()
Overrides:
clone in class Object


Copyright © 1999 The Apache Software Foundation. All Rights reserved.