org.apache.axiom.c14n.impl
Class NameSpaceSymbTable

java.lang.Object
  extended by org.apache.axiom.c14n.impl.NameSpaceSymbTable

public class NameSpaceSymbTable
extends Object

A stack based Symble Table.
For speed reasons all the symbols are introduced in the same map, and at the same time in a list so it can be removed when the frame is pop back.


Constructor Summary
NameSpaceSymbTable()
          Default constractor
 
Method Summary
 boolean addMapping(String prefix, String uri, Attr n)
          Adds the mapping for a prefix.
 Node addMappingAndRender(String prefix, String uri, Attr n)
          Adds a definition and mark it as render.
 int getLevel()
           
 Attr getMapping(String prefix)
          Gets the attribute node that defines the binding for the prefix.
 Attr getMappingWithoutRendered(String prefix)
          Gets a definition without mark it as render.
 void getUnrenderedNodes(Collection result)
          Get all the unrendered nodes in the name space.
 void outputNodePop()
          Pop a frame for visible namespace.
 void outputNodePush()
          Push a frame for visible namespace.
 void pop()
          Pop a frame.
 void push()
          Push a frame for a node.
 void removeMapping(String prefix)
           
 void removeMappingIfNotRender(String prefix)
           
 boolean removeMappingIfRender(String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameSpaceSymbTable

public NameSpaceSymbTable()
Default constractor

Method Detail

getUnrenderedNodes

public void getUnrenderedNodes(Collection result)
Get all the unrendered nodes in the name space. For Inclusive rendering

Parameters:
result - the list where to fill the unrendered xmlns definitions.

outputNodePush

public void outputNodePush()
Push a frame for visible namespace. For Inclusive rendering.


outputNodePop

public void outputNodePop()
Pop a frame for visible namespace.


push

public void push()
Push a frame for a node. Inclusive or Exclusive.


pop

public void pop()
Pop a frame. Inclusive or Exclusive.


getMapping

public Attr getMapping(String prefix)
Gets the attribute node that defines the binding for the prefix.

Parameters:
prefix - the prefix to obtain the attribute.
Returns:
null if there is no need to render the prefix. Otherwise the node of definition.

getMappingWithoutRendered

public Attr getMappingWithoutRendered(String prefix)
Gets a definition without mark it as render. For render in exclusive main.java.org.apache.axiom.c14n.impl the namespaces in the include prefixes.

Parameters:
prefix - The prefix whose definition is neaded.
Returns:
the attr to render, null if there is no need to render

addMapping

public boolean addMapping(String prefix,
                          String uri,
                          Attr n)
Adds the mapping for a prefix.

Parameters:
prefix - the prefix of definition
uri - the Uri of the definition
n - the attribute that have the definition
Returns:
true if there is already defined.

addMappingAndRender

public Node addMappingAndRender(String prefix,
                                String uri,
                                Attr n)
Adds a definition and mark it as render. For inclusive main.java.org.apache.axiom.c14n.impl.

Parameters:
prefix - the prefix of definition
uri - the Uri of the definition
n - the attribute that have the definition
Returns:
the attr to render, null if there is no need to render

getLevel

public int getLevel()

removeMapping

public void removeMapping(String prefix)

removeMappingIfNotRender

public void removeMappingIfNotRender(String prefix)

removeMappingIfRender

public boolean removeMappingIfRender(String prefix)


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.