APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.security.c14n.implementations

public Class NameSpaceSymbTable

Additional top-level classes in compilation unit: NameSpaceSymbEntry, SymbMap.

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collection, .List, org.w3c.dom.Attr, .Node

A stack based Symbol 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.

Field Summary

Modifier and TypeField and Description
private boolean
private static final SymbMap
private final List<SymbMap>
level

The stacks for removing the definitions when doing pop.

private static final Logger
private SymbMap
symb

The map between prefix-> entry table.

private static final String

Constructor Summary

AccessConstructor and Description
public
NameSpaceSymbTable()

Default constructor

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if there is already defined.
addMapping
(String
the prefix of definition
prefix
,
String
the Uri of the definition
uri
,
Attr
the attribute that have the definition
n
)

Adds the mapping for a prefix.

public Node

Returns:

the attr to render, null if there is no need to render
addMappingAndRender
(String
the prefix of definition
prefix
,
String
the Uri of the definition
uri
,
Attr
the attribute that have the definition
n
)

Adds a definition and mark it as render.

public int
public Attr

Returns:

null if there is no need to render the prefix. Otherwise the node of definition.
getMapping
(String
the prefix to obtain the attribute.
prefix
)

Gets the attribute node that defines the binding for the prefix.

public Attr

Returns:

the attr to render, null if there is no need to render
getMappingWithoutRendered
(String
The prefix whose definition is needed.
prefix
)

Gets a definition without mark it as render.

public void
getUnrenderedNodes(Collection<Attr>
the list where to fill the unrendered xmlns definitions.
result
)

Get all the unrendered nodes in the name space.

pack-priv final void
public void
outputNodePop()

Pop a frame for visible namespace.

public void
outputNodePush()

Push a frame for visible namespace.

public void
pop()

Pop a frame.

public void
push()

Push a frame for a node.

public void
public void
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clonedback to summary
private boolean cloned
initialMapback to summary
private static final SymbMap initialMap
levelback to summary
private final List<SymbMap> level

The stacks for removing the definitions when doing pop.

LOGback to summary
private static final Logger LOG
symbback to summary
private SymbMap symb

The map between prefix-> entry table.

XMLNSback to summary
private static final String XMLNS

Constructor Detail

NameSpaceSymbTableback to summary
public NameSpaceSymbTable()

Default constructor

Method Detail

addMappingback to summary
public boolean addMapping(String prefix, String uri, Attr n)

Adds the mapping for a prefix.

Parameters
prefix:String

the prefix of definition

uri:String

the Uri of the definition

n:Attr

the attribute that have the definition

Returns:boolean

true if there is already defined.

addMappingAndRenderback to summary
public Node addMappingAndRender(String prefix, String uri, Attr n)

Adds a definition and mark it as render. For inclusive c14n.

Parameters
prefix:String

the prefix of definition

uri:String

the Uri of the definition

n:Attr

the attribute that have the definition

Returns:Node

the attr to render, null if there is no need to render

getLevelback to summary
public int getLevel()
getMappingback to summary
public Attr getMapping(String prefix)

Gets the attribute node that defines the binding for the prefix.

Parameters
prefix:String

the prefix to obtain the attribute.

Returns:Attr

null if there is no need to render the prefix. Otherwise the node of definition.

getMappingWithoutRenderedback to summary
public Attr getMappingWithoutRendered(String prefix)

Gets a definition without mark it as render. For render in exclusive c14n the namespaces in the include prefixes.

Parameters
prefix:String

The prefix whose definition is needed.

Returns:Attr

the attr to render, null if there is no need to render

getUnrenderedNodesback to summary
public void getUnrenderedNodes(Collection<Attr> result)

Get all the unrendered nodes in the name space. For Inclusive rendering

Parameters
result:Collection<Attr>

the list where to fill the unrendered xmlns definitions.

needsCloneback to summary
pack-priv final void needsClone()
outputNodePopback to summary
public void outputNodePop()

Pop a frame for visible namespace.

outputNodePushback to summary
public void outputNodePush()

Push a frame for visible namespace. For Inclusive rendering.

popback to summary
public void pop()

Pop a frame. Inclusive or Exclusive.

pushback to summary
public void push()

Push a frame for a node. Inclusive or Exclusive.

removeMappingback to summary
public void removeMapping(String prefix)
removeMappingIfNotRenderback to summary
public void removeMappingIfNotRender(String prefix)
removeMappingIfRenderback to summary
public boolean removeMappingIfRender(String prefix)