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

All Known Implementing Classes:
SGFactoryImpl

public interface SGFactory

Interface of a factory for SG classes.

Author:
Jochen Wiedmann

Method Summary
 Generator getGenerator()
          Returns the Generator.
 GroupSG[] getGroups()
          Returns an array of all groups created by the factory.
 GroupSG getGroupSG(XSGroup pGroup)
          Returns an instance of GroupSG generating the given schema.
 GroupSG getGroupSG(XSGroup pGroup, Context pClassContext)
          Returns an instance of GroupSG, which is embedded into the given Context.
 ObjectSG[] getObjects()
          Returns an array of all objects created by the factory.
 ObjectSG getObjectSG(XSElement pElement)
          Returns an instance of ObjectSG generating the given element.
 ObjectSG getObjectSG(XSElement pElement, Context pContext)
          Returns an instance of ObjectSG generating the given element in the given context.
 SchemaSG getSchemaSG()
          Returns the factorys instance of SchemaSG.
 SchemaSG getSchemaSG(XSSchema pSchema)
          Returns an instance of SchemaSG generating the given schema.
 TypeSG[] getTypes()
          Returns an array of all types created by the factory.
 TypeSG getTypeSG(XSType pType)
          Returns a global instance of TypeSG generating the given type.
 TypeSG getTypeSG(XSType pType, Context pClassContext, XsQName pName)
          Returns a local instance of TypeSG generating the given type within the given Context.
 TypeSG getTypeSG(XSType pType, XsQName pName)
          Returns a new instance of TypeSG generating the given type, as if it were a global type with the given name.
 void init()
          Initializes the SGFactory.
 Facet newFacet(XSType pType, XSEnumeration[] pEnumerations)
          Creates a new enumeration facet.
 GroupSG newGroupSG(XSGroup pGroup)
          Creates a new instance of GroupSG generating the given schema.
 GroupSG newGroupSG(XSGroup pGroup, Context pClassContext)
          Creates a new instance of GroupSG, which is embedded into the given Context.
 java.lang.Object newObjectSG(XSElement pElement)
          Creates a new instance of ObjectSG generating the given element.
 java.lang.Object newObjectSG(XSElement pElement, Context pContext)
          Creates a new instance of ObjectSG generating the given element in the given context.
 java.lang.Object newSchemaSG(XSSchema pSchema)
          Creates a new instance of SchemaSG generating the given schema.
 java.lang.Object newTypeSG(XSType pType)
          Creates a new, global instance of TypeSGChain generating the given type.
 java.lang.Object newTypeSG(XSType pType, Context pClassContext, XsQName pName)
          Creates a new, local instance of TypeSGChain, generating the given type within the given Context.
 java.lang.Object newTypeSG(XSType pType, XsQName pName)
          Creates a new, local instance of TypeSGChain, as if it were a global type with the given name.
 XsObjectFactory newXsObjectFactory()
          Creates a new instance of XsObjectFactory, used by the parser.
 XSObjectFactory newXSObjectFactory()
          Creates a new instance of XSObjectFactory, used by the parser.
 XSParser newXSParser()
          Creates a new instance of XSParser.
 

Method Detail

getGenerator

public Generator getGenerator()

Returns the Generator.


init

public void init()

Initializes the SGFactory.


newXsObjectFactory

public XsObjectFactory newXsObjectFactory()
                                   throws org.xml.sax.SAXException

Creates a new instance of XsObjectFactory, used by the parser.

Throws:
org.xml.sax.SAXException

newXSObjectFactory

public XSObjectFactory newXSObjectFactory()
                                   throws org.xml.sax.SAXException

Creates a new instance of XSObjectFactory, used by the parser.

Throws:
org.xml.sax.SAXException

newSchemaSG

public java.lang.Object newSchemaSG(XSSchema pSchema)
                             throws org.xml.sax.SAXException

Creates a new instance of SchemaSG generating the given schema.

Throws:
org.xml.sax.SAXException

getSchemaSG

public SchemaSG getSchemaSG(XSSchema pSchema)
                     throws org.xml.sax.SAXException

Returns an instance of SchemaSG generating the given schema.

Throws:
org.xml.sax.SAXException

getSchemaSG

public SchemaSG getSchemaSG()

Returns the factorys instance of SchemaSG.

Throws:
java.lang.IllegalStateException - The factory has not yet created an instance of SchemaSG. In other words, the methods newSchemaSG(XSSchema) and getSchemaSG(XSSchema) have not yet been invoked.

newObjectSG

public java.lang.Object newObjectSG(XSElement pElement)
                             throws org.xml.sax.SAXException

Creates a new instance of ObjectSG generating the given element.

Throws:
org.xml.sax.SAXException

getObjectSG

public ObjectSG getObjectSG(XSElement pElement)
                     throws org.xml.sax.SAXException

Returns an instance of ObjectSG generating the given element.

Throws:
org.xml.sax.SAXException

newObjectSG

public java.lang.Object newObjectSG(XSElement pElement,
                                    Context pContext)
                             throws org.xml.sax.SAXException

Creates a new instance of ObjectSG generating the given element in the given context.

Throws:
org.xml.sax.SAXException

getObjectSG

public ObjectSG getObjectSG(XSElement pElement,
                            Context pContext)
                     throws org.xml.sax.SAXException

Returns an instance of ObjectSG generating the given element in the given context.

Throws:
org.xml.sax.SAXException

newGroupSG

public GroupSG newGroupSG(XSGroup pGroup)
                   throws org.xml.sax.SAXException

Creates a new instance of GroupSG generating the given schema.

Throws:
org.xml.sax.SAXException

getGroupSG

public GroupSG getGroupSG(XSGroup pGroup)
                   throws org.xml.sax.SAXException

Returns an instance of GroupSG generating the given schema.

Throws:
org.xml.sax.SAXException

newGroupSG

public GroupSG newGroupSG(XSGroup pGroup,
                          Context pClassContext)
                   throws org.xml.sax.SAXException

Creates a new instance of GroupSG, which is embedded into the given Context.

Throws:
org.xml.sax.SAXException

getGroupSG

public GroupSG getGroupSG(XSGroup pGroup,
                          Context pClassContext)
                   throws org.xml.sax.SAXException

Returns an instance of GroupSG, which is embedded into the given Context.

Throws:
org.xml.sax.SAXException

newTypeSG

public java.lang.Object newTypeSG(XSType pType)
                           throws org.xml.sax.SAXException

Creates a new, global instance of TypeSGChain generating the given type.

Implementation note: The type TypeSGChain 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 TypeSGChain interface.

Throws:
org.xml.sax.SAXException

getTypeSG

public TypeSG getTypeSG(XSType pType)
                 throws org.xml.sax.SAXException

Returns a global instance of TypeSG generating the given type.

Throws:
org.xml.sax.SAXException

newTypeSG

public java.lang.Object newTypeSG(XSType pType,
                                  Context pClassContext,
                                  XsQName pName)
                           throws org.xml.sax.SAXException

Creates a new, local instance of TypeSGChain, generating the given type within the given Context.

Implementation note: The type TypeSGChain 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 TypeSGChain interface.

Throws:
org.xml.sax.SAXException

getTypeSG

public TypeSG getTypeSG(XSType pType,
                        Context pClassContext,
                        XsQName pName)
                 throws org.xml.sax.SAXException

Returns a local instance of TypeSG generating the given type within the given Context.

Throws:
org.xml.sax.SAXException

newTypeSG

public java.lang.Object newTypeSG(XSType pType,
                                  XsQName pName)
                           throws org.xml.sax.SAXException

Creates a new, local instance of TypeSGChain, as if it were a global type with the given name.

Implementation note: The type TypeSGChain 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 TypeSGChain interface.

Throws:
org.xml.sax.SAXException

getTypeSG

public TypeSG getTypeSG(XSType pType,
                        XsQName pName)
                 throws org.xml.sax.SAXException

Returns a new instance of TypeSG generating the given type, as if it were a global type with the given name.

Throws:
org.xml.sax.SAXException

newXSParser

public XSParser newXSParser()
                     throws org.xml.sax.SAXException

Creates a new instance of XSParser.

Throws:
org.xml.sax.SAXException

newFacet

public Facet newFacet(XSType pType,
                      XSEnumeration[] pEnumerations)
               throws org.xml.sax.SAXException

Creates a new enumeration facet.

Throws:
org.xml.sax.SAXException

getGroups

public GroupSG[] getGroups()

Returns an array of all groups created by the factory.


getTypes

public TypeSG[] getTypes()

Returns an array of all types created by the factory.


getObjects

public ObjectSG[] getObjects()

Returns an array of all objects created by the factory.