oracle.xml.classgen
Class DTDClassGenerator

java.lang.Object
  |
  +--oracle.xml.classgen.DTDClassGenerator

public class DTDClassGenerator
extends java.lang.Object

This class is used by the DTD compiler to generate classes


Constructor Summary
DTDClassGenerator()
          Default constructor for DTDClassGenerator.
 
Method Summary
TypeMethod
 void generate(DTD dtd, java.lang.String doctype)
          Traverses the DTD with element doctype as root and generates Java classes
 void setGenerateComments(boolean comments)
          Switch to determine whether to generate java doc comments
Default - TRUE
 void setJavaPackage(java.util.Vector packageName)
          Sets the package for the classes generated
Default - No package
 void setOutputDirectory(java.lang.String dir)
          Sets the output directory where the java source code for the DTD are generated.
 void setSerializationMode(boolean yes)
          Switch to determine if the DTD should be saved as a serialized object or as text file.
 void setValidationMode(boolean yes)
          Switch to determine whether the classes generated should validate the XML Document being constructed
Default - TRUE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTDClassGenerator

public DTDClassGenerator()
Default constructor for DTDClassGenerator.
Method Detail

setGenerateComments

public void setGenerateComments(boolean comments)
Switch to determine whether to generate java doc comments
Default - TRUE
Parameters:
comments - boolean flag

setValidationMode

public void setValidationMode(boolean yes)
Switch to determine whether the classes generated should validate the XML Document being constructed
Default - TRUE
Parameters:
yes - boolean flag

setOutputDirectory

public void setOutputDirectory(java.lang.String dir)
Sets the output directory where the java source code for the DTD are generated. Default - current directory
Parameters:
dir - Output directory

setSerializationMode

public void setSerializationMode(boolean yes)
Switch to determine if the DTD should be saved as a serialized object or as text file. Serializing the DTD improves the performance when the generated classes are used to author XML files.
Default - FALSE (DTD is saved a text file)
Parameters:
yes - boolean flag

setJavaPackage

public void setJavaPackage(java.util.Vector packageName)
Sets the package for the classes generated
Default - No package
Parameters:
packageName - Name of the package

generate

public void generate(DTD dtd,
                     java.lang.String doctype)
Traverses the DTD with element doctype as root and generates Java classes
Parameters:
DTD - The DTD used to generate the classes
doctype - Name of the root Element