org.apache.ws.commons.schema
Class XmlSchemaSerializer

java.lang.Object
  extended by org.apache.ws.commons.schema.XmlSchemaSerializer

public class XmlSchemaSerializer
extends Object

Convert from the XML Schema class representation to the standard XML representation.


Nested Class Summary
static class XmlSchemaSerializer.XmlSchemaSerializerException
          Exception class used for serialization problems.
 
Field Summary
static String XSD_NAMESPACE
           
 
Constructor Summary
XmlSchemaSerializer()
          Create a new serializer.
 
Method Summary
 ExtensionRegistry getExtReg()
          Get the registry of extensions for this serializer.
 Document[] serializeSchema(XmlSchema schemaObj, boolean serializeIncluded)
          Serialize an entire schema, returning an array of DOM Documents, one per XSL file.
 void setExtReg(ExtensionRegistry extReg)
          Set the registry of extensions for this serializer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_NAMESPACE

public static final String XSD_NAMESPACE
See Also:
Constant Field Values
Constructor Detail

XmlSchemaSerializer

public XmlSchemaSerializer()
Create a new serializer.

Method Detail

getExtReg

public ExtensionRegistry 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 to XmlSchema objects 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

public void setExtReg(ExtensionRegistry extReg)
Set the registry of extensions for this serializer.

Parameters:
extReg - the registry.


Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.