com.lowagie.text.pdf

Class XfaForm.Xml2Som

public static class XfaForm.Xml2Som extends Object

A class for some basic SOM processing.
Field Summary
protected intanform
A temporary store for the repetition count.
protected HashMapinverseSearch
The data to do a search from the bottom hierarchy.
protected HashMapname2Node
The mapping of full names to nodes.
protected ArrayListorder
The order the names appear in the XML, depth first.
protected XfaForm.Stack2stack
A stack to be used when parsing.
Method Summary
static StringescapeSom(String s)
Escapes a SOM string fragment replacing "." with "\.".
HashMapgetInverseSearch()
Gets the data to do a search from the bottom hierarchy.
HashMapgetName2Node()
Gets the mapping of full names to nodes.
ArrayListgetOrder()
Gets the order the names appear in the XML, depth first.
static StringgetShortName(String s)
Gets the name with the #subform removed.
voidinverseSearchAdd(String unstack)
Adds a SOM name to the search node chain.
static voidinverseSearchAdd(HashMap inverseSearch, XfaForm.Stack2 stack, String unstack)
Adds a SOM name to the search node chain.
StringinverseSearchGlobal(ArrayList parts)
Searches the SOM hierarchy from the bottom.
protected StringprintStack()
Outputs the stack as the sequence of elements separated by '.'.
voidsetInverseSearch(HashMap inverseSearch)
Sets the data to do a search from the bottom hierarchy.
voidsetName2Node(HashMap name2Node)
Sets the mapping of full names to nodes.
voidsetOrder(ArrayList order)
Sets the order the names appear in the XML, depth first
static XfaForm.Stack2splitParts(String name)
Splits a SOM name in the individual parts.
static StringunescapeSom(String s)
Unescapes a SOM string fragment replacing "\." with ".".

Field Detail

anform

protected int anform
A temporary store for the repetition count.

inverseSearch

protected HashMap inverseSearch
The data to do a search from the bottom hierarchy.

name2Node

protected HashMap name2Node
The mapping of full names to nodes.

order

protected ArrayList order
The order the names appear in the XML, depth first.

stack

protected XfaForm.Stack2 stack
A stack to be used when parsing.

Method Detail

escapeSom

public static String escapeSom(String s)
Escapes a SOM string fragment replacing "." with "\.".

Parameters: s the unescaped string

Returns: the escaped string

getInverseSearch

public HashMap getInverseSearch()
Gets the data to do a search from the bottom hierarchy.

Returns: the data to do a search from the bottom hierarchy

getName2Node

public HashMap getName2Node()
Gets the mapping of full names to nodes.

Returns: the mapping of full names to nodes

getOrder

public ArrayList getOrder()
Gets the order the names appear in the XML, depth first.

Returns: the order the names appear in the XML, depth first

getShortName

public static String getShortName(String s)
Gets the name with the #subform removed.

Parameters: s the long name

Returns: the short name

inverseSearchAdd

public void inverseSearchAdd(String unstack)
Adds a SOM name to the search node chain.

Parameters: unstack the SOM name

inverseSearchAdd

public static void inverseSearchAdd(HashMap inverseSearch, XfaForm.Stack2 stack, String unstack)
Adds a SOM name to the search node chain.

Parameters: inverseSearch the start point stack the stack with the separated SOM parts unstack the full name

inverseSearchGlobal

public String inverseSearchGlobal(ArrayList parts)
Searches the SOM hierarchy from the bottom.

Parameters: parts the SOM parts

Returns: the full name or null if not found

printStack

protected String printStack()
Outputs the stack as the sequence of elements separated by '.'.

Returns: the stack as the sequence of elements separated by '.'

setInverseSearch

public void setInverseSearch(HashMap inverseSearch)
Sets the data to do a search from the bottom hierarchy.

Parameters: inverseSearch the data to do a search from the bottom hierarchy

setName2Node

public void setName2Node(HashMap name2Node)
Sets the mapping of full names to nodes.

Parameters: name2Node the mapping of full names to nodes

setOrder

public void setOrder(ArrayList order)
Sets the order the names appear in the XML, depth first

Parameters: order the order the names appear in the XML, depth first

splitParts

public static XfaForm.Stack2 splitParts(String name)
Splits a SOM name in the individual parts.

Parameters: name the full SOM name

Returns: the split name

unescapeSom

public static String unescapeSom(String s)
Unescapes a SOM string fragment replacing "\." with ".".

Parameters: s the escaped string

Returns: the unescaped string