org.apache.ws.jaxme.generator.sg

Interface SGFactory

public interface SGFactory

Interface of a factory for SG classes.

Author: Jochen Wiedmann

Method Summary
GeneratorgetGenerator()

Returns the {@link org.apache.ws.jaxme.generator.Generator}.

GroupSG[]getGroups()

Returns an array of all groups created by the factory.

GroupSGgetGroupSG(XSGroup pGroup)

Returns an instance of {@link GroupSG} generating the given schema.

GroupSGgetGroupSG(XSGroup pGroup, Context pClassContext)

Returns an instance of {@link GroupSG}, which is embedded into the given {@link Context}.

ObjectSG[]getObjects()

Returns an array of all objects created by the factory.

ObjectSGgetObjectSG(XSElement pElement)

Returns an instance of {@link ObjectSG} generating the given element.

ObjectSGgetObjectSG(XSElement pElement, Context pContext)

Returns an instance of {@link ObjectSG} generating the given element in the given context.

ObjectSGgetObjectSG(XSAny pWildcard, Context pContext)

Returns an instance of {@link ObjectSG} generating the given wildcard in the given context.

SchemaSGgetSchemaSG(XSSchema pSchema)

Returns an instance of {@link SchemaSG} generating the given schema.

SchemaSGgetSchemaSG()

Returns the factorys instance of {@link SchemaSG}.

TypeSG[]getTypes()

Returns an array of all types created by the factory.

TypeSGgetTypeSG(XSType pType)

Returns a global instance of {@link TypeSG} generating the given type.

TypeSGgetTypeSG(XSType pType, Context pClassContext, XsQName pName)

Returns a local instance of {@link TypeSG} generating the given type within the given {@link Context}.

TypeSGgetTypeSG(XSType pType, XsQName pName)

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

voidinit()

Initializes the {@link SGFactory}.

FacetnewFacet(XSType pType, XSEnumeration[] pEnumerations)

Creates a new enumeration facet.

GroupSGnewGroupSG(XSGroup pGroup)

Creates a new instance of {@link GroupSG} generating the given schema.

GroupSGnewGroupSG(XSGroup pGroup, Context pClassContext)

Creates a new instance of {@link GroupSG}, which is embedded into the given {@link Context}.

ObjectnewObjectSG(XSElement pElement)

Creates a new instance of {@link ObjectSG} generating the given element.

ObjectnewObjectSG(XSElement pElement, Context pContext)

Creates a new instance of {@link ObjectSG} generating the given element in the given context.

ObjectnewObjectSG(XSAny any)

Creates a new instance of {@link ObjectSG} generating the given wildcard in the given context.

ObjectnewSchemaSG(XSSchema pSchema)

Creates a new instance of {@link SchemaSG} generating the given schema.

ObjectnewTypeSG(XSType pType)

Creates a new, global instance of {@link org.apache.ws.jaxme.generator.sg.TypeSGChain} generating the given type.

Implementation note: The type {@link org.apache.ws.jaxme.generator.sg.TypeSGChain} must not be exposed in the interface, because the interface class is used to generate this type.

ObjectnewTypeSG(XSType pType, Context pClassContext, XsQName pName)

Creates a new, local instance of {@link org.apache.ws.jaxme.generator.sg.TypeSGChain}, generating the given type within the given {@link Context}.

ObjectnewTypeSG(XSType pType, XsQName pName)

Creates a new, local instance of {@link org.apache.ws.jaxme.generator.sg.TypeSGChain}, as if it were a global type with the given name.

Implementation note: The type {@link org.apache.ws.jaxme.generator.sg.TypeSGChain} must not be exposed in the interface, because the interface class is used to generate this type.

XsObjectFactorynewXsObjectFactory()

Creates a new instance of {@link org.apache.ws.jaxme.xs.xml.XsObjectFactory}, used by the parser.

XSObjectFactorynewXSObjectFactory()

Creates a new instance of {@link org.apache.ws.jaxme.xs.XSObjectFactory}, used by the parser.

XSParsernewXSParser()

Creates a new instance of {@link XSParser}.

Method Detail

getGenerator

public Generator getGenerator()

Returns the {@link org.apache.ws.jaxme.generator.Generator}.

getGroups

public GroupSG[] getGroups()

Returns an array of all groups created by the factory.

getGroupSG

public GroupSG getGroupSG(XSGroup pGroup)

Returns an instance of {@link GroupSG} generating the given schema.

getGroupSG

public GroupSG getGroupSG(XSGroup pGroup, Context pClassContext)

Returns an instance of {@link GroupSG}, which is embedded into the given {@link Context}.

getObjects

public ObjectSG[] getObjects()

Returns an array of all objects created by the factory.

getObjectSG

public ObjectSG getObjectSG(XSElement pElement)

Returns an instance of {@link ObjectSG} generating the given element.

getObjectSG

public ObjectSG getObjectSG(XSElement pElement, Context pContext)

Returns an instance of {@link ObjectSG} generating the given element in the given context.

getObjectSG

public ObjectSG getObjectSG(XSAny pWildcard, Context pContext)

Returns an instance of {@link ObjectSG} generating the given wildcard in the given context.

getSchemaSG

public SchemaSG getSchemaSG(XSSchema pSchema)

Returns an instance of {@link SchemaSG} generating the given schema.

getSchemaSG

public SchemaSG getSchemaSG()

Returns the factorys instance of {@link SchemaSG}.

Throws: IllegalStateException The factory has not yet created an instance of SchemaSG. In other words, the methods {@link #newSchemaSG(XSSchema)} and {@link #getSchemaSG(XSSchema)} have not yet been invoked.

getTypes

public TypeSG[] getTypes()

Returns an array of all types created by the factory.

getTypeSG

public TypeSG getTypeSG(XSType pType)

Returns a global instance of {@link TypeSG} generating the given type.

getTypeSG

public TypeSG getTypeSG(XSType pType, Context pClassContext, XsQName pName)

Returns a local instance of {@link TypeSG} generating the given type within the given {@link Context}.

getTypeSG

public TypeSG getTypeSG(XSType pType, XsQName pName)

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

init

public void init()

Initializes the {@link SGFactory}.

newFacet

public Facet newFacet(XSType pType, XSEnumeration[] pEnumerations)

Creates a new enumeration facet.

newGroupSG

public GroupSG newGroupSG(XSGroup pGroup)

Creates a new instance of {@link GroupSG} generating the given schema.

newGroupSG

public GroupSG newGroupSG(XSGroup pGroup, Context pClassContext)

Creates a new instance of {@link GroupSG}, which is embedded into the given {@link Context}.

newObjectSG

public Object newObjectSG(XSElement pElement)

Creates a new instance of {@link ObjectSG} generating the given element.

newObjectSG

public Object newObjectSG(XSElement pElement, Context pContext)

Creates a new instance of {@link ObjectSG} generating the given element in the given context.

newObjectSG

public Object newObjectSG(XSAny any)

Creates a new instance of {@link ObjectSG} generating the given wildcard in the given context.

newSchemaSG

public Object newSchemaSG(XSSchema pSchema)

Creates a new instance of {@link SchemaSG} generating the given schema.

newTypeSG

public Object newTypeSG(XSType pType)

Creates a new, global instance of {@link org.apache.ws.jaxme.generator.sg.TypeSGChain} generating the given type.

Implementation note: The type {@link org.apache.ws.jaxme.generator.sg.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 {@link org.apache.ws.jaxme.generator.sg.TypeSGChain} interface.

newTypeSG

public Object newTypeSG(XSType pType, Context pClassContext, XsQName pName)

Creates a new, local instance of {@link org.apache.ws.jaxme.generator.sg.TypeSGChain}, generating the given type within the given {@link Context}.

Implementation note: The type {@link org.apache.ws.jaxme.generator.sg.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 {@link org.apache.ws.jaxme.generator.sg.TypeSGChain} interface.

newTypeSG

public Object newTypeSG(XSType pType, XsQName pName)

Creates a new, local instance of {@link org.apache.ws.jaxme.generator.sg.TypeSGChain}, as if it were a global type with the given name.

Implementation note: The type {@link org.apache.ws.jaxme.generator.sg.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 {@link org.apache.ws.jaxme.generator.sg.TypeSGChain} interface.

newXsObjectFactory

public XsObjectFactory newXsObjectFactory()

Creates a new instance of {@link org.apache.ws.jaxme.xs.xml.XsObjectFactory}, used by the parser.

newXSObjectFactory

public XSObjectFactory newXSObjectFactory()

Creates a new instance of {@link org.apache.ws.jaxme.xs.XSObjectFactory}, used by the parser.

newXSParser

public XSParser newXSParser()

Creates a new instance of {@link XSParser}.