oracle.xml.classgen
Class SchemaClassGenerator
java.lang.Object
|
+--oracle.xml.classgen.SchemaClassGenerator
- public class SchemaClassGenerator
- extends java.lang.Object
This class generates the classes corresponding to an XML Schema.
Method Summary |
void |
generate(XMLSchema schema)
Generate the Schema classes corresponding to top level elements,
simpleType elements and complexType elements by calling
createSchemaClass on each of these nodes. |
void |
setGenerateComments(boolean comments)
Switch to determine whether to generate java doc comments
The default setting is true |
void |
setJavaPackage(XMLSchema schema,
java.util.Vector pkgName)
Sets the Java package names corresponding to Namespaces. |
void |
setOutputDirectory(java.lang.String dir)
Sets the output directory where the java source code for the
Schema class are generated. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SchemaClassGenerator
public SchemaClassGenerator()
- Default empty constructor for Schema Class Generator
SchemaClassGenerator
public SchemaClassGenerator(java.lang.String fileName)
- The constructor for Schema Class Generator
- Parameters:
fileName
- the input XML Schema
setGenerateComments
public void setGenerateComments(boolean comments)
- Switch to determine whether to generate java doc comments
The default setting is true
- Parameters:
comments
- boolean flag
setOutputDirectory
public void setOutputDirectory(java.lang.String dir)
- Sets the output directory where the java source code for the
Schema class are generated.
Default - current directory
- Parameters:
dir
- Output directory
setJavaPackage
public void setJavaPackage(XMLSchema schema,
java.util.Vector pkgName)
- Sets the Java package names corresponding to Namespaces.
The Namespaces defined in the schema are queried. The Number of
namespaces defined in the schema should match the number of
package names given by the user through command line else
an error is thrown. For each namespace, a user-defined package
name is assigned.
- Parameters:
schema
- XMLSchemapkgName
- A vector containing user defined
pacake names given through command line.
generate
public void generate(XMLSchema schema)
- Generate the Schema classes corresponding to top level elements,
simpleType elements and complexType elements by calling
createSchemaClass on each of these nodes.
- Parameters:
XML
- Schema object- Throws:
- -