moritz.eric.tallxslt
Class DataStore

java.lang.Object
  extended bymoritz.eric.tallxslt.DataStore

public class DataStore
extends java.lang.Object


Constructor Summary
DataStore()
          This is the Contructor.
 
Method Summary
 void addVar(java.lang.String name, java.lang.Object o)
          This adds a variable to the Data Store.
 void addVar(java.lang.String name, java.lang.Object[] o)
          This passes an array of objects.
 void addVar(java.lang.String name, java.lang.Object[] o, boolean isXML)
          This passes an array of objects.
 void addVar(java.lang.String name, java.lang.Object o, boolean isXML)
          This adds a variable to the Data Store.
protected  org.w3c.dom.Document getDom()
           
 void printDom()
          This prints the Dom to the System.out
 void printDom(org.w3c.dom.Document dom)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataStore

public DataStore()
          throws javax.xml.parsers.ParserConfigurationException
This is the Contructor. Please note that the indocumented public methods should not be used directly. They are used by the TallXSLT class.

Method Detail

printDom

public void printDom()
This prints the Dom to the System.out


printDom

public void printDom(org.w3c.dom.Document dom)

addVar

public void addVar(java.lang.String name,
                   java.lang.Object o)
            throws org.xml.sax.SAXException,
                   javax.xml.parsers.ParserConfigurationException,
                   java.io.IOException
This adds a variable to the Data Store.

Parameters:
name - The name of the variable. This must be a valid name for an XML Tag since XML is how the template engine stores the variables
o - The object being passed to the Data Store, currently the system doesn't support primitive values. If you need to pass a primitive value you must first create it's java object equivilent. For instance if you have an int value you must create an Integer object of that int and then pass it to this method.
Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException

addVar

public void addVar(java.lang.String name,
                   java.lang.Object o,
                   boolean isXML)
            throws org.xml.sax.SAXException,
                   javax.xml.parsers.ParserConfigurationException,
                   java.io.IOException
This adds a variable to the Data Store.

Parameters:
name - The name of the variable. This must be a valid name for an XML Tag since XML is how the template engine stores the variables
o - The object being passed to the Data Store, currently the system doesn't support primitive values. If you need to pass a primitive value you must first create it's java object equivilent. For instance if you have an int value you must create an Integer object of that int and then pass it to this method.
isXML - Treat all strings as valid XML, don't worry things will crash and burn if it isn't
Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException

addVar

public void addVar(java.lang.String name,
                   java.lang.Object[] o)
            throws org.xml.sax.SAXException,
                   javax.xml.parsers.ParserConfigurationException,
                   java.io.IOException
This passes an array of objects. The data will be represented in the XML document as a series of elements of the same name.

Parameters:
name - This is the name of the element
o - This is the array of objects
Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException

addVar

public void addVar(java.lang.String name,
                   java.lang.Object[] o,
                   boolean isXML)
            throws org.xml.sax.SAXException,
                   javax.xml.parsers.ParserConfigurationException,
                   java.io.IOException
This passes an array of objects. The data will be represented in the XML document as a series of elements of the same name.

Parameters:
name - This is the name of the element
o - This is the array of objects
isXML - Treat all strings as valid XML, don't worry things will crash and burn if it isn't
Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException

getDom

protected org.w3c.dom.Document getDom()