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

java.lang.Object
  extended by org.apache.ws.jaxme.generator.sg.impl.SchemaSGImpl
All Implemented Interfaces:
SchemaSG, SGItem

public class SchemaSGImpl
extends java.lang.Object
implements SchemaSG, SGItem


Constructor Summary
SchemaSGImpl(SchemaSGChain o)
           
 
Method Summary
 void generate()
          Performs the source generation.
 void generateJaxbProperties()
          Creates the "jaxb.properties" file.
 java.lang.String getCollectionType()
          Returns the schemas collection type, as specified by the JAXB globalBindings tag.
 org.w3c.dom.Document getConfigFile(java.lang.String pPackageName, java.util.List pContextList)
          Generates the "Configuration.xml" file as a DOM node.
 ObjectSG getElement(XsQName pName)
          Returns the schemas global element with the given name or null, if no such element exists.
 ObjectSG[] getElements()
          Returns the schemas global elements.
 SGFactory getFactory()
          Returns the factory that created this item.
 GroupSG getGroup(XsQName pName)
          Returns the schemas global group with the given name or null, if no such type exists.
 GroupSG[] getGroups()
          Returns the schemas model groups.
 SchemaSGChain getHeadOfChain()
           
 JavaSourceFactory getJavaSourceFactory()
          Returns the schemas JavaSourceFactory.
 JAXBJavaType[] getJAXBJavaTypes()
          Returns the globally configured instances of JAXBJavaType.
 org.xml.sax.Locator getLocator()
          Returns the items location in the schema; useful for error messages.
 ObjectSG[] getObjects()
          Returns the schemas global attributes and elements.
 SchemaSG getSchema()
          Returns the items schema.
 TypeSG getType(XsQName pName)
          Returns the schemas global type with the given name or null, if no such type exists.
 TypeSG[] getTypes()
          Returns the schemas global types.
 XsQName[] getTypesafeEnumBase()
          Returns the globally configured value for typesafeenumbase.
 void init()
          Initializes the item.
 boolean isBindingStyleModelGroup()
          Returns whether the schema prefers model group binding style or not.
 boolean isChoiceContentProperty()
          Returns whether the value "choiceContentProperty" is enabled.
 boolean isFailFastCheckEnabled()
          Returns whether the property "enableFailFastCheck" is enabled.
 boolean isFixedAttributeConstantProperty()
          Returns whether the property "isFixedAttributeConstantProperty" is enabled.
 boolean isGeneratingIsSetMethod()
          Returns whether the property "generateIsSetMethod" is enabled.
 boolean isJavaNamingConventionsEnabled()
          Returns whether the property "enableJavaConventions" is enabled.
 boolean isUnderscoreWordSeparator()
          Returns whether the property "underscoreBinding" has the value "asWordSeparator".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaSGImpl

public SchemaSGImpl(SchemaSGChain o)
Method Detail

getTypes

public TypeSG[] getTypes()
                  throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Returns the schemas global types.

Specified by:
getTypes in interface SchemaSG
Throws:
org.xml.sax.SAXException

getType

public TypeSG getType(XsQName pName)
               throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Returns the schemas global type with the given name or null, if no such type exists.

Specified by:
getType in interface SchemaSG
Throws:
org.xml.sax.SAXException

getGroups

public GroupSG[] getGroups()
                    throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Returns the schemas model groups.

Specified by:
getGroups in interface SchemaSG
Throws:
org.xml.sax.SAXException

getGroup

public GroupSG getGroup(XsQName pName)
                 throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Returns the schemas global group with the given name or null, if no such type exists.

Specified by:
getGroup in interface SchemaSG
Throws:
org.xml.sax.SAXException

getObjects

public ObjectSG[] getObjects()
                      throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Returns the schemas global attributes and elements.

Specified by:
getObjects in interface SchemaSG
Throws:
org.xml.sax.SAXException

getElement

public ObjectSG getElement(XsQName pName)
                    throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Returns the schemas global element with the given name or null, if no such element exists.

Specified by:
getElement in interface SchemaSG
Throws:
org.xml.sax.SAXException

getElements

public ObjectSG[] getElements()
                       throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Returns the schemas global elements.

Specified by:
getElements in interface SchemaSG
Throws:
org.xml.sax.SAXException

getCollectionType

public java.lang.String getCollectionType()
Description copied from interface: SchemaSG

Returns the schemas collection type, as specified by the JAXB globalBindings tag.

Specified by:
getCollectionType in interface SchemaSG

getJavaSourceFactory

public JavaSourceFactory getJavaSourceFactory()
Description copied from interface: SchemaSG

Returns the schemas JavaSourceFactory.

Specified by:
getJavaSourceFactory in interface SchemaSG

generate

public void generate()
              throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Performs the source generation.

Specified by:
generate in interface SchemaSG
Throws:
org.xml.sax.SAXException

isBindingStyleModelGroup

public boolean isBindingStyleModelGroup()
Description copied from interface: SchemaSG

Returns whether the schema prefers model group binding style or not. Defaults to false.

Specified by:
isBindingStyleModelGroup in interface SchemaSG

isChoiceContentProperty

public boolean isChoiceContentProperty()
Description copied from interface: SchemaSG

Returns whether the value "choiceContentProperty" is enabled. Defaults to false.

Specified by:
isChoiceContentProperty in interface SchemaSG

isFailFastCheckEnabled

public boolean isFailFastCheckEnabled()
Description copied from interface: SchemaSG

Returns whether the property "enableFailFastCheck" is enabled. Defaults to false.

Specified by:
isFailFastCheckEnabled in interface SchemaSG

isJavaNamingConventionsEnabled

public boolean isJavaNamingConventionsEnabled()
Description copied from interface: SchemaSG

Returns whether the property "enableJavaConventions" is enabled. Defaults to true.

Specified by:
isJavaNamingConventionsEnabled in interface SchemaSG

isFixedAttributeConstantProperty

public boolean isFixedAttributeConstantProperty()
Description copied from interface: SchemaSG

Returns whether the property "isFixedAttributeConstantProperty" is enabled. Defaults to false.

Specified by:
isFixedAttributeConstantProperty in interface SchemaSG

isGeneratingIsSetMethod

public boolean isGeneratingIsSetMethod()
Description copied from interface: SchemaSG

Returns whether the property "generateIsSetMethod" is enabled. Defaults to false.

Specified by:
isGeneratingIsSetMethod in interface SchemaSG

isUnderscoreWordSeparator

public boolean isUnderscoreWordSeparator()
Description copied from interface: SchemaSG

Returns whether the property "underscoreBinding" has the value "asWordSeparator". Defaults to true.

Specified by:
isUnderscoreWordSeparator in interface SchemaSG

getJAXBJavaTypes

public JAXBJavaType[] getJAXBJavaTypes()
Description copied from interface: SchemaSG

Returns the globally configured instances of JAXBJavaType.

Specified by:
getJAXBJavaTypes in interface SchemaSG

getTypesafeEnumBase

public XsQName[] getTypesafeEnumBase()
Description copied from interface: SchemaSG

Returns the globally configured value for typesafeenumbase.

Specified by:
getTypesafeEnumBase in interface SchemaSG

getConfigFile

public org.w3c.dom.Document getConfigFile(java.lang.String pPackageName,
                                          java.util.List pContextList)
                                   throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Generates the "Configuration.xml" file as a DOM node. Event handlers may modify the DOM node.

Specified by:
getConfigFile in interface SchemaSG
Parameters:
pPackageName - The package, for which a configuration is being generated.
pContextList - A list of objects generated in the package.
Throws:
org.xml.sax.SAXException

generateJaxbProperties

public void generateJaxbProperties()
                            throws org.xml.sax.SAXException
Description copied from interface: SchemaSG

Creates the "jaxb.properties" file.

Specified by:
generateJaxbProperties in interface SchemaSG
Throws:
org.xml.sax.SAXException

getFactory

public SGFactory getFactory()
Description copied from interface: SGItem

Returns the factory that created this item.

Specified by:
getFactory in interface SGItem

getSchema

public SchemaSG getSchema()
Description copied from interface: SGItem

Returns the items schema.

Specified by:
getSchema in interface SGItem

getLocator

public org.xml.sax.Locator getLocator()
Description copied from interface: SGItem

Returns the items location in the schema; useful for error messages.

Specified by:
getLocator in interface SGItem

init

public void init()
          throws org.xml.sax.SAXException
Description copied from interface: SGItem

Initializes the item.

Specified by:
init in interface SGItem
Throws:
org.xml.sax.SAXException

getHeadOfChain

public SchemaSGChain getHeadOfChain()