org.apache.ws.jaxme.generator.sg
Interface ComplexTypeSG

All Known Implementing Classes:
ComplexTypeSGImpl

public interface ComplexTypeSG

Interface of a source generator for complex types.

Author:
Jochen Wiedmann

Method Summary
 void addAttributeSG(AttributeSG pAttribute)
          Adds the given AttributeSG to the list of attributes and invokes the method SGItem.init() on it.
 void generateXMLHandlerMethods(JavaSource pSource)
          Generates the types handler by adding methods to the given class.
 void generateXMLImplementationMethods(JavaSource pSource)
          Generates the types implementation by adding methods to the given class.
 void generateXMLInterfaceMethods(JavaSource pSource)
          Generates the types interface by adding methods to the given class.
 void generateXMLSerializerMethods(JavaSource pSource)
          Generates the types serializer by adding methods to the given class.
 AttributeSG[] getAttributes()
          Returns the data types array of attributes.
 Context getClassContext()
          Returns the datatypes runtime type, which is the binding interface.
 ComplexContentSG getComplexContentSG()
          If the data type has complex content: Returns an instance of ComplexContentSG.
 org.xml.sax.Locator getLocator()
          Returns the types Locator.
 SimpleContentSG getSimpleContentSG()
          If the data type has simple content: Returns an instance of SimpleContentSG.
 TypeSG getTypeSG()
          Returns the TypeSG that created this instance.
 JavaSource getXMLHandler()
          Generates the types XML handler as a standalone class.
 JavaSource getXMLHandler(JavaSource pSource)
          Generates the types XML handler as an inner class of the given.
 JavaSource getXMLImplementation()
          Generates the types implementation as a standalone class.
 JavaSource getXMLImplementation(JavaSource pSource)
          Generates the types implementation as an inner class of the given.
 JavaSource getXMLInterface()
          Generates the types interface as a standalone class.
 JavaSource getXMLInterface(JavaSource pSource)
          Generates the types interface as an inner class of the given.
 JavaSource getXMLSerializer()
          Generates the types XML serializer as a standalone class.
 JavaSource getXMLSerializer(JavaSource pSource)
          Generates the types XML serializer as an inner class of the given.
 boolean hasAttributes()
          Returns whether the data type has attributes.
 boolean hasSimpleContent()
          Returns whether the data type has simple content.
 void init()
          Initializes the instance.
 java.lang.Object newAttributeSG(XSAttribute pAttribute)
          Creates a new instance of AttributeSGChain generating the given attribute.
 java.lang.Object newComplexContentTypeSG()
          If the complex type has complex content: Creates an instance of ComplexContentSGChain generating the given complex type.
 java.lang.Object newSimpleContentTypeSG()
          If the complex type has simple content: Creates an instance of SimpleContentSGChain generating the type.
 

Method Detail

init

public void init()
          throws org.xml.sax.SAXException

Initializes the instance.

Throws:
org.xml.sax.SAXException

getTypeSG

public TypeSG getTypeSG()

Returns the TypeSG that created this instance.


getLocator

public org.xml.sax.Locator getLocator()

Returns the types Locator.


getClassContext

public Context getClassContext()

Returns the datatypes runtime type, which is the binding interface.


getXMLInterface

public JavaSource getXMLInterface()
                           throws org.xml.sax.SAXException

Generates the types interface as a standalone class. This is used for global types.

Throws:
org.xml.sax.SAXException

getXMLInterface

public JavaSource getXMLInterface(JavaSource pSource)
                           throws org.xml.sax.SAXException

Generates the types interface as an inner class of the given.

Throws:
org.xml.sax.SAXException

generateXMLInterfaceMethods

public void generateXMLInterfaceMethods(JavaSource pSource)
                                 throws org.xml.sax.SAXException

Generates the types interface by adding methods to the given class.

Throws:
org.xml.sax.SAXException

getXMLImplementation

public JavaSource getXMLImplementation()
                                throws org.xml.sax.SAXException

Generates the types implementation as a standalone class. This is used for global types.

Throws:
org.xml.sax.SAXException

getXMLImplementation

public JavaSource getXMLImplementation(JavaSource pSource)
                                throws org.xml.sax.SAXException

Generates the types implementation as an inner class of the given.

Throws:
org.xml.sax.SAXException

getXMLSerializer

public JavaSource getXMLSerializer()
                            throws org.xml.sax.SAXException

Generates the types XML serializer as a standalone class. This is used for global types.

Throws:
org.xml.sax.SAXException

getXMLSerializer

public JavaSource getXMLSerializer(JavaSource pSource)
                            throws org.xml.sax.SAXException

Generates the types XML serializer as an inner class of the given. This is used for local types.

Throws:
org.xml.sax.SAXException

getXMLHandler

public JavaSource getXMLHandler()
                         throws org.xml.sax.SAXException

Generates the types XML handler as a standalone class. This is used for global types.

Throws:
org.xml.sax.SAXException

getXMLHandler

public JavaSource getXMLHandler(JavaSource pSource)
                         throws org.xml.sax.SAXException

Generates the types XML handler as an inner class of the given. This is used for local types.

Throws:
org.xml.sax.SAXException

generateXMLImplementationMethods

public void generateXMLImplementationMethods(JavaSource pSource)
                                      throws org.xml.sax.SAXException

Generates the types implementation by adding methods to the given class.

Throws:
org.xml.sax.SAXException

generateXMLSerializerMethods

public void generateXMLSerializerMethods(JavaSource pSource)
                                  throws org.xml.sax.SAXException

Generates the types serializer by adding methods to the given class.

Throws:
org.xml.sax.SAXException

generateXMLHandlerMethods

public void generateXMLHandlerMethods(JavaSource pSource)
                               throws org.xml.sax.SAXException

Generates the types handler by adding methods to the given class.

Throws:
org.xml.sax.SAXException

hasAttributes

public boolean hasAttributes()

Returns whether the data type has attributes.


newAttributeSG

public java.lang.Object newAttributeSG(XSAttribute pAttribute)
                                throws org.xml.sax.SAXException

Creates a new instance of AttributeSGChain generating the given attribute.

Throws:
org.xml.sax.SAXException

addAttributeSG

public void addAttributeSG(AttributeSG pAttribute)
                    throws org.xml.sax.SAXException

Adds the given AttributeSG to the list of attributes and invokes the method SGItem.init() on it.

Throws:
org.xml.sax.SAXException

getAttributes

public AttributeSG[] getAttributes()

Returns the data types array of attributes.


hasSimpleContent

public boolean hasSimpleContent()

Returns whether the data type has simple content.


newSimpleContentTypeSG

public java.lang.Object newSimpleContentTypeSG()
                                        throws org.xml.sax.SAXException

If the complex type has simple content: Creates an instance of SimpleContentSGChain generating the type.

Implementation note: The type SimpleContentSGChain must not be exposed in the interface, because the interface class is used to generate this type. In other words, this interface must be compilable without the SimpleContentSGChain interface.

Throws:
org.xml.sax.SAXException

getSimpleContentSG

public SimpleContentSG getSimpleContentSG()

If the data type has simple content: Returns an instance of SimpleContentSG. Uses newSimpleContentTypeSG() internally.


newComplexContentTypeSG

public java.lang.Object newComplexContentTypeSG()
                                         throws org.xml.sax.SAXException

If the complex type has complex content: Creates an instance of ComplexContentSGChain generating the given complex type.

Implementation note: The type ComplexContentSGChain must not be exposed in the interface, because the interface class is used to generate this type. In other words, this interface must be compilable without the ComplexContentSGChain interface.

Throws:
org.xml.sax.SAXException

getComplexContentSG

public ComplexContentSG getComplexContentSG()

If the data type has complex content: Returns an instance of ComplexContentSG. Uses newComplexContentTypeSG() internally.