|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ws.jaxme.generator.sg.impl.TypeSGImpl
public class TypeSGImpl
Constructor Summary | |
---|---|
TypeSGImpl(TypeSGChain o)
|
Method Summary | |
---|---|
void |
generate()
Generates the types sources. |
void |
generate(JavaSource pSource)
Generates the types sources as an inner class of the given. |
ComplexTypeSG |
getComplexTypeSG()
If the type is complex: Returns an instance of ComplexTypeSG generating the type. |
TypeSG |
getExtendedType()
If the type is an extension: Returns the extended type. |
SGFactory |
getFactory()
Returns the factory that created this item. |
TypeSGChain |
getHeadOfChain()
|
org.xml.sax.Locator |
getLocator()
Returns the items location in the schema; useful for error messages. |
XsQName |
getName()
If the type is global: Returns the types name. |
java.lang.Object |
getProperty(java.lang.String pName)
A property allows to store custom data related to the type. |
TypeSG |
getRestrictedType()
If the type is a restriction: Returns the restricted type. |
JavaQName |
getRuntimeType()
Returns the types runtime type. |
SchemaSG |
getSchema()
Returns the items schema. |
XsSchemaHeader |
getSchemaHeader()
Returns information on the types syntactical context. |
SimpleTypeSG |
getSimpleTypeSG()
If the type is simple: Returns an instance of SimpleTypeSG
for generating the type. |
JavaField |
getXMLField(JavaSource pSource,
java.lang.String pFieldName,
java.lang.String pDefaultValue)
Generates a Java field for an instance of this type. |
JavaMethod |
getXMLGetMethod(JavaSource pSource,
java.lang.String pFieldName,
java.lang.String pMethodName)
Generates a get method returning an instance of this type. |
JavaMethod |
getXMLIsSetMethod(JavaSource pSource,
java.lang.String pFieldName,
java.lang.String pMethodName)
Generates an "isSet" method returning whether the field is set. |
JavaMethod |
getXMLSetMethod(JavaSource pSource,
java.lang.String pFieldName,
java.lang.String pParamName,
java.lang.String pMethodName,
boolean pSetIsSet)
Generates a set method returning an instance of this type. |
void |
init()
Initializes the item. |
boolean |
isComplex()
Returns whether the type is complex. |
boolean |
isExtension()
Returns whether the type is an extension of another type. |
boolean |
isGlobalClass()
Returns whether this type is generated with a global class. |
boolean |
isGlobalType()
Returns whether this is a global type. |
boolean |
isRestriction()
Returns whether the type is a restriction of another type. |
java.lang.Object |
newComplexTypeSG()
If the type is complex: Creates an instance of ComplexTypeSGChain generating the type. |
java.lang.Object |
newSimpleTypeSG()
If the type is simple: Creates a new instance of SimpleTypeSGChain generating the type. |
void |
setProperty(java.lang.String pName,
java.lang.Object pValue)
A property allows to store custom data related to the type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeSGImpl(TypeSGChain o)
Method Detail |
---|
public void setProperty(java.lang.String pName, java.lang.Object pValue)
TypeSG
A property allows to store custom data related to the type. Properties are used by external source generators. For example, the JDBC source generator will use this to store the complex types table name here.
setProperty
in interface TypeSG
public java.lang.Object getProperty(java.lang.String pName)
TypeSG
A property allows to store custom data related to the type. Properties are used by external source generators. For example, the JDBC source generator will use this to store the complex types table name here.
getProperty
in interface TypeSG
public boolean isGlobalType()
TypeSG
Returns whether this is a global type.
isGlobalType
in interface TypeSG
public boolean isGlobalClass()
TypeSG
Returns whether this type is generated with a global class.
isGlobalClass
in interface TypeSG
public XsQName getName()
TypeSG
If the type is global: Returns the types name.
getName
in interface TypeSG
public boolean isComplex()
TypeSG
Returns whether the type is complex. If so, it is valid to
invoke the method TypeSG.getComplexTypeSG()
. Otherwise, you may
invoke the method TypeSG.getSimpleTypeSG()
.
isComplex
in interface TypeSG
public java.lang.Object newSimpleTypeSG() throws org.xml.sax.SAXException
TypeSG
If the type is simple: Creates a new instance of
SimpleTypeSGChain
generating the type.
Implementation note: The type
SimpleTypeSGChain
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
SimpleTypeSGChain
interface.
newSimpleTypeSG
in interface TypeSG
org.xml.sax.SAXException
public java.lang.Object newComplexTypeSG() throws org.xml.sax.SAXException
TypeSG
If the type is complex: Creates an instance of
ComplexTypeSGChain
generating the type.
Implementation note: The type
ComplexTypeSGChain
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
ComplexTypeSGChain
interface.
newComplexTypeSG
in interface TypeSG
org.xml.sax.SAXException
public ComplexTypeSG getComplexTypeSG()
TypeSG
If the type is complex: Returns an instance of
ComplexTypeSG
generating the type.
getComplexTypeSG
in interface TypeSG
public SimpleTypeSG getSimpleTypeSG()
TypeSG
If the type is simple: Returns an instance of SimpleTypeSG
for generating the type.
getSimpleTypeSG
in interface TypeSG
public JavaField getXMLField(JavaSource pSource, java.lang.String pFieldName, java.lang.String pDefaultValue) throws org.xml.sax.SAXException
TypeSG
Generates a Java field for an instance of this type.
getXMLField
in interface TypeSG
org.xml.sax.SAXException
public JavaMethod getXMLGetMethod(JavaSource pSource, java.lang.String pFieldName, java.lang.String pMethodName) throws org.xml.sax.SAXException
TypeSG
Generates a get method returning an instance of this type.
getXMLGetMethod
in interface TypeSG
org.xml.sax.SAXException
public JavaMethod getXMLSetMethod(JavaSource pSource, java.lang.String pFieldName, java.lang.String pParamName, java.lang.String pMethodName, boolean pSetIsSet) throws org.xml.sax.SAXException
TypeSG
Generates a set method returning an instance of this type.
getXMLSetMethod
in interface TypeSG
org.xml.sax.SAXException
public JavaMethod getXMLIsSetMethod(JavaSource pSource, java.lang.String pFieldName, java.lang.String pMethodName) throws org.xml.sax.SAXException
TypeSG
Generates an "isSet" method returning whether the field is set.
getXMLIsSetMethod
in interface TypeSG
org.xml.sax.SAXException
public JavaQName getRuntimeType() throws org.xml.sax.SAXException
TypeSG
Returns the types runtime type.
getRuntimeType
in interface TypeSG
org.xml.sax.SAXException
public void generate() throws org.xml.sax.SAXException
TypeSG
Generates the types sources.
generate
in interface TypeSG
org.xml.sax.SAXException
public void generate(JavaSource pSource) throws org.xml.sax.SAXException
TypeSG
Generates the types sources as an inner class of the given.
generate
in interface TypeSG
org.xml.sax.SAXException
public boolean isRestriction()
TypeSG
Returns whether the type is a restriction of another type.
isRestriction
in interface TypeSG
public TypeSG getRestrictedType()
TypeSG
If the type is a restriction: Returns the restricted type.
getRestrictedType
in interface TypeSG
public boolean isExtension()
TypeSG
Returns whether the type is an extension of another type.
isExtension
in interface TypeSG
public TypeSG getExtendedType()
TypeSG
If the type is an extension: Returns the extended type.
getExtendedType
in interface TypeSG
public XsSchemaHeader getSchemaHeader()
TypeSG
Returns information on the types syntactical context.
getSchemaHeader
in interface TypeSG
public SGFactory getFactory()
SGItem
Returns the factory that created this item.
getFactory
in interface SGItem
public SchemaSG getSchema()
SGItem
Returns the items schema.
getSchema
in interface SGItem
public org.xml.sax.Locator getLocator()
SGItem
Returns the items location in the schema; useful for error messages.
getLocator
in interface SGItem
public void init() throws org.xml.sax.SAXException
SGItem
Initializes the item.
init
in interface SGItem
org.xml.sax.SAXException
public TypeSGChain getHeadOfChain()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |