org.apache.axis.wsdl.symbolTable
Class SchemaUtils

java.lang.Object
  |
  +--org.apache.axis.wsdl.symbolTable.SchemaUtils

public class SchemaUtils
extends java.lang.Object

This class contains static utility methods specifically for schema type queries.

Author:
Rich Scheuerle (scheu@us.ibm.com)

Constructor Summary
SchemaUtils()
           
 
Method Summary
static QName getArrayComponentQName(org.w3c.dom.Node node, IntHolder dims)
          If the specified node represents an array encoding of one of the following forms, then return the qname repesenting the element type of the array.
static QName getAttributeAnonQName(org.w3c.dom.Node node)
          Returns the WSDL2Java QName for the anonymous type of the attribute or null.
static QName getCollectionComponentQName(org.w3c.dom.Node node)
          If the specified node represents an element that references a collection then return the qname repesenting the component of the collection.
static TypeEntry getComplexElementExtensionBase(org.w3c.dom.Node node, SymbolTable symbolTable)
          If the specified node represents a supported JAX-RPC complexType/element which extends another complexType.
static java.util.Vector getContainedAttributeTypes(org.w3c.dom.Node node, SymbolTable symbolTable)
          Return the attribute names and types if any in the node The even indices are the element types (TypeEntry) and the odd indices are the corresponding names (Strings).
static java.util.Vector getContainedElementDeclarations(org.w3c.dom.Node node, SymbolTable symbolTable)
          If the specified node represents a supported JAX-RPC complexType or simpleType, a Vector is returned which contains ElementDecls for the child element names.
static QName getElementAnonQName(org.w3c.dom.Node node)
          Returns the WSDL2Java QName for the anonymous type of the element or null.
static org.w3c.dom.Node getRestrictionOrExtensionNode(org.w3c.dom.Node node)
          Returns the contained restriction or extension node underneath the specified node.
static QName getSimpleTypeBase(org.w3c.dom.Node node)
          If the specified node represents a 'normal' non-enumeration simpleType, the QName of the simpleType base is returned.
static boolean isSimpleSchemaType(QName qname)
          Determine if a QName is a simple XML Schema type
static boolean isSimpleTypeOrSimpleContent(org.w3c.dom.Node node)
          If the specified node is a simple type or contains simpleContent, return true
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaUtils

public SchemaUtils()
Method Detail

getContainedElementDeclarations

public static java.util.Vector getContainedElementDeclarations(org.w3c.dom.Node node,
                                                               SymbolTable symbolTable)
If the specified node represents a supported JAX-RPC complexType or simpleType, a Vector is returned which contains ElementDecls for the child element names. If the element is a simpleType, an ElementDecls is built representing the restricted type with the special name "value". If the element is a complexType which has simpleContent, an ElementDecl is built representing the extended type with the special name "value". This method does not return attribute names and types (use the getContainedAttributeTypes) If the specified node is not a supported JAX-RPC complexType/simpleType/element null is returned.


getElementAnonQName

public static QName getElementAnonQName(org.w3c.dom.Node node)
Returns the WSDL2Java QName for the anonymous type of the element or null.


getAttributeAnonQName

public static QName getAttributeAnonQName(org.w3c.dom.Node node)
Returns the WSDL2Java QName for the anonymous type of the attribute or null.


isSimpleTypeOrSimpleContent

public static boolean isSimpleTypeOrSimpleContent(org.w3c.dom.Node node)
If the specified node is a simple type or contains simpleContent, return true


getComplexElementExtensionBase

public static TypeEntry getComplexElementExtensionBase(org.w3c.dom.Node node,
                                                       SymbolTable symbolTable)
If the specified node represents a supported JAX-RPC complexType/element which extends another complexType. The Type of the base is returned.


getSimpleTypeBase

public static QName getSimpleTypeBase(org.w3c.dom.Node node)
If the specified node represents a 'normal' non-enumeration simpleType, the QName of the simpleType base is returned.


getRestrictionOrExtensionNode

public static org.w3c.dom.Node getRestrictionOrExtensionNode(org.w3c.dom.Node node)
Returns the contained restriction or extension node underneath the specified node. Returns null if not found


getArrayComponentQName

public static QName getArrayComponentQName(org.w3c.dom.Node node,
                                           IntHolder dims)
If the specified node represents an array encoding of one of the following forms, then return the qname repesenting the element type of the array.

Parameters:
node - is the node
dims - is the output value that contains the number of dimensions if return is not null
Returns:
QName or null

getCollectionComponentQName

public static QName getCollectionComponentQName(org.w3c.dom.Node node)
If the specified node represents an element that references a collection then return the qname repesenting the component of the collection. returns qname for"xsd:string" returns qname for "alias"

Parameters:
node - is the Node
Returns:
QName of the compoent of the collection

getContainedAttributeTypes

public static java.util.Vector getContainedAttributeTypes(org.w3c.dom.Node node,
                                                          SymbolTable symbolTable)
Return the attribute names and types if any in the node The even indices are the element types (TypeEntry) and the odd indices are the corresponding names (Strings). Example:


isSimpleSchemaType

public static boolean isSimpleSchemaType(QName qname)
Determine if a QName is a simple XML Schema type



Copyright © 2003 Apache Web Services Project. All Rights Reserved.