Package org.apache.ws.commons.schema
Class XmlSchemaSerializer
java.lang.Object
org.apache.ws.commons.schema.XmlSchemaSerializer
Convert from the XML Schema class representation to the standard XML representation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classException class used for serialization problems. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ExtensionRegistryExtension registry for the serializer(package private) Elementprivate static ThreadLocal<Set<XmlSchema>> Keeps track of already serialized schemas.private static final Stringstatic final String(package private) String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidappendElement(Document doc, Element parent, Node children, XmlSchema schema) private ElementconstructFacet(XmlSchemaFacet facetObj, Document doc, XmlSchema schema, String tagName) private ElementcreateNewElement(Document document, String localName, String prefix, String namespace) Get the registry of extensions for this serializer.private static String[]private voidprocessExtensibilityComponents(XmlSchemaObject schemaObject, Element parentElement) A generic method to process the extra attributes and the extra elements present within the schema.private StringresolveQName(QName names, XmlSchema schemaObj) will search whether the prefix is available in global hash table, if it is there than append the prefix to the element name.(package private) ElementserializeAll(Document doc, XmlSchemaAll allObj, XmlSchema schema) Serialize an 'all' item.(package private) ElementserializeAnnotation(Document doc, XmlSchemaAnnotation annotationObj, XmlSchema schema) ********************************************************************* Element serializeAnnotation(Document doc, XmlSchemaAnnotation annotationObj, XmlSchema schema)(package private) ElementserializeAny(Document doc, XmlSchemaAny anyObj, XmlSchema schema) ********************************************************************* Element serializeAny(Document doc, XmlSchemaAny anyObj, XmlSchema schema)(package private) ElementserializeAnyAttribute(Document doc, XmlSchemaAnyAttribute anyAttributeObj, XmlSchema schema) ********************************************************************* Element serializeAnyAttribute(Document doc, XmlSchemaAnyAttribute anyAttributeObj, XmlSchema schema)(package private) ElementserializeAppInfo(Document doc, XmlSchemaAppInfo appInfoObj, XmlSchema schema) ********************************************************************* Element serializeAppInfo(Document doc,XmlSchemaAppInfo appInfoObj, XmlSchema schema)(package private) ElementserializeAttribute(Document doc, XmlSchemaAttribute attributeObj, XmlSchema schema) ********************************************************************* Element serializeAttribute(Document doc, XmlSchemaAttribute attributeObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeAttributeGroup(Document doc, XmlSchemaAttributeGroup attributeGroupObj, XmlSchema schema) ********************************************************************* Element serializeAttributeGroup(Document doc, XmlSchemaAttributeGroup attributeGroupObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeAttributeGroupRef(Document doc, XmlSchemaAttributeGroupRef attributeGroupObj, XmlSchema schema) ********************************************************************* Element serializeAttributeGroupRef(Document doc, XmlSchemaAttributeGroupRef attributeGroupObj, XmlSchema schema) throws XmlSchemaSerializerException(package private) ElementserializeChoice(Document doc, XmlSchemaChoice choiceObj, XmlSchema schema) ********************************************************************* Element serializeChoice(Document doc, XmlSchemaChoice choiceObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeComplexContent(Document doc, XmlSchemaComplexContent complexContentObj, XmlSchema schema) ********************************************************************* Element serializeComplexContent(Document doc, XmlSchemaComplexContent complexContentObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeComplexContentExtension(Document doc, XmlSchemaComplexContentExtension extensionObj, XmlSchema schema) ********************************************************************* Element serializeComplexContentExtension(Document doc, XmlSchemaComplexContentExtension extensionObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeComplexContentRestriction(Document doc, XmlSchemaComplexContentRestriction restrictionObj, XmlSchema schema) ********************************************************************* Element serializeComplexContentRestriction(Document doc, XmlSchemaComplexContentRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeComplexType(Document doc, XmlSchemaComplexType complexTypeObj, XmlSchema schema) ********************************************************************* Element serializeComplexType(Document doc, XmlSchemaComplexType complexTypeObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeDocumentation(Document doc, XmlSchemaDocumentation documentationObj, XmlSchema schema) ********************************************************************* Element serializeDocumentation(Document doc,XmlSchemaDocumentation documentationObj, XmlSchema schema){(package private) ElementserializeElement(Document doc, XmlSchemaElement elementObj, XmlSchema schema) ********************************************************************* Element serializeElement(Document doc, XmlSchemaElement elementObj, XmlSchema schema) throws XmlSchemaSerializerException(package private) ElementserializeFacet(Document doc, XmlSchemaFacet facetObj, XmlSchema schema) ********************************************************************* Element serializeFacet(Document doc, XmlSchemaFacet facetObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeField(Document doc, XmlSchemaXPath fieldObj, XmlSchema schema) ********************************************************************* Element serializeField(Document doc, XmlSchemaXPath fieldObj, XmlSchema schema) throws XmlSchemaSerializerException(package private) ElementserializeGroup(Document doc, XmlSchemaGroup groupObj, XmlSchema schema) ********************************************************************* Element serializeGroup(Document doc, XmlSchemaGroup groupObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeGroupRef(Document doc, XmlSchemaGroupRef groupRefObj, XmlSchema schema) ********************************************************************* Element serializeGroupRef(Document doc, XmlSchemaGroupRef groupRefObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeIdentityConstraint(Document doc, XmlSchemaIdentityConstraint constraintObj, XmlSchema schema) ********************************************************************* Element serializeIdentityConstraint(Document doc, XmlSchemaIdentityConstraint constraintObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeImport(Document doc, XmlSchemaImport importObj, XmlSchema schema, boolean serializeIncluded) ********************************************************************* Element serializeImport(Document doc, XmlSchemaImport importObj, XmlSchema schema)throws XmlSchemaSerializerException(package private) ElementserializeInclude(Document doc, XmlSchemaInclude includeObj, XmlSchema schema, boolean serializeIncluded) ********************************************************************* Element serializeInclude(Document doc, XmlSchemaInclude includeObj, XmlSchema schema)throws XmlSchemaSerializerExceptionprivate voidserializeMaxMinOccurs(XmlSchemaParticle particle, Element element) A common method to serialize the max/min occurs(package private) ElementserializeRedefine(Document doc, XmlSchemaRedefine redefineObj, XmlSchema schema) ********************************************************************* Element serializeRedefine(Document doc, XmlSchemaRedefine redefineObj, XmlSchema schema)throws XmlSchemaSerializerExceptionDocument[]serializeSchema(XmlSchema schemaObj, boolean serializeIncluded) Serialize an entire schema, returning an array of DOM Documents, one per XSL file.private voidserializeSchemaChild(List<XmlSchemaObject> items, Element serializedSchema, Document serializedSchemaDocs, XmlSchema schemaObj, boolean serializeIncluded) (package private) Document[]serializeSchemaElement(XmlSchema schemaObj, boolean serializeIncluded) (package private) ElementserializeSelector(Document doc, XmlSchemaXPath selectorObj, XmlSchema schema) ********************************************************************* Element serializeSelector(Document doc, XmlSchemaXPath selectorObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeSequence(Document doc, XmlSchemaSequence sequenceObj, XmlSchema schema) ********************************************************************* Element serializeSequence(Document doc, XmlSchemaSequence sequenceObj, XmlSchema schema)throws XmlSchemaSerializerException{(package private) ElementserializeSimpleContent(Document doc, XmlSchemaSimpleContent simpleContentObj, XmlSchema schema) ********************************************************************* Element serializeSimpleContent(Document doc, XmlSchemaSimpleContent simpleContentObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeSimpleContentExtension(Document doc, XmlSchemaSimpleContentExtension extensionObj, XmlSchema schema) ********************************************************************* Element serializeSimpleContentExtension(Document doc, XmlSchemaSimpleContentExtension extensionObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeSimpleContentRestriction(Document doc, XmlSchemaSimpleContentRestriction restrictionObj, XmlSchema schema) ********************************************************************* Element serializeSimpleContentRestriction(Document doc, XmlSchemaSimpleContentRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeSimpleType(Document doc, XmlSchemaSimpleType simpleTypeObj, XmlSchema schema) ********************************************************************* Element serializeSimpleType(Document doc, XmlSchemaSimpleType simpleTypeObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeSimpleTypeList(Document doc, XmlSchemaSimpleTypeList listObj, XmlSchema schema) ********************************************************************* Element serializeSimpleTypeList(Document doc, XmlSchemaSimpleTypeList listObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeSimpleTypeRestriction(Document doc, XmlSchemaSimpleTypeRestriction restrictionObj, XmlSchema schema) ********************************************************************* Element serializeSimpleTypeRestriction(Document doc, XmlSchemaSimpleTypeRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializerException{(package private) ElementserializeSimpleTypeUnion(Document doc, XmlSchemaSimpleTypeUnion unionObj, XmlSchema schema) ********************************************************************* Element serializeSimpleTypeUnion(Document doc, XmlSchemaSimpleTypeUnion unionObj, XmlSchema schema) throws XmlSchemaSerializerException{voidsetExtReg(ExtensionRegistry extReg) Set the registry of extensions for this serializer.(package private) voidsetupAttr(Document doc, List<XmlSchemaAttributeOrGroupRef> attrColl, XmlSchema schema, Element container) private ElementsetupNamespaces(Document schemaDocs, XmlSchema schemaObj) Set upnamespaces appropriately and append that attr into specified element
-
Field Details
-
Constructor Details
-
XmlSchemaSerializer
public XmlSchemaSerializer()Create a new serializer.
-
-
Method Details
-
getParts
-
getExtReg
Get the registry of extensions for this serializer.- Returns:
- the registry.
-
serializeSchema
public Document[] serializeSchema(XmlSchema schemaObj, boolean serializeIncluded) throws XmlSchemaSerializer.XmlSchemaSerializerException Serialize an entire schema, returning an array of DOM Documents, one per XSL file. If serializeIncluded is false, this will always return a single DOM document. If it is true, and there are external elements in this schema (include, import, or redefine), and they contain references toXmlSchemaobjects to represent them, they will be returned as additional documents in the array.- Parameters:
schemaObj- The XML Schema.serializeIncluded- whether to create DOM trees for any included or imported schemas.- Returns:
- Documents. If serializeIncluded is false, the array with have one entry. The main document is always first.
- Throws:
XmlSchemaSerializer.XmlSchemaSerializerException
-
setExtReg
Set the registry of extensions for this serializer.- Parameters:
extReg- the registry.
-
serializeAll
Element serializeAll(Document doc, XmlSchemaAll allObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException Serialize an 'all' item.- Parameters:
doc-allObj-schema-- Returns:
- Throws:
XmlSchemaSerializer.XmlSchemaSerializerException
-
serializeAnnotation
********************************************************************* Element serializeAnnotation(Document doc, XmlSchemaAnnotation annotationObj, XmlSchema schema) Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. annotationObj - XmlSchemaAnnotation that will be serialized. schema - Schema Document object of the parent. Return: annotation element that part of any type. will contain document and appinfo for child. ********************************************************************** -
serializeAny
********************************************************************* Element serializeAny(Document doc, XmlSchemaAny anyObj, XmlSchema schema) Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. anyObj - XmlSchemaAny that will be serialized. schema - Schema Document object of the parent. Return: Element of any that is part of its parent. ********************************************************************** -
serializeAnyAttribute
Element serializeAnyAttribute(Document doc, XmlSchemaAnyAttribute anyAttributeObj, XmlSchema schema) ********************************************************************* Element serializeAnyAttribute(Document doc, XmlSchemaAnyAttribute anyAttributeObj, XmlSchema schema) Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. anyAttributeObj - XmlSchemaAnyAttribute that will be serialized. schema - Schema Document object of the parent. Return: Element of any attribute element. ********************************************************************** -
serializeAppInfo
********************************************************************* Element serializeAppInfo(Document doc,XmlSchemaAppInfo appInfoObj, XmlSchema schema) Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. appInfoObj - XmlSchemaAppInfo that will be serialized. schema - Schema Document object of the parent. Return: App info element that is part of the annotation. ********************************************************************** -
serializeAttribute
Element serializeAttribute(Document doc, XmlSchemaAttribute attributeObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeAttribute(Document doc, XmlSchemaAttribute attributeObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. `Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. attributeObj - XmlSchemaAttribute that will be serialized. schema - Schema Document object of the parent. Return: Element of attribute. ********************************************************************** -
serializeAttributeGroup
Element serializeAttributeGroup(Document doc, XmlSchemaAttributeGroup attributeGroupObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeAttributeGroup(Document doc, XmlSchemaAttributeGroup attributeGroupObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. attributeGroupObj - XmlSchemaAttributeGroup that will be serialized. schema - Schema Document object of the parent. Return: Element of attribute group. ********************************************************************** -
serializeAttributeGroupRef
Element serializeAttributeGroupRef(Document doc, XmlSchemaAttributeGroupRef attributeGroupObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeAttributeGroupRef(Document doc, XmlSchemaAttributeGroupRef attributeGroupObj, XmlSchema schema) throws XmlSchemaSerializerException Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. attributeGroupObj - XmlSchemaAttributeGroupRef that will be serialized. schema - Schema Document object of the parent. Return: Element of attribute group ref that part of type. ********************************************************************** -
serializeChoice
Element serializeChoice(Document doc, XmlSchemaChoice choiceObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeChoice(Document doc, XmlSchemaChoice choiceObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. choiceObj - XmlSchemaChoice that will be serialized. schema - Schema Document object of the parent. Return: Element of choice schema object. ********************************************************************** -
serializeComplexContent
Element serializeComplexContent(Document doc, XmlSchemaComplexContent complexContentObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeComplexContent(Document doc, XmlSchemaComplexContent complexContentObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. complexContentObj - XmlSchemaComplexContent that will be serialized. schema - Schema Document object of the parent. Return: Element of complex type complex content. ********************************************************************** -
serializeComplexContentExtension
Element serializeComplexContentExtension(Document doc, XmlSchemaComplexContentExtension extensionObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeComplexContentExtension(Document doc, XmlSchemaComplexContentExtension extensionObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. extensionObj - XmlSchemaComplexContentRestriction that will be serialized. schema - Schema Document object of the parent. Return: Element of complex content extension. ********************************************************************** -
serializeComplexContentRestriction
Element serializeComplexContentRestriction(Document doc, XmlSchemaComplexContentRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeComplexContentRestriction(Document doc, XmlSchemaComplexContentRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. restrictionObj - XmlSchemaSimpleContentRestriction that will be serialized. schema - Schema Document object of the parent. Return: Element of simple content restriction. ********************************************************************** -
serializeComplexType
Element serializeComplexType(Document doc, XmlSchemaComplexType complexTypeObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeComplexType(Document doc, XmlSchemaComplexType complexTypeObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. complexTypeObj - XmlSchemaFacet that will be serialized. schema - Schema Document object of the parent. Return: Element of complexType. ********************************************************************** -
serializeDocumentation
Element serializeDocumentation(Document doc, XmlSchemaDocumentation documentationObj, XmlSchema schema) ********************************************************************* Element serializeDocumentation(Document doc,XmlSchemaDocumentation documentationObj, XmlSchema schema){ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. documentationObj - XmlSchemaAppInfo that will be serialized. schema - Schema Document object of the parent. Return: Element representation of documentation that is part of annotation. ********************************************************************** -
serializeElement
Element serializeElement(Document doc, XmlSchemaElement elementObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeElement(Document doc, XmlSchemaElement elementObj, XmlSchema schema) throws XmlSchemaSerializerException Each member of Element will be appended and pass the element created. Element processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. elementObj - XmlSchemaInclude that will be serialized. schema - Schema Document object of the parent. Return: Element object of element. ********************************************************************** -
serializeFacet
Element serializeFacet(Document doc, XmlSchemaFacet facetObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeFacet(Document doc, XmlSchemaFacet facetObj, XmlSchema schema) throws XmlSchemaSerializerException{ detect what type of facet and cass appropriatelly, construct the element and pass it. Parameter: doc - Document the parent use. facetObj - XmlSchemaFacet that will be serialized. schema - Schema Document object of the parent. Return: Element of simple type with facet. ********************************************************************** -
serializeField
Element serializeField(Document doc, XmlSchemaXPath fieldObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeField(Document doc, XmlSchemaXPath fieldObj, XmlSchema schema) throws XmlSchemaSerializerException Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. fieldObj - XmlSchemaXPath that will be serialized. schema - Schema Document object of the parent. Return: field element that part of constraint. ********************************************************************** -
serializeGroup
Element serializeGroup(Document doc, XmlSchemaGroup groupObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeGroup(Document doc, XmlSchemaGroup groupObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. groupObj - XmlSchemaGroup that will be serialized. schema - Schema Document object of the parent. Return: Element of group elements. ********************************************************************** -
serializeGroupRef
Element serializeGroupRef(Document doc, XmlSchemaGroupRef groupRefObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeGroupRef(Document doc, XmlSchemaGroupRef groupRefObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. groupRefObj - XmlSchemaGroupRef that will be serialized. schema - Schema Document object of the parent. Return: Element of group elements ref inside its parent. ********************************************************************** -
serializeIdentityConstraint
Element serializeIdentityConstraint(Document doc, XmlSchemaIdentityConstraint constraintObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeIdentityConstraint(Document doc, XmlSchemaIdentityConstraint constraintObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. constraintObj - XmlSchemaIdentityConstraint that will be serialized. schema - Schema Document object of the parent. Return: Element of key, keyref or unique that part of its parent. ********************************************************************** -
serializeImport
Element serializeImport(Document doc, XmlSchemaImport importObj, XmlSchema schema, boolean serializeIncluded) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeImport(Document doc, XmlSchemaImport importObj, XmlSchema schema)throws XmlSchemaSerializerException Add each of the attribute of XmlSchemaImport obj into import Element Then serialize schema that is included by this import. Include the serialized schema into document pool. Parameter: doc - Document the parent use. includeObj - XmlSchemaInclude that will be serialized. schema - Schema Document object of the parent. Return: Element object representation of XmlSchemaImport ********************************************************************** -
serializeInclude
Element serializeInclude(Document doc, XmlSchemaInclude includeObj, XmlSchema schema, boolean serializeIncluded) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeInclude(Document doc, XmlSchemaInclude includeObj, XmlSchema schema)throws XmlSchemaSerializerException set appropriate attribute as per this object attribute availability. Call included schema to append to this schema document collection. Then add the document created into document pool. Parameter: doc - Document the parent use. includeObj - XmlSchemaInclude that will be serialized. schema - Schema Document object of the parent. Return: Element object representation of XmlSchemaInclude ********************************************************************** -
serializeRedefine
Element serializeRedefine(Document doc, XmlSchemaRedefine redefineObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeRedefine(Document doc, XmlSchemaRedefine redefineObj, XmlSchema schema)throws XmlSchemaSerializerException Add each of the attribute of XmlSchemaImport obj into import Element Then serialize schema that is included by this import. Include the serialized schema into document pool. Parameter: doc - Document the parent use. redefineObj - XmlSchemaInclude that will be serialized. schema - Schema Document object of the parent. Return: Element object representation of XmlSchemaRedefine ********************************************************************** -
serializeSchemaElement
Document[] serializeSchemaElement(XmlSchema schemaObj, boolean serializeIncluded) throws XmlSchemaSerializer.XmlSchemaSerializerException -
serializeSelector
Element serializeSelector(Document doc, XmlSchemaXPath selectorObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSelector(Document doc, XmlSchemaXPath selectorObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. selectorObj - XmlSchemaXPath that will be serialized. schema - Schema Document object of the parent. Return: Element of selector with collection of xpath as its attrib. The selector itself is the part of identity type. eginvalid input: '<'selector xpath="..." ********************************************************************** -
serializeSequence
Element serializeSequence(Document doc, XmlSchemaSequence sequenceObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSequence(Document doc, XmlSchemaSequence sequenceObj, XmlSchema schema)throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. `Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. sequenceObj - XmlSchemaFacet that will be serialized. schema - Schema Document object of the parent. Return: Element of sequence particle. ********************************************************************** -
serializeSimpleContent
Element serializeSimpleContent(Document doc, XmlSchemaSimpleContent simpleContentObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSimpleContent(Document doc, XmlSchemaSimpleContent simpleContentObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. simpleContentObj - XmlSchemaSimpleContent that will be serialized. schema - Schema Document object of the parent. Return: Element of complex type simple content. ********************************************************************** -
serializeSimpleContentExtension
Element serializeSimpleContentExtension(Document doc, XmlSchemaSimpleContentExtension extensionObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSimpleContentExtension(Document doc, XmlSchemaSimpleContentExtension extensionObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. extensionObj - XmlSchemaSimpleContentExtension that will be serialized. schema - Schema Document object of the parent. Return: Element of simple content extension. ********************************************************************** -
serializeSimpleContentRestriction
Element serializeSimpleContentRestriction(Document doc, XmlSchemaSimpleContentRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSimpleContentRestriction(Document doc, XmlSchemaSimpleContentRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. restrictionObj - XmlSchemaSimpleContentRestriction that will be serialized. schema - Schema Document object of the parent. Return: Element of simple content restriction. ********************************************************************** -
serializeSimpleType
Element serializeSimpleType(Document doc, XmlSchemaSimpleType simpleTypeObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSimpleType(Document doc, XmlSchemaSimpleType simpleTypeObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of simple type will be appended and pass the element created. Simple type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. simpleTypeObj - XmlSchemaSimpleType that will be serialized. schema - Schema Document object of the parent. Return: Element object of SimpleType ********************************************************************** -
serializeSimpleTypeList
Element serializeSimpleTypeList(Document doc, XmlSchemaSimpleTypeList listObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSimpleTypeList(Document doc, XmlSchemaSimpleTypeList listObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. listObj - XmlSchemaSimpleTypeList that will be serialized. schema - Schema Document object of the parent. Return: Element of simple type with list method. ********************************************************************** -
serializeSimpleTypeRestriction
Element serializeSimpleTypeRestriction(Document doc, XmlSchemaSimpleTypeRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSimpleTypeRestriction(Document doc, XmlSchemaSimpleTypeRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of simple type will be appended and pass the element created. Simple type'sprocessed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. restrictionObj - XmlSchemaRestriction that will be serialized. schema - Schema Document object of the parent. Return: Element of simple type restriction and its child. ********************************************************************** -
serializeSimpleTypeUnion
Element serializeSimpleTypeUnion(Document doc, XmlSchemaSimpleTypeUnion unionObj, XmlSchema schema) throws XmlSchemaSerializer.XmlSchemaSerializerException ********************************************************************* Element serializeSimpleTypeUnion(Document doc, XmlSchemaSimpleTypeUnion unionObj, XmlSchema schema) throws XmlSchemaSerializerException{ Each member of complex type will be appended and pass the element created. Complex type processed according to w3c Recommendation May 2 2001. Parameter: doc - Document the parent use. unionObj - XmlSchemaSimpleTypeUnion that will be serialized. schema - Schema Document object of the parent. Return: Element of simple type with union method. ********************************************************************** -
setupAttr
void setupAttr(Document doc, List<XmlSchemaAttributeOrGroupRef> attrColl, XmlSchema schema, Element container) throws XmlSchemaSerializer.XmlSchemaSerializerException -
appendElement
-
constructFacet
private Element constructFacet(XmlSchemaFacet facetObj, Document doc, XmlSchema schema, String tagName) -
createNewElement
-
processExtensibilityComponents
A generic method to process the extra attributes and the extra elements present within the schema. What are considered extensions are child elements with non schema namespace and child attributes with any namespace.- Parameters:
schemaObject-parentElement-
-
resolveQName
will search whether the prefix is available in global hash table, if it is there than append the prefix to the element name. If not then it will create new prefix corresponding to that namespace and store that in hash table. Finally add the new prefix and namespace toelement - Parameters:
names-schemaObj-- Returns:
- resolved QName of the string
-
serializeMaxMinOccurs
A common method to serialize the max/min occurs- Parameters:
particle-element-
-
serializeSchemaChild
private void serializeSchemaChild(List<XmlSchemaObject> items, Element serializedSchema, Document serializedSchemaDocs, XmlSchema schemaObj, boolean serializeIncluded) throws XmlSchemaSerializer.XmlSchemaSerializerException -
setupNamespaces
Set upnamespaces appropriately and append that attr into specified element
-