de.ispsoft.jaxme.generator
Class XsdSchemaWriter

java.lang.Object
  extended byde.ispsoft.jaxme.generator.ConfigurableImpl
      extended byde.ispsoft.jaxme.generator.SourceWriterImpl
          extended byde.ispsoft.jaxme.generator.XsdSchemaWriter
All Implemented Interfaces:
Configurable, SourceWriter

public class XsdSchemaWriter
extends SourceWriterImpl

Saves the schema into an XML Schema file. Mainly useful for conversion from another schema (for example a DTD) to XML schema.

Author:
Jochen Wiedmann

Field Summary
 
Fields inherited from class de.ispsoft.jaxme.generator.SourceWriterImpl
directory, generator, javaPackage
 
Constructor Summary
XsdSchemaWriter()
          Creates a new instance of XsdSchemaWriter
 
Method Summary
 void write(java.util.Map pGeneratedElements, org.xml.sax.ContentHandler pHandler, NamespaceSupport pNss, java.util.List pContext, SchemaElement pElement)
          Called for writing a schema element.
 void write(Schema pSchema)
          Called for writing a complete schema.
 void write(SchemaElement pElement)
          Called for writing a single schema element.
 void write(Schema pSchema, java.io.Writer pWriter)
          Called for writing a complete schema into the given Writer.
 void writeComplexElement(java.util.Map pGeneratedElements, org.xml.sax.ContentHandler pHandler, NamespaceSupport pNss, java.util.List pContext, SchemaElement pElement)
          Called for writing a complex schema element.
 void writeSimpleElement(java.util.Map pGeneratedElements, org.xml.sax.ContentHandler pHandler, NamespaceSupport pNss, java.util.List pContext, SchemaAbstractSimpleElement pElement)
          Called for writing a simple schema element.
 void writeSimpleElement(java.util.Map pGeneratedElements, org.xml.sax.ContentHandler pHandler, NamespaceSupport pNss, java.util.List pContext, SchemaElement pElement)
          Called for writing a complex schema element.
 
Methods inherited from class de.ispsoft.jaxme.generator.SourceWriterImpl
getDirectory, getGenerator, getJavaPackage, getOption, getSchemaDate, newJavaSource, setDirectory, setGenerator, setJavaPackage, setSchemaDate, writeFile, writeJavaSourceFile
 
Methods inherited from class de.ispsoft.jaxme.generator.ConfigurableImpl
getOption, getOptions, getOptionValue, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.ispsoft.jaxme.generator.Configurable
getOption, getOptions, getOptionValue, setOption
 

Constructor Detail

XsdSchemaWriter

public XsdSchemaWriter()
Creates a new instance of XsdSchemaWriter

Method Detail

write

public void write(SchemaElement pElement)
           throws java.lang.Exception

Called for writing a single schema element. Concrete subclasses must implement this method.

Specified by:
write in interface SourceWriter
Specified by:
write in class SourceWriterImpl
Throws:
java.lang.Exception

write

public void write(java.util.Map pGeneratedElements,
                  org.xml.sax.ContentHandler pHandler,
                  NamespaceSupport pNss,
                  java.util.List pContext,
                  SchemaElement pElement)
           throws java.lang.Exception

Called for writing a schema element.

Throws:
java.lang.Exception

writeSimpleElement

public void writeSimpleElement(java.util.Map pGeneratedElements,
                               org.xml.sax.ContentHandler pHandler,
                               NamespaceSupport pNss,
                               java.util.List pContext,
                               SchemaElement pElement)
                        throws java.lang.Exception

Called for writing a complex schema element.

Throws:
java.lang.Exception

writeSimpleElement

public void writeSimpleElement(java.util.Map pGeneratedElements,
                               org.xml.sax.ContentHandler pHandler,
                               NamespaceSupport pNss,
                               java.util.List pContext,
                               SchemaAbstractSimpleElement pElement)
                        throws java.lang.Exception

Called for writing a simple schema element.

Throws:
java.lang.Exception

writeComplexElement

public void writeComplexElement(java.util.Map pGeneratedElements,
                                org.xml.sax.ContentHandler pHandler,
                                NamespaceSupport pNss,
                                java.util.List pContext,
                                SchemaElement pElement)
                         throws java.lang.Exception

Called for writing a complex schema element.

Throws:
java.lang.Exception

write

public void write(Schema pSchema)
           throws java.lang.Exception

Called for writing a complete schema.

Specified by:
write in interface SourceWriter
Overrides:
write in class SourceWriterImpl
Throws:
java.lang.Exception

write

public void write(Schema pSchema,
                  java.io.Writer pWriter)
           throws java.lang.Exception

Called for writing a complete schema into the given Writer.

Throws:
java.lang.Exception