org.jboss.axis.wsdl.symbolTable
Class TypeEntry

java.lang.Object
  extended byorg.jboss.axis.wsdl.symbolTable.SymTabEntry (src) 
      extended byorg.jboss.axis.wsdl.symbolTable.TypeEntry
Direct Known Subclasses:
Element (src) , Type (src)

public abstract class TypeEntry
extends SymTabEntry (src)

This class represents a wsdl types entry that is supported by the WSDL2Java emitter. A TypeEntry has a QName representing its XML name and a name, which in the WSDL2Java back end is its full java name. The TypeEntry may also have a Node, which locates the definition of the emit type in the xml. A TypeEntry object extends SymTabEntry and is built by the SymbolTable class for each supported root complexType, simpleType, and elements that are defined or encountered.

SymTabEntry | TypeEntry / \ Type Element | | (BaseType, (DefinedElement, CollectionType CollectionElement, DefinedType, UndefinedElement) UndefinedType)

UndefinedType and UndefinedElement are placeholders when the real type or element is not encountered yet. Both of these implement the Undefined interface.

A TypeEntry whose java (or other language) name depends on an Undefined type, will have its name initialization deferred until the Undefined type is replaced with a defined type. The updateUndefined() method is invoked by the UndefinedDelegate to update the information.

Each TypeEntry whose language name depends on another TypeEntry will have the refType field set. For example: The TypeEntry for "foo" will have a refType set to the TypeEntry of "bar".

Another Example: The TypeEntry for "hobbyArray" will have a refType that locates the TypeEntry for xsd:string and the dims field will be "[]"


Field Summary
protected  java.lang.String dims
           
protected  boolean isBaseType
           
protected  boolean isSimpleType
           
protected  org.w3c.dom.Node node
           
protected  boolean onlyLiteralReference
           
protected  TypeEntry (src) refType
           
protected  boolean undefined
           
 
Fields inherited from class org.jboss.axis.wsdl.symbolTable.SymTabEntry (src)
name, qname
 
Constructor Summary
protected TypeEntry(QName (src)  pqName)
          Create a TypeEntry object for an xml construct name that represents a base type
protected TypeEntry(QName (src)  pqName, org.w3c.dom.Node pNode)
          Create a TypeEntry object for an xml construct that is not a base type
protected TypeEntry(QName (src)  pqName, TypeEntry (src)  refType, org.w3c.dom.Node pNode, java.lang.String dims)
          Create a TypeEntry object for an xml construct that references another type.
 
Method Summary
 java.lang.String getBaseType()
          Returns the Base Type Name.
 java.lang.String getDimensions()
          Return the dimensions of this type, which can be 0 or more "[]".
 org.w3c.dom.Node getNode()
          Query the node for this type.
 TypeEntry (src) getRefType()
          If this type references another type, return that type, otherwise return null.
protected  TypeEntry (src) getUndefinedTypeRef()
          getUndefinedTypeRef returns the Undefined TypeEntry that this entry depends on or NULL.
 boolean isBaseType()
           
 boolean isOnlyLiteralReferenced()
          Is this type references ONLY as a literal type? If a binding's message's soapBody says: use="literal", then a type is referenced literally.
 boolean isSimpleType()
           
 void setOnlyLiteralReference(boolean set)
          Set the isOnlyLiteralReference flag.
 void setRefType(TypeEntry (src)  refType)
           
 void setSimpleType(boolean simpleType)
           
 java.lang.String toString()
          Get string representation.
protected  java.lang.String toString(java.lang.String indent)
          Get string representation with indentation
protected  boolean updateUndefined(TypeEntry (src)  oldRef, TypeEntry (src)  newRef)
          UpdateUndefined is called when the ref TypeEntry is finally known.
 
Methods inherited from class org.jboss.axis.wsdl.symbolTable.SymTabEntry (src)
getDynamicVar, getName, getQName, isReferenced, setDynamicVar, setIsReferenced, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

node

protected org.w3c.dom.Node node

refType

protected TypeEntry (src)  refType

dims

protected java.lang.String dims

undefined

protected boolean undefined

isBaseType

protected boolean isBaseType

isSimpleType

protected boolean isSimpleType

onlyLiteralReference

protected boolean onlyLiteralReference
Constructor Detail

TypeEntry

protected TypeEntry(QName (src)  pqName,
                    TypeEntry (src)  refType,
                    org.w3c.dom.Node pNode,
                    java.lang.String dims)
Create a TypeEntry object for an xml construct that references another type. Defer processing until refType is known.


TypeEntry

protected TypeEntry(QName (src)  pqName,
                    org.w3c.dom.Node pNode)
Create a TypeEntry object for an xml construct that is not a base type


TypeEntry

protected TypeEntry(QName (src)  pqName)
Create a TypeEntry object for an xml construct name that represents a base type

Method Detail

getNode

public org.w3c.dom.Node getNode()
Query the node for this type.


getBaseType

public java.lang.String getBaseType()
Returns the Base Type Name. For example if the Type represents a schema integer, "int" is returned. If this is a user defined type, null is returned.


isBaseType

public boolean isBaseType()

isSimpleType

public boolean isSimpleType()

setSimpleType

public void setSimpleType(boolean simpleType)

isOnlyLiteralReferenced

public boolean isOnlyLiteralReferenced()
Is this type references ONLY as a literal type? If a binding's message's soapBody says: use="literal", then a type is referenced literally. Note that that type's contained types (ie., an address contains a phone#) are not referenced literally. Since a type that is ONLY referenced as a literal may cause a generator to act differently (like WSDL2Java), this extra reference distinction is needed.


setOnlyLiteralReference

public void setOnlyLiteralReference(boolean set)
Set the isOnlyLiteralReference flag.


getUndefinedTypeRef

protected TypeEntry (src)  getUndefinedTypeRef()
getUndefinedTypeRef returns the Undefined TypeEntry that this entry depends on or NULL.


updateUndefined

protected boolean updateUndefined(TypeEntry (src)  oldRef,
                                  TypeEntry (src)  newRef)
                           throws java.io.IOException
UpdateUndefined is called when the ref TypeEntry is finally known.

Parameters:
oldRef - The TypeEntry representing the Undefined TypeEntry
newRef - The replacement TypeEntry
Returns:
true if TypeEntry is changed in any way.
Throws:
java.io.IOException

getRefType

public TypeEntry (src)  getRefType()
If this type references another type, return that type, otherwise return null.


setRefType

public void setRefType(TypeEntry (src)  refType)

getDimensions

public java.lang.String getDimensions()
Return the dimensions of this type, which can be 0 or more "[]".


toString

public java.lang.String toString()
Get string representation.

Overrides:
toString in class SymTabEntry (src)

toString

protected java.lang.String toString(java.lang.String indent)
Get string representation with indentation

Overrides:
toString in class SymTabEntry (src)