DTD2Java API

ch.perseguers.xml.dtd.util
Class ExampleGenerator

java.lang.Object
  extended bych.perseguers.xml.dtd.util.ExampleGenerator
All Implemented Interfaces:
UtilConstants

public class ExampleGenerator
extends java.lang.Object
implements UtilConstants


Field Summary
 java.util.Hashtable matchClassName
           
 
Fields inherited from interface ch.perseguers.xml.dtd.util.UtilConstants
CLASS_PREFIX_NAME, DTD2JAVA_RESERVED, FILE_SEP, JAVA_15_RESERVED, JAVA_RESERVED, MATCH_PREFIX_METHOD_NAME, MULT_CLASS_ONE, MULT_CLASS_ZERO_ONE, MULT_ONE_VECTOR, MULT_VECTOR, RESERVED_WORDS, TAB, TAB2, TAB3, TAB4, TAB5, TAB6
 
Constructor Summary
ExampleGenerator()
          Constructor, setting package name to , DTD document to use to null and output directory to uninitialized.
 
Method Summary
 void generateExample()
          Generate an example file named .java in the outputDirectory.
 void setNoMethodSave(boolean state)
          Do not generate method save for classes.
 void setOutputDirectory(java.lang.String outputDirectory)
          Set the output directory for the generated example file.
 void setOutputFileName(java.lang.String outputFileName)
          Set the output filename for the generated example file.
 void setPackageName(java.lang.String packageName)
          Set the name of the package to use for the class.
 void setParserClass(java.lang.String parserClass)
          Set the name of the parser class for the JavaCC generated file.
 void setRootElement(java.lang.String rootElement)
          Set the DTD root element to use.
 void setVerbose(boolean mode)
          Activate or Deactivate the verbose mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matchClassName

public java.util.Hashtable matchClassName
Constructor Detail

ExampleGenerator

public ExampleGenerator()
Constructor, setting package name to , DTD document to use to null and output directory to uninitialized. Verbose is deactivated.

Method Detail

setVerbose

public void setVerbose(boolean mode)
Activate or Deactivate the verbose mode.

Parameters:
mode - activates verbose
deactivates verbose

setParserClass

public void setParserClass(java.lang.String parserClass)
Set the name of the parser class for the JavaCC generated file.

Parameters:
parserClass - Name of the parser class

setPackageName

public void setPackageName(java.lang.String packageName)
Set the name of the package to use for the class.

Parameters:
packageName - Name of the package

setOutputDirectory

public void setOutputDirectory(java.lang.String outputDirectory)
Set the output directory for the generated example file.

Parameters:
outputDirectory - Name of the directory

setRootElement

public void setRootElement(java.lang.String rootElement)
Set the DTD root element to use.

Parameters:
rootElement - Root element name to use for generation

setNoMethodSave

public void setNoMethodSave(boolean state)
Do not generate method save for classes.

Parameters:
state - TRUE for not generating method save

setOutputFileName

public void setOutputFileName(java.lang.String outputFileName)
Set the output filename for the generated example file.

Parameters:
outputFileName - Name of the example file

generateExample

public void generateExample()
                     throws java.io.IOException
Generate an example file named .java in the outputDirectory.

Throws:
java.io.IOException

DTD2Java API

Copyright © 2003-2004 - Perseguers Software Services perseguers.ch