Class f_xmlDigester

Object
  extended by f_object
      extended by f_xmlDigester

public class f_xmlDigester
extends f_object

XML Digester


Method Summary
 void f_addCallMethod(String pattern, Function method, any parameters)
           
 void f_addObjectCreate(String pattern, f_class clazz, any attributeName)
           
 void f_addSetNextRule(String pattern, String name)
           
 void f_addSetProperties(String pattern, any attributes)
           
 void f_addSetProperty(String pattern, String name, String value, String name2, String value2)
           
 void f_addSetTopRule(String pattern, String name)
           
 void f_clear()
          Clear the current contents of the object stack.
 Number f_getCount(String name)
          Return the current depth of the element stack.
 any f_getRoot()
          This method allows you to access the root object that has been created after parsing.
 boolean f_isEmpty(String name)
          Is the stack with the given name empty?
 any f_parse(Object source)
          Parse the content of the specified URI using this Digester.
 any f_peek(Number index, String name)
          Return the n'th object down the stack, where 0 is the top element and [getCount()-1] is the bottom element.
 any f_peekParams(Number index)
          Return the n'th object down the parameters stack, where 0 is the top element and [getCount()-1] is the bottom element.
 any f_pop(String name)
          Pops (gets and removes) the top object from the stack with the given name.
 any f_popParams()
          Pop the top object off of the parameters stack, and return it.
 void f_push(any object, String name)
          Push a new object onto the top of the object stack.
 void f_pushParams(any object)
          Push a new object onto the top of the parameters stack.
 
Methods inherited from class f_object
f_getClass, toString
 
Methods inherited from class Object
toString
 

Method Detail

f_addSetProperty

public void f_addSetProperty(String pattern,
                             String name,
                             String value,
                             String name2,
                             String value2)
Parameters:
pattern -
name -
value - (if NULL take name as value !)
name2 -
value2 -

f_isEmpty

public boolean f_isEmpty(String name)
Is the stack with the given name empty?
Note: a stack is considered empty if no objects have been pushed onto it yet.

Parameters:
name - The name of the stack whose emptiness should be evaluated.
Returns:
true if the given stack if empty

f_addSetProperties

public void f_addSetProperties(String pattern,
                               any attributes)
Parameters:
pattern -

f_addObjectCreate

public void f_addObjectCreate(String pattern,
                              f_class clazz,
                              any attributeName)
Parameters:
pattern -
clazz - f_class or a javascript class.

f_getRoot

public any f_getRoot()
This method allows you to access the root object that has been created after parsing.

Returns:
the root object that has been created after parsing or null if the digester has not parsed any XML yet.

f_getCount

public Number f_getCount(String name)
Return the current depth of the element stack.

Parameters:
name - The name of the stack whose depth should be evaluated.
Returns:
The depth of the stack.

f_push

public void f_push(any object,
                   String name)
Push a new object onto the top of the object stack.

Parameters:
object - The new object
name - Name of stack

f_addCallMethod

public void f_addCallMethod(String pattern,
                            Function method,
                            any parameters)
Parameters:
pattern -
method -
parameters -

f_clear

public void f_clear()
Clear the current contents of the object stack.

Calling this method might allow another document of the same type to be correctly parsed. However this method was not intended for this purpose. In general, a separate Digester object should be created for each document to be parsed.


f_addSetTopRule

public void f_addSetTopRule(String pattern,
                            String name)
Parameters:
pattern -
name - Name of method to call to append the second top object of the stack, to the top object.

f_pop

public any f_pop(String name)
Pops (gets and removes) the top object from the stack with the given name.
Note: a stack is considered empty if no objects have been pushed onto it yet.

Parameters:
name - Name of stack
Returns:
the top Object on the stack or or null if the stack is either empty or has not been created yet

f_popParams

public any f_popParams()
Pop the top object off of the parameters stack, and return it. If there are no objects on the stack, return null

Returns:
the top Object on the stack or or null if the stack is either empty or has not been created yet

f_pushParams

public void f_pushParams(any object)
Push a new object onto the top of the parameters stack.

Parameters:
object - The new object

f_peek

public any f_peek(Number index,
                  String name)
Return the n'th object down the stack, where 0 is the top element and [getCount()-1] is the bottom element. If the specified index is out of range, return null.

Parameters:
index - Index of the desired element, where 0 is the top of the stack, 1 is the next element down, and so on.
name - Name of stack

f_parse

public any f_parse(Object source)
Parse the content of the specified URI using this Digester. Returns the root element from the object stack (if any).

Parameters:
source - XML data to be parsed.
Returns:
Root object

f_peekParams

public any f_peekParams(Number index)
Return the n'th object down the parameters stack, where 0 is the top element and [getCount()-1] is the bottom element. If the specified index is out of range, return null.

Parameters:
index - Index of the desired element, where 0 is the top of the stack, 1 is the next element down, and so on.

f_addSetNextRule

public void f_addSetNextRule(String pattern,
                             String name)
Parameters:
pattern -
name - Name of method to call to append top object of the stack, to the previous top object.