|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
XML Schema generator tool.
See Java2SchemaFactory
how to
get an instance of the Java2Schema and how to use it via API.
Field Summary | |
static int |
MODE_INTERFACE_TO_REMOTE_REF
Map interfaces to remote references. |
static int |
MODE_INTERFACE_TO_STRUCTURE
Map interfaces to structures. |
static int |
SOAP_USE_ENCODED
Use SOAP-ENC encoding. |
static int |
SOAP_USE_LITERAL
Use literal encoding. |
Method Summary | |
java.util.Map |
getAllSchemas()
Returns all schema elements across all targetNamespaces. |
java.lang.String |
getAttachmentType()
|
Processing |
getDDProcessing()
Returns the DeploymentDescriptor processing |
java.util.Set |
getExcludedClasses()
Returns a set of excluded classes. |
java.util.Set |
getImportReferences(java.lang.String targetNamespace)
Returns set of |
java.util.Set |
getIncludedClasses()
Returns a set of included classes. |
java.util.Map |
getInheritanceMapping()
Returns inheritance map. |
int |
getInterfaceMappingMode()
Returns mode of interface mapping. |
java.util.Map |
getPackageMapping()
Returns package namespace map. |
org.w3c.dom.Document |
getSchemaBuilder()
Returns main document for node creation. |
java.lang.String |
getSerializationID()
Returns serialization ID to use. |
int |
getSOAPEncoding()
Returns type of SOAP encoding. |
TypeMappingContext |
getTypeMappingContext()
Returns type mapping context, default one is "java". |
boolean |
isJavaMappingExtension()
Returns if java mapping extensibility elements are enabled. |
boolean |
isMapAttachmentToWsiSwaRef()
Getter of the property value. |
boolean |
isMultidimArrays()
Returns type of generated arrays. |
boolean |
isSortingFields()
Returns true fields are alphabetically sorted. |
boolean |
isUseNillable()
Returns whether attribute nillable='true' or attributes minOccurs='0' maxOccurs='1'
will be generated into XML schema for Java reference data types. |
boolean |
isVerbose()
Returns if in verbose mode. |
QName |
mapJavaType(java.lang.Class typeClass)
Mapping of java types to schema types. |
QName |
mapJavaType(java.lang.Class typeClass,
java.util.Set schemaSet)
Mapping of java types to schema types. |
QName |
mapSchemaType(java.lang.Class typeClass,
QName schemaElement,
QName schemaType)
Mapping of schema type to schema element. |
QName |
mapSchemaType(java.lang.Class typeClass,
QName schemaElement,
QName schemaType,
java.util.Set schemaSet)
Mapping of schema type to schema element. |
void |
resetCompiler()
Resets Java2Schema. |
void |
setAttachmentType(java.lang.String attachmentType)
Sets attachment type - it affects schema type generated for attachments. |
void |
setDDProcessing(Processing processing)
Sets the DeploymentDescriptor processing |
void |
setInheritanceMapping(java.util.Map map)
Sets inheritance map. |
void |
setInterfaceMappingMode(int mode)
Sets mode of interface mapping, default is MODE_INTERFACE_TO_STRUCTURE. |
void |
setJavaMappingExtension(boolean javaMappingExtension)
Enables/disables java mapping extensibility elements. |
void |
setMapAttachmentToWsiSwaRef(boolean newValue)
Setter, see isMapAttachmentToWsiSwaRef() . |
void |
setMappingSchemas(java.util.Set referencedSchemas,
java.util.Set insertedSchemas)
Sets XML Schemas / WSDLs to take its types as the base for compilation. |
void |
setMultidimArrays(boolean multidimArrays)
Enables/disables generating of multidimensional arrays. |
void |
setPackageMapping(java.util.Map packageNamespaceMap)
Sets package namespace map. |
void |
setSchemaBuilder(org.w3c.dom.Document schemaDocument)
Sets main document for node creation. |
void |
setSerializationID(java.lang.String serializationID)
Sets serialization ID to use. |
void |
setSOAPEncoding(int soapEncoding)
Sets type of SOAP encoding. |
void |
setSortingFields(boolean sortingFields)
Enables alphabetically sorting fields. |
void |
setTypeMappingContext(TypeMappingContext typeMappingContext)
Sets type mapping context, default one is "java". |
void |
setUseNillable(boolean b)
Sets whether attribute nillable='true' or attributes minOccurs='0' maxOccurs='1'
should be generated into XML schema for Java reference data types. |
void |
setVerbose(boolean verbose)
Enables/disables verbose mode. |
void |
setVerbose(int length)
Enables verbose mode and sets output message max length. |
boolean |
testClassInclusion(java.lang.String className)
Returns if class should be processed or will be excluded. |
Field Detail |
public static final int SOAP_USE_ENCODED
public static final int SOAP_USE_LITERAL
public static final int MODE_INTERFACE_TO_STRUCTURE
public static final int MODE_INTERFACE_TO_REMOTE_REF
Method Detail |
public void resetCompiler()
public QName mapJavaType(java.lang.Class typeClass)
typeClass
- type to map to schema
public QName mapJavaType(java.lang.Class typeClass, java.util.Set schemaSet)
typeClass
- type to map to schemaschemaSet
- set to store all the schema elements with actually mapped types,
each entry in set is type of Element
public QName mapSchemaType(java.lang.Class typeClass, QName schemaElement, QName schemaType)
typeClass
- original java typeschemaElement
- qualified name of element to createschemaType
- qualified name of schema type to map to element
public QName mapSchemaType(java.lang.Class typeClass, QName schemaElement, QName schemaType, java.util.Set schemaSet)
typeClass
- original java typeschemaElement
- qualified name of element to createschemaType
- qualified name of schema type to map to elementschemaSet
- set to store all the schema elements with actually mapped types,
each entry in set is type of Element
public void setSchemaBuilder(org.w3c.dom.Document schemaDocument)
schemaDocument
- document to use when nodes are createdpublic org.w3c.dom.Document getSchemaBuilder()
public java.util.Map getAllSchemas()
public java.util.Set getImportReferences(java.lang.String targetNamespace)
targetNamespace
- required Element
public java.util.Map getPackageMapping()
String
public void setPackageMapping(java.util.Map packageNamespaceMap)
packageNamespaceMap
- map of pairs package name -> namespace,
keys and values in Map are both type of String
public int getInterfaceMappingMode()
public void setInterfaceMappingMode(int mode)
mode
- mode of interface mappingpublic TypeMappingContext getTypeMappingContext()
public void setTypeMappingContext(TypeMappingContext typeMappingContext)
typeMappingContext
- custom type mapping contextpublic java.util.Map getInheritanceMapping()
String
public void setInheritanceMapping(java.util.Map map)
map
- inheritance map, keys and values in Map are
both type of String
public boolean isJavaMappingExtension()
public void setJavaMappingExtension(boolean javaMappingExtension)
javaMappingExtension
- public java.util.Set getExcludedClasses()
public java.util.Set getIncludedClasses()
public void setMappingSchemas(java.util.Set referencedSchemas, java.util.Set insertedSchemas)
referencedSchemas
- relative or absolute URLs of schema files (stored as String);
these schemas will be referenced by insertedSchemas
- relative or absolute URLs of schema files (stored as String);
these schemas will be directly includedpublic boolean testClassInclusion(java.lang.String className)
className
- class to test
public boolean isSortingFields()
public void setSortingFields(boolean sortingFields)
sortingFields
- true if fields should be alphabetically sorted,
false otherwisepublic int getSOAPEncoding()
public void setSOAPEncoding(int soapEncoding)
soapEncoding
- type of SOAP encodingpublic boolean isMultidimArrays()
public void setMultidimArrays(boolean multidimArrays)
multidimArrays
- set to true if multidim arrays are allowedpublic void setDDProcessing(Processing processing)
processing
- DeploymentDescriptor processingpublic Processing getDDProcessing()
public void setVerbose(boolean verbose)
verbose
- if true verbose mode is enabled and additional information
is producedpublic void setVerbose(int length)
length
- max length of output message, 0 means default lengthpublic boolean isVerbose()
public java.lang.String getSerializationID()
public void setSerializationID(java.lang.String serializationID)
serializationID
- serialization ID to usepublic void setAttachmentType(java.lang.String attachmentType)
attachmentType
- Message.CT_MULTIPART_RELATED
for MIME,
Message.CT_APPLICATION_DIME
for DIMEpublic java.lang.String getAttachmentType()
Message.CT_MULTIPART_RELATED
for MIME,
Message.CT_APPLICATION_DIME
for DIMEpublic void setUseNillable(boolean b)
nillable='true'
or attributes minOccurs='0' maxOccurs='1'
should be generated into XML schema for Java reference data types.
b
- use true
to generate with attribute nillable='true'
,
use false
to generate with attributes minOccurs='0' maxOccurs='1'
,public boolean isUseNillable()
nillable='true'
or attributes minOccurs='0' maxOccurs='1'
will be generated into XML schema for Java reference data types.
true
represents attribute nillable='true'
false
represents attributes minOccurs='0' maxOccurs='1'
,setUseNillable(boolean)
public boolean isMapAttachmentToWsiSwaRef()
true
message attachment will be mapped to
{http://ws-i.org/profiles/basic/1.1/xsd}swaRef
XML Schema simple type. This
is a prerequisity to create WS-I Attachment Profile 1.0 compliant WSDLs.
Default is derived from WS-I compliance setting of the SSJ (WS-I compliant => true
).
public void setMapAttachmentToWsiSwaRef(boolean newValue)
isMapAttachmentToWsiSwaRef()
.
newValue
- the new value to setd
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |