Package org.apache.axis.wsdl.symbolTable
Class TypeEntry
- java.lang.Object
-
- org.apache.axis.wsdl.symbolTable.SymTabEntry
-
- org.apache.axis.wsdl.symbolTable.TypeEntry
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class TypeEntry extends SymTabEntry implements java.io.Serializable
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: - Author:
- Rich Scheuerle (scheu@us.ibm.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected QName
componentType
protected java.util.Vector
containedAttributes
contained attributes in the schema's type definitionprotected java.util.Vector
containedElements
contained elements in the schema's type definitionprotected java.lang.String
dims
Field dimsprotected boolean
isBaseType
Field isBaseTypeprotected boolean
isSimpleType
Field isSimpleTypeprotected QName
itemQName
If this TypeEntry represents an array with elements inside a "wrapper" this field can optionally change the inner QName (default is- ).
protected org.w3c.dom.Node
node
Field nodeprotected boolean
onlyLiteralReference
Field onlyLiteralReferenceprotected TypeEntry
refType
Field refTypeprotected java.util.HashSet
types
Field typesprotected boolean
undefined
Field undefinedprotected boolean
underlTypeNillable
-
Fields inherited from class org.apache.axis.wsdl.symbolTable.SymTabEntry
name, qname
-
Constructor Summary
Constructors Modifier Constructor Description protected
TypeEntry(QName pqName)
Create a TypeEntry object for an xml construct name that represents a base typeprotected
TypeEntry(QName pqName, TypeEntry refType, org.w3c.dom.Node pNode, java.lang.String dims)
Create a TypeEntry object for an xml construct that references another type.protected
TypeEntry(QName pqName, org.w3c.dom.Node pNode)
Create a TypeEntry object for an xml construct that is not a base type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBaseType()
Returns the Base Type Name.QName
getComponentType()
Return the QName of the component if this is an array typejava.util.Vector
getContainedAttributes()
java.util.Vector
getContainedElements()
java.lang.String
getDimensions()
Return the dimensions of this type, which can be 0 or more "[]".QName
getItemQName()
java.util.HashSet
getNestedTypes(SymbolTable symbolTable, boolean derivedFlag)
This method returns a set of all the nested types.org.w3c.dom.Node
getNode()
Query the node for this type.TypeEntry
getRefType()
If this type references another type, return that type, otherwise return null.protected TypeEntry
getUndefinedTypeRef()
getUndefinedTypeRef returns the Undefined TypeEntry that this entry depends on or NULL.boolean
getUnderlTypeNillable()
Return whether the underlying type is nillable if this is an array type.boolean
isBaseType()
Method isBaseTypeboolean
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()
Method isSimpleTypevoid
setBaseType(boolean baseType)
Method setBaseTypevoid
setComponentType(QName componentType)
Set the QName of the component if this is an array typevoid
setContainedAttributes(java.util.Vector containedAttributes)
void
setContainedElements(java.util.Vector containedElements)
void
setItemQName(QName itemQName)
void
setOnlyLiteralReference(boolean set)
Set the isOnlyLiteralReference flag.void
setRefType(TypeEntry refType)
Method setRefTypevoid
setSimpleType(boolean simpleType)
Method setSimpleTypevoid
setUnderlTypeNillable(boolean underlTypeNillable)
Set the boolean indicating whether underlying type of array is nillable.java.lang.String
toString()
Get string representation.protected java.lang.String
toString(java.lang.String indent)
Get string representation with indentationprotected boolean
updateUndefined(TypeEntry oldRef, TypeEntry newRef)
UpdateUndefined is called when the ref TypeEntry is finally known.-
Methods inherited from class org.apache.axis.wsdl.symbolTable.SymTabEntry
getDynamicVar, getName, getQName, isReferenced, setDynamicVar, setIsReferenced, setName
-
-
-
-
Field Detail
-
node
protected org.w3c.dom.Node node
Field node
-
refType
protected TypeEntry refType
Field refType
-
dims
protected java.lang.String dims
Field dims
-
underlTypeNillable
protected boolean underlTypeNillable
-
componentType
protected QName componentType
-
itemQName
protected QName itemQName
If this TypeEntry represents an array with elements inside a "wrapper" this field can optionally change the inner QName (default is- ).
-
undefined
protected boolean undefined
Field undefined
-
isBaseType
protected boolean isBaseType
Field isBaseType
-
isSimpleType
protected boolean isSimpleType
Field isSimpleType
-
onlyLiteralReference
protected boolean onlyLiteralReference
Field onlyLiteralReference
-
types
protected java.util.HashSet types
Field types
-
containedElements
protected java.util.Vector containedElements
contained elements in the schema's type definition
-
containedAttributes
protected java.util.Vector containedAttributes
contained attributes in the schema's type definition
-
-
Constructor Detail
-
TypeEntry
protected TypeEntry(QName pqName, TypeEntry 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.- Parameters:
pqName
-refType
-pNode
-dims
-
-
TypeEntry
protected TypeEntry(QName pqName, org.w3c.dom.Node pNode)
Create a TypeEntry object for an xml construct that is not a base type- Parameters:
pqName
-pNode
-
-
TypeEntry
protected TypeEntry(QName pqName)
Create a TypeEntry object for an xml construct name that represents a base type- Parameters:
pqName
-
-
-
Method Detail
-
getNode
public org.w3c.dom.Node getNode()
Query the node for this type.- Returns:
-
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.- Returns:
-
isBaseType
public boolean isBaseType()
Method isBaseType- Returns:
-
setBaseType
public void setBaseType(boolean baseType)
Method setBaseType- Parameters:
baseType
-
-
isSimpleType
public boolean isSimpleType()
Method isSimpleType- Returns:
-
setSimpleType
public void setSimpleType(boolean simpleType)
Method setSimpleType- Parameters:
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.- Returns:
-
setOnlyLiteralReference
public void setOnlyLiteralReference(boolean set)
Set the isOnlyLiteralReference flag.- Parameters:
set
-
-
getUndefinedTypeRef
protected TypeEntry getUndefinedTypeRef()
getUndefinedTypeRef returns the Undefined TypeEntry that this entry depends on or NULL.- Returns:
-
updateUndefined
protected boolean updateUndefined(TypeEntry oldRef, TypeEntry newRef) throws java.io.IOException
UpdateUndefined is called when the ref TypeEntry is finally known.- Parameters:
oldRef
- The TypeEntry representing the Undefined TypeEntrynewRef
- The replacement TypeEntry- Returns:
- true if TypeEntry is changed in any way.
- Throws:
java.io.IOException
-
getRefType
public TypeEntry getRefType()
If this type references another type, return that type, otherwise return null.- Returns:
-
setRefType
public void setRefType(TypeEntry refType)
Method setRefType- Parameters:
refType
-
-
getDimensions
public java.lang.String getDimensions()
Return the dimensions of this type, which can be 0 or more "[]".- Returns:
-
getUnderlTypeNillable
public boolean getUnderlTypeNillable()
Return whether the underlying type is nillable if this is an array type.- Returns:
- true if it is an array and nillable
-
setUnderlTypeNillable
public void setUnderlTypeNillable(boolean underlTypeNillable)
Set the boolean indicating whether underlying type of array is nillable.
-
getComponentType
public QName getComponentType()
Return the QName of the component if this is an array type- Returns:
- QName of array elements or null
-
setComponentType
public void setComponentType(QName componentType)
Set the QName of the component if this is an array type
-
getItemQName
public QName getItemQName()
-
setItemQName
public void setItemQName(QName itemQName)
-
toString
public java.lang.String toString()
Get string representation.- Overrides:
toString
in classSymTabEntry
- Returns:
-
toString
protected java.lang.String toString(java.lang.String indent)
Get string representation with indentation- Overrides:
toString
in classSymTabEntry
- Parameters:
indent
-- Returns:
-
getNestedTypes
public java.util.HashSet getNestedTypes(SymbolTable symbolTable, boolean derivedFlag)
This method returns a set of all the nested types. Nested types are types declared within this TypeEntry (or descendents) plus any extended types and the extended type nested types The elements of the returned HashSet are Types.- Parameters:
symbolTable
- is the symbolTablederivedFlag
- should be set if all dependendent derived types should also be returned.- Returns:
-
getContainedAttributes
public java.util.Vector getContainedAttributes()
- Returns:
- Returns the containedAttributes.
-
setContainedAttributes
public void setContainedAttributes(java.util.Vector containedAttributes)
- Parameters:
containedAttributes
- The containedAttributes to set.
-
getContainedElements
public java.util.Vector getContainedElements()
- Returns:
- Returns the containedElements.
-
setContainedElements
public void setContainedElements(java.util.Vector containedElements)
- Parameters:
containedElements
- The containedElements to set.
-
-