org.apache.ws.jaxme.generator.sg.impl

Class ComplexTypeSGImpl

Implemented Interfaces:
ComplexTypeSG

public class ComplexTypeSGImpl
extends java.lang.Object
implements ComplexTypeSG

Constructor Summary

ComplexTypeSGImpl(ComplexTypeSGChain o)

Method Summary

void
addAttributeSG(AttributeSG pAttribute)
Adds the given AttributeSG to the list of attributes and invokes the method SGItem.init() on it.
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.
ComplexTypeSGChain
getHeadOfChain()
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(JavaQName pQName)
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.
Object
newAttributeSG(XSAttribute pAttribute)
Creates a new instance of AttributeSGChain generating the given attribute.
Object
newAttributeSG(XSWildcard pWildcard)
Creates a new instance of AttributeSGChain generating the given wildcard attributes.
Object
newComplexContentTypeSG()
If the complex type has complex content: Creates an instance of ComplexContentSGChain generating the given complex type.
Object
newSimpleContentTypeSG()
If the complex type has simple content: Creates an instance of SimpleContentSGChain generating the type.

Constructor Details

ComplexTypeSGImpl

public ComplexTypeSGImpl(ComplexTypeSGChain o)

Method Details

addAttributeSG

public void addAttributeSG(AttributeSG pAttribute)
            throws SAXException
Adds the given AttributeSG to the list of attributes and invokes the method SGItem.init() on it.
Specified by:
addAttributeSG in interface ComplexTypeSG

getAttributes

public AttributeSG[] getAttributes()
Returns the data types array of attributes.
Specified by:
getAttributes in interface ComplexTypeSG

getClassContext

public Context getClassContext()
Returns the datatypes runtime type, which is the binding interface.
Specified by:
getClassContext in interface ComplexTypeSG

getComplexContentSG

public ComplexContentSG getComplexContentSG()
If the data type has complex content: Returns an instance of ComplexContentSG. Uses ComplexTypeSG.newComplexContentTypeSG() internally.
Specified by:
getComplexContentSG in interface ComplexTypeSG

getHeadOfChain

public ComplexTypeSGChain getHeadOfChain()

getLocator

public Locator getLocator()
Returns the types Locator.
Specified by:
getLocator in interface ComplexTypeSG

getSimpleContentSG

public SimpleContentSG getSimpleContentSG()
If the data type has simple content: Returns an instance of SimpleContentSG. Uses ComplexTypeSG.newSimpleContentTypeSG() internally.
Specified by:
getSimpleContentSG in interface ComplexTypeSG

getTypeSG

public TypeSG getTypeSG()
Returns the TypeSG that created this instance.
Specified by:
getTypeSG in interface ComplexTypeSG

getXMLHandler

public JavaSource getXMLHandler(JavaQName pQName)
            throws SAXException
Generates the types XML handler as a standalone class. This is used for global types.
Specified by:
getXMLHandler in interface ComplexTypeSG

getXMLHandler

public JavaSource getXMLHandler(JavaSource pSource)
            throws SAXException
Generates the types XML handler as an inner class of the given. This is used for local types.
Specified by:
getXMLHandler in interface ComplexTypeSG

getXMLImplementation

public JavaSource getXMLImplementation()
            throws SAXException
Generates the types implementation as a standalone class. This is used for global types.
Specified by:
getXMLImplementation in interface ComplexTypeSG

getXMLImplementation

public JavaSource getXMLImplementation(JavaSource pSource)
            throws SAXException
Generates the types implementation as an inner class of the given.
Specified by:
getXMLImplementation in interface ComplexTypeSG

getXMLInterface

public JavaSource getXMLInterface()
            throws SAXException
Generates the types interface as a standalone class. This is used for global types.
Specified by:
getXMLInterface in interface ComplexTypeSG

getXMLInterface

public JavaSource getXMLInterface(JavaSource pSource)
            throws SAXException
Generates the types interface as an inner class of the given.
Specified by:
getXMLInterface in interface ComplexTypeSG

getXMLSerializer

public JavaSource getXMLSerializer()
            throws SAXException
Generates the types XML serializer as a standalone class. This is used for global types.
Specified by:
getXMLSerializer in interface ComplexTypeSG

getXMLSerializer

public JavaSource getXMLSerializer(JavaSource pSource)
            throws SAXException
Generates the types XML serializer as an inner class of the given. This is used for local types.
Specified by:
getXMLSerializer in interface ComplexTypeSG

hasAttributes

public boolean hasAttributes()
Returns whether the data type has attributes.
Specified by:
hasAttributes in interface ComplexTypeSG

hasSimpleContent

public boolean hasSimpleContent()
Returns whether the data type has simple content.
Specified by:
hasSimpleContent in interface ComplexTypeSG

init

public void init()
            throws SAXException
Initializes the instance.
Specified by:
init in interface ComplexTypeSG

newAttributeSG

public Object newAttributeSG(XSAttribute pAttribute)
            throws SAXException
Creates a new instance of AttributeSGChain generating the given attribute.
Specified by:
newAttributeSG in interface ComplexTypeSG

newAttributeSG

public Object newAttributeSG(XSWildcard pWildcard)
            throws SAXException
Creates a new instance of AttributeSGChain generating the given wildcard attributes.
Specified by:
newAttributeSG in interface ComplexTypeSG

newComplexContentTypeSG

public Object newComplexContentTypeSG()
            throws 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.

Specified by:
newComplexContentTypeSG in interface ComplexTypeSG

newSimpleContentTypeSG

public Object newSimpleContentTypeSG()
            throws 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.

Specified by:
newSimpleContentTypeSG in interface ComplexTypeSG