org.apache.axis.wsdl
Class SymbolTable

java.lang.Object
  |
  +--org.apache.axis.wsdl.SymbolTable

public class SymbolTable
extends java.lang.Object

This class represents a table of all of the top-level symbols from a set of WSDL Definitions and DOM Documents: XML types; WSDL messages, portTypes, bindings, and services. This symbolTable contains entries of the form where key is of type QName and value is of type Vector. The Vector's elements are all of the objects that have the given QName. This is necessary since names aren't unique among the WSDL types. message, portType, binding, service, could all have the same QName and are differentiated merely by type. SymbolTable contains type-specific getters to bypass the Vector layer: public PortTypeEntry getPortTypeEntry(QName name), etc.


Constructor Summary
SymbolTable(Namespaces namespaces, boolean addImports)
          Construct a symbol table with the given Namespaces.
 
Method Summary
protected  void add(javax.wsdl.Definition def, org.w3c.dom.Document doc)
          Add the given Definition and Document information to the symbol table (including imported symbols), populating it with SymTabEntries for each of the top-level symbols.
 void dump(java.io.PrintStream out)
          For debugging purposes only.
 BindingEntry getBindingEntry(javax.wsdl.QName qname)
          Get the BindingEntry with the given QName.
 ElementType getElementTypeEntry(javax.wsdl.QName qname)
          Get the ElementType entry with the given QName.
 java.util.HashMap getHashMap()
          Get the raw symbol table HashMap.
 java.lang.String getJavaName(javax.wsdl.QName qName)
          Convert the specified QName into a full Java Name.
 MessageEntry getMessageEntry(javax.wsdl.QName qname)
          Get the MessageEntry with the given QName.
 java.lang.String getPackage(javax.wsdl.QName qName)
          Get the Package name for the specified QName
 java.lang.String getPackage(java.lang.String namespace)
          Get the Package name for the specified namespace
 PortTypeEntry getPortTypeEntry(javax.wsdl.QName qname)
          Get the PortTypeEntry with the given QName.
 ServiceEntry getServiceEntry(javax.wsdl.QName qname)
          Get the ServiceEntry with the given QName.
 java.util.Vector getSymbols(javax.wsdl.QName qname)
          Get the list of entries with the given QName.
 Type getTypeEntry(javax.wsdl.QName qname)
          Get the non-ElementType TypeEntry with the given QName.
 java.util.Vector getTypes()
          Get the list of all the XML schema types in the symbol table.
 void map(java.lang.String namespace)
          Invoke this method to associate a namespace URI with a autogenerated Java Package name, if an entry is not already present
 void map(java.lang.String namespace, java.lang.String pkg)
          Invoke this method to associate a namespace URI with a particular Java Package
protected  void partStrings(java.util.Vector v, java.util.Collection parts)
          This method returns a vector containing the Java types (even indices) and names (odd indices) of the parts.
 void setNamespaceMap(java.util.HashMap map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolTable

public SymbolTable(Namespaces namespaces,
                   boolean addImports)
Construct a symbol table with the given Namespaces.
Method Detail

add

protected void add(javax.wsdl.Definition def,
                   org.w3c.dom.Document doc)
            throws java.io.IOException
Add the given Definition and Document information to the symbol table (including imported symbols), populating it with SymTabEntries for each of the top-level symbols. When the symbol table has been populated, iterate through it, setting the isReferenced flag appropriately for each entry.

getJavaName

public java.lang.String getJavaName(javax.wsdl.QName qName)
Convert the specified QName into a full Java Name.

partStrings

protected void partStrings(java.util.Vector v,
                           java.util.Collection parts)
This method returns a vector containing the Java types (even indices) and names (odd indices) of the parts.

getHashMap

public java.util.HashMap getHashMap()
Get the raw symbol table HashMap.

getSymbols

public java.util.Vector getSymbols(javax.wsdl.QName qname)
Get the list of entries with the given QName. Since symbols can share QNames, this list is necessary. This list will not contain any more than one element of any given SymTabEntry.

getTypeEntry

public Type getTypeEntry(javax.wsdl.QName qname)
Get the non-ElementType TypeEntry with the given QName. If it doesn't exist, return null.

getElementTypeEntry

public ElementType getElementTypeEntry(javax.wsdl.QName qname)
Get the ElementType entry with the given QName. If it doesn't exist, return null.

getMessageEntry

public MessageEntry getMessageEntry(javax.wsdl.QName qname)
Get the MessageEntry with the given QName. If it doesn't exist, return null.

getPortTypeEntry

public PortTypeEntry getPortTypeEntry(javax.wsdl.QName qname)
Get the PortTypeEntry with the given QName. If it doesn't exist, return null.

getBindingEntry

public BindingEntry getBindingEntry(javax.wsdl.QName qname)
Get the BindingEntry with the given QName. If it doesn't exist, return null.

getServiceEntry

public ServiceEntry getServiceEntry(javax.wsdl.QName qname)
Get the ServiceEntry with the given QName. If it doesn't exist, return null.

getTypes

public java.util.Vector getTypes()
Get the list of all the XML schema types in the symbol table. In other words, all entries that are instances of TypeEntry.

map

public void map(java.lang.String namespace)
Invoke this method to associate a namespace URI with a autogenerated Java Package name, if an entry is not already present

map

public void map(java.lang.String namespace,
                java.lang.String pkg)
Invoke this method to associate a namespace URI with a particular Java Package

setNamespaceMap

public void setNamespaceMap(java.util.HashMap map)

getPackage

public java.lang.String getPackage(java.lang.String namespace)
Get the Package name for the specified namespace

getPackage

public java.lang.String getPackage(javax.wsdl.QName qName)
Get the Package name for the specified QName

dump

public void dump(java.io.PrintStream out)
For debugging purposes only.


Copyright © 2001 Apache XML Project. All Rights Reserved.