com.tyenki.tree
Class TreeGenerator

java.lang.Object
  extended by com.tyenki.tree.TreeGenerator

public class TreeGenerator
extends Object

Generates trees from the specified XML instance and configuration.

Version:
20 February 2009
Author:
Christophe Lauret

Constructor Summary
TreeGenerator(File config, TreeFormat format)
          Creates a new Tree generator from the specified configuration.
 
Method Summary
 void generate(File in, File out, String id)
          Generate the tree on the specified output from the specified input using this instance configuration and tree format.
 void generate(File in, File out, String id, Map<String,String> params)
          Generate the tree on the specified output from the specified input using this instance configuration and tree format.
 void generate(Reader in, Writer out, String id)
          Generate the tree on the specified output from the specified input using this instance configuration and tree format.
 void generate(Reader in, Writer out, String id, Map<String,String> params)
          Generate the tree on the specified output from the specified input using this instance configuration and tree format.
 void generate(Source source, Result result, String id)
          Generate the tree on the specified output from the specified input using this instance configuration and tree format.
 void generate(Source source, Result result, String id, Map<String,String> params)
          Generate the tree on the specified output from the specified input using this instance configuration and tree format.
 File getTreeConfig()
          Returns the XML tree configuration file.
 TreeFormat getTreeFormat()
          Returns the tree format for this generator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeGenerator

public TreeGenerator(File config,
                     TreeFormat format)
Creates a new Tree generator from the specified configuration.

Parameters:
config - The configuration.
format - The tree format to use.
Method Detail

getTreeFormat

public TreeFormat getTreeFormat()
Returns the tree format for this generator.

Returns:
The tree format for this generator.

getTreeConfig

public File getTreeConfig()
Returns the XML tree configuration file.

Returns:
The XML tree configuration file.

generate

public void generate(File in,
                     File out,
                     String id)
              throws Exception
Generate the tree on the specified output from the specified input using this instance configuration and tree format.

Parameters:
in - A reader to an XML document to transform into a tree.
out - A writer to receive the tree.
id - The ID of the tree to build.
Throws:
Exception

generate

public void generate(File in,
                     File out,
                     String id,
                     Map<String,String> params)
              throws Exception
Generate the tree on the specified output from the specified input using this instance configuration and tree format.

Parameters:
in - A reader to an XML document to transform into a tree.
out - A writer to receive the tree.
id - The ID of the tree to build.
Throws:
Exception

generate

public void generate(Reader in,
                     Writer out,
                     String id)
              throws Exception
Generate the tree on the specified output from the specified input using this instance configuration and tree format.

Parameters:
in - A reader to an XML document to transform into a tree.
out - A writer to receive the tree.
id - The ID of the tree to build.
Throws:
Exception

generate

public void generate(Reader in,
                     Writer out,
                     String id,
                     Map<String,String> params)
              throws Exception
Generate the tree on the specified output from the specified input using this instance configuration and tree format.

Parameters:
in - A reader to an XML document to transform into a tree.
out - A writer to receive the tree.
id - The ID of the tree to build.
params - The parameters to pass to the tree.
Throws:
Exception

generate

public void generate(Source source,
                     Result result,
                     String id)
              throws Exception
Generate the tree on the specified output from the specified input using this instance configuration and tree format.

Parameters:
source - A reader to an XML document to transform into a tree.
result - A writer to receive the tree.
id - The ID of the tree to build.
Throws:
Exception

generate

public void generate(Source source,
                     Result result,
                     String id,
                     Map<String,String> params)
              throws Exception
Generate the tree on the specified output from the specified input using this instance configuration and tree format.

Parameters:
source - A reader to an XML document to transform into a tree.
result - A writer to receive the tree.
id - The ID of the tree to build.
params - The parameters to pass to the tree.
Throws:
Exception