|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Schema2Java tool interface.
This tools processes a XML Schema files and generates Java classes along the definitions. A simple usage:
import org.idoox.wasp.tools.schema2java.*;
Schema2Java schema2Java = Schema2JavaFactory.newSchema2Java();
schema2Java.process("http://systinet.com/Service/interfaces.xsd");
Field Summary | |
static int |
MODE_TYPES_AS_INTERFACES
|
static int |
MODE_TYPES_AS_JAVABEANS
|
static int |
MODE_TYPES_AS_STRUCTURES
A modes for generating of structures. |
Method Summary | |
java.lang.String[] |
getAvailableBackends()
Returns available WSDL2Java's backends. |
CompilerIO |
getCompilerIO()
Returns previously set CompilerIO |
Processing |
getDDProcessing()
Returns a Processing from a deployment-descriptor. |
java.util.Map |
getNamespace2PackageMapping()
Returns a local mapping from XML schema namespace to Java package name. |
java.util.Map |
getSchema2JavaMapping()
Returns a local mapping from XML Schema types to Java classes. |
int |
getTypesGeneratingMode()
Returns a generating mode for types. |
java.lang.String |
getTypesPackage()
Returns a package into which types are generated. |
int |
getVerbosityLevel()
Returns verbose mode level. |
boolean |
isBeautifyingOutputStructures()
Returns if a beautification of output structures is activated (by default it is activated). |
boolean |
isMapMixedToDom()
|
void |
process(org.w3c.dom.Element[] element,
java.lang.String schemaLocation)
Processes an XML Schema and generates a Java classes and structures. |
void |
process(org.w3c.dom.Element element,
java.lang.String schemaLocation)
Processes an XML Schema and generates a Java classes and structures. |
void |
process(Endpoint schemaLocation)
Processes an XML Schema and generates a Java classes and structures. |
void |
process(Endpoint[] schemaLocation)
Processes an XML Schema and generates a Java classes and structures. |
void |
process(Schema schema)
Processes an XML Schema and generates a Java classes and structures. |
void |
process(java.lang.String schemaLocation)
Processes an XML Schema and generates a Java classes and structures. |
void |
process(java.lang.String[] schemaLocation)
Processes an XML Schema and generates a Java classes and structures. |
void |
setBeautifyingOutputStructures(boolean beautifyingOutputStructures)
Sets if beautifying output structures is activated. |
void |
setCompilerIO(CompilerIO compilerIO)
Specifies an implementation of the CompilerIO
interface which should be used to write the output of the compilation
process. |
void |
setDDProcessing(Processing processing)
Sets a Processing from a deployment-descriptor. |
void |
setMapMixedToDom(boolean value)
Sets the property setting handling of mixed content. |
void |
setNamespace2PackageMapping(java.util.Map namespace2PackageMapping)
Sets a local mapping from XML schema namespace to Java package name. |
void |
setOutputBackends(java.lang.String outputBackends)
Sets the output backends mentioned in the configuration, for example java , java-async ,
java-impl . |
void |
setSchema2JavaMapping(java.util.Map schema2JavaMapping)
Sets a local mapping from XML Schem types to Java classes. |
void |
setTypesGeneratingMode(int mode)
Sets a generating mode for types. |
void |
setTypesPackage(java.lang.String packageName)
Sets a package into which types are generated. |
void |
setVerbosityLevel(int verbosityLevel)
Sets if verbose output is printed. |
Field Detail |
public static final int MODE_TYPES_AS_STRUCTURES
public static final int MODE_TYPES_AS_INTERFACES
public static final int MODE_TYPES_AS_JAVABEANS
Method Detail |
public void process(java.lang.String schemaLocation) throws Schema2JavaException
process
method is called, the output must be specified.
Use the method setCompilerIO(org.idoox.wasp.tools.CompilerIO)
to specify the output of the process.
schemaLocation
- an XML Schema's URL to process
Schema2JavaException
- if something goes wrongpublic void process(java.lang.String[] schemaLocation) throws Schema2JavaException
process
method is called, the output must be specified.
Use the method setCompilerIO(org.idoox.wasp.tools.CompilerIO)
to specify the output of the process.
schemaLocation
- an XML Schema's URLs to process
Schema2JavaException
- if something goes wrongpublic void process(Endpoint schemaLocation) throws Schema2JavaException
process
method is called, the output must be specified.
Use the method setCompilerIO(org.idoox.wasp.tools.CompilerIO)
to specify the output of the process.
schemaLocation
- an XML Schema's endpoint to process
Schema2JavaException
- if something goes wrongpublic void process(Endpoint[] schemaLocation) throws Schema2JavaException
process
method is called, the output must be specified.
Use the method setCompilerIO(org.idoox.wasp.tools.CompilerIO)
to specify the output of the process.
schemaLocation
- an XML Schema's endpoints to process
Schema2JavaException
- if something goes wrongpublic void process(org.w3c.dom.Element element, java.lang.String schemaLocation) throws Schema2JavaException
process
method is called, the output must be specified.
Use the method setCompilerIO(org.idoox.wasp.tools.CompilerIO)
to specify the output of the process.
element
- an element which presents an XML SchemaschemaLocation
- a schema URL to use as a Schema location context
Schema2JavaException
- if something goes wrongpublic void process(org.w3c.dom.Element[] element, java.lang.String schemaLocation) throws Schema2JavaException
process
method is called, the output must be specified.
Use the method setCompilerIO(org.idoox.wasp.tools.CompilerIO)
to specify the output of the process.
element
- an elements which presents an XML SchemaschemaLocation
- a schema URL to use as a Schema location context
Schema2JavaException
- if something goes wrongpublic void process(Schema schema) throws Schema2JavaException
process
method is called, the output must be specified.
Use the method setCompilerIO(org.idoox.wasp.tools.CompilerIO)
to specify the output of the process.
schema
- a Schema to process
Schema2JavaException
- if something goes wrongpublic void setCompilerIO(CompilerIO compilerIO)
CompilerIO
interface which should be used to write the output of the compilation
process. This method must be called before the process
is
called.
compilerIO
- of the CompilerIO
interface which should be used to write the output of the compilation
processpublic CompilerIO getCompilerIO()
CompilerIO
interface or null
if was not setpublic void setVerbosityLevel(int verbosityLevel)
verbosityLevel
- the verbosity level (0-10), 0 .. no outputpublic int getVerbosityLevel()
public void setDDProcessing(Processing processing)
processing
- public Processing getDDProcessing()
public void setTypesPackage(java.lang.String packageName)
packageName
- a package into which types are generatedpublic java.lang.String getTypesPackage()
public void setTypesGeneratingMode(int mode)
mode
- a generating mode for types, one of:
MODE_TYPES_AS_STRUCTURES
(default one),
MODE_TYPES_AS_INTERFACES
,
MODE_TYPES_AS_JAVABEANS
.public int getTypesGeneratingMode()
public boolean isBeautifyingOutputStructures()
public void setBeautifyingOutputStructures(boolean beautifyingOutputStructures)
beautifyingOutputStructures
- if true a beautification mode is activated,
if false otherwise.public java.util.Map getSchema2JavaMapping()
public void setSchema2JavaMapping(java.util.Map schema2JavaMapping)
schema2JavaMapping
- public void setNamespace2PackageMapping(java.util.Map namespace2PackageMapping)
setTypesPackage(java.lang.String)
.
Type of the key is String, type of the value is String
namespace2PackageMapping
- public java.util.Map getNamespace2PackageMapping()
setTypesPackage(java.lang.String)
.
public void setOutputBackends(java.lang.String outputBackends)
java
, java-async
,
java-impl
.
outputBackends
- name of backends setpublic java.lang.String[] getAvailableBackends()
public void setMapMixedToDom(boolean value)
true
means that mixed complex type is mapped to an DOM element,
false
means that the character data are ignored and only subelements
are considered.
value
- a new value of the propertypublic boolean isMapMixedToDom()
setMapMixedToDom(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |