org.apache.axis2.schema.writer
Interface BeanWriter

All Known Implementing Classes:
JavaBeanWriter

public interface BeanWriter

The bean writer interface. The schema compiler expects one of these to be presented to it and calls the appropriate methods


Method Summary
 Map getModelMap()
          Gets a map of models.
 void init(CompilerOptions options)
          Initializes the writer with compiler options.
 String makeFullyQualifiedClassName(QName qName)
          Make the fully qualified class name for an element or named type
 String write(org.apache.ws.commons.schema.XmlSchemaComplexType complexType, Map typeMap, BeanWriterMetaInfoHolder metainf, String fullyQualifiedClassName)
          Write a complex type
 String write(org.apache.ws.commons.schema.XmlSchemaElement element, Map typeMap, BeanWriterMetaInfoHolder metainf)
          Write a element
 String write(org.apache.ws.commons.schema.XmlSchemaSimpleType simpleType, Map typeMap, BeanWriterMetaInfoHolder metainf)
          Write a simple type
 void writeBatch()
          Writes a wrapped class.
 

Method Detail

init

public void init(CompilerOptions options)
          throws SchemaCompilationException
Initializes the writer with compiler options.

Parameters:
options -
Throws:
IOException
SchemaCompilationException

writeBatch

public void writeBatch()
                throws SchemaCompilationException
Writes a wrapped class. This will have effect only if the CompilerOptions wrapclassses returns true.

Throws:
SchemaCompilationException

getModelMap

public Map getModelMap()
Gets a map of models. This is useful for tight integrations where the internal workings of the schema compiler may be exposed.


makeFullyQualifiedClassName

public String makeFullyQualifiedClassName(QName qName)
Make the fully qualified class name for an element or named type

Parameters:
qName - the qualified Name for this element or type in the schema
Returns:
the appropriate fully qualified class name to use in generated code

write

public String write(org.apache.ws.commons.schema.XmlSchemaComplexType complexType,
                    Map typeMap,
                    BeanWriterMetaInfoHolder metainf,
                    String fullyQualifiedClassName)
             throws SchemaCompilationException
Write a complex type

Parameters:
complexType -
typeMap -
metainf -
fullyQualifiedClassName - the name returned by makeFullyQualifiedClassName() or null if it wasn't called
Returns:
Returns String.
Throws:
SchemaCompilationException

write

public String write(org.apache.ws.commons.schema.XmlSchemaElement element,
                    Map typeMap,
                    BeanWriterMetaInfoHolder metainf)
             throws SchemaCompilationException
Write a element

Parameters:
element -
typeMap -
metainf -
Returns:
Returns String.
Throws:
SchemaCompilationException

write

public String write(org.apache.ws.commons.schema.XmlSchemaSimpleType simpleType,
                    Map typeMap,
                    BeanWriterMetaInfoHolder metainf)
             throws SchemaCompilationException
Write a simple type

Parameters:
simpleType -
typeMap -
metainf -
Returns:
Returns String.
Throws:
SchemaCompilationException