com.ibm.wsdl
Class DefinitionImpl

java.lang.Object
  extended bycom.ibm.wsdl.DefinitionImpl
All Implemented Interfaces:
Definition, java.io.Serializable

public class DefinitionImpl
extends java.lang.Object
implements Definition

This class represents a WSDL definition.

Author:
Paul Fremantle, Nirmal Mukhi, Matthew J. Duftler
See Also:
Serialized Form

Field Summary
protected  java.util.Map bindings
           
protected  org.w3c.dom.Element docEl
           
protected  java.lang.String documentBaseURI
           
protected  java.util.List extElements
           
protected  ExtensionRegistry extReg
           
protected  java.util.Map imports
           
protected  java.util.Map messages
           
protected  QName name
           
protected  java.util.Map namespaces
           
protected  java.util.Map portTypes
           
static long serialVersionUID
           
protected  java.util.Map services
           
protected  java.lang.String targetNamespace
           
protected  Types types
           
 
Constructor Summary
DefinitionImpl()
           
 
Method Summary
 void addBinding(Binding binding)
          Add a binding to this WSDL description.
 void addExtensibilityElement(ExtensibilityElement extElement)
          Add an extensibility element.
 void addImport(Import importDef)
          Add an import to this WSDL description.
 void addMessage(Message message)
          Add a message to this WSDL description.
 void addNamespace(java.lang.String prefix, java.lang.String namespaceURI)
          This is a way to add a namespace association to a definition.
 void addPortType(PortType portType)
          Add a portType to this WSDL description.
 void addService(Service service)
          Add a service to this WSDL description.
 Binding createBinding()
          Create a new binding.
 BindingFault createBindingFault()
          Create a new binding fault.
 BindingInput createBindingInput()
          Create a new binding input.
 BindingOperation createBindingOperation()
          Create a new binding operation.
 BindingOutput createBindingOutput()
          Create a new binding output.
 Fault createFault()
          Create a new fault.
 Import createImport()
          Create a new import.
 Input createInput()
          Create a new input.
 Message createMessage()
          Create a new message.
 Operation createOperation()
          Create a new operation.
 Output createOutput()
          Create a new output.
 Part createPart()
          Create a new part.
 Port createPort()
          Create a new port.
 PortType createPortType()
          Create a new port type.
 Service createService()
          Create a new service.
 Types createTypes()
          Create a new types section.
 Binding getBinding(QName name)
          Get the specified binding.
 java.util.Map getBindings()
          Get all the bindings defined here.
 org.w3c.dom.Element getDocumentationElement()
          Get the documentation element.
 java.lang.String getDocumentBaseURI()
          Get the document base URI of this definition.
 java.util.List getExtensibilityElements()
          Get all the extensibility elements defined here.
 ExtensionRegistry getExtensionRegistry()
          Get a reference to the ExtensionRegistry for this Definition.
 java.util.Map getImports()
          Get a map of lists containing all the imports defined here.
 java.util.List getImports(java.lang.String namespaceURI)
          Get the list of imports for the specified namespaceURI.
 Message getMessage(QName name)
          Get the specified message.
 java.util.Map getMessages()
          Get all the messages defined here.
 java.lang.String getNamespace(java.lang.String prefix)
          Get the namespace URI associated with this prefix.
 java.util.Map getNamespaces()
          Get all namespace associations in this definition.
 PortType getPortType(QName name)
          Get the specified portType.
 java.util.Map getPortTypes()
          Get all the portTypes defined here.
 java.lang.String getPrefix(java.lang.String namespaceURI)
          Get a prefix associated with this namespace URI.
 QName getQName()
          Get the name of this definition.
 Service getService(QName name)
          Get the specified service.
 java.util.Map getServices()
          Get all the services defined here.
 java.lang.String getTargetNamespace()
          Get the target namespace in which the WSDL elements are defined.
 Types getTypes()
          Get the types section.
 Binding removeBinding(QName name)
          Remove the specified binding from this definition.
 Message removeMessage(QName name)
          Remove the specified message from this definition.
 PortType removePortType(QName name)
          Remove the specified portType from this definition.
 Service removeService(QName name)
          Remove the specified service from this definition.
 void setDocumentationElement(org.w3c.dom.Element docEl)
          Set the documentation element for this document.
 void setDocumentBaseURI(java.lang.String documentBaseURI)
          Set the document base URI of this definition.
 void setExtensionRegistry(ExtensionRegistry extReg)
          Set the ExtensionRegistry for this Definition.
 void setQName(QName name)
          Set the name of this definition.
 void setTargetNamespace(java.lang.String targetNamespace)
          Set the target namespace in which WSDL elements are defined.
 void setTypes(Types types)
          Set the types section.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

documentBaseURI

protected java.lang.String documentBaseURI

name

protected QName name

targetNamespace

protected java.lang.String targetNamespace

namespaces

protected java.util.Map namespaces

imports

protected java.util.Map imports

types

protected Types types

messages

protected java.util.Map messages

bindings

protected java.util.Map bindings

portTypes

protected java.util.Map portTypes

services

protected java.util.Map services

docEl

protected org.w3c.dom.Element docEl

extElements

protected java.util.List extElements

extReg

protected ExtensionRegistry extReg

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

DefinitionImpl

public DefinitionImpl()
Method Detail

setDocumentBaseURI

public void setDocumentBaseURI(java.lang.String documentBaseURI)
Set the document base URI of this definition. Can be used to represent the origin of the Definition, and can be exploited when resolving relative URIs (e.g. in <import>s).

Specified by:
setDocumentBaseURI in interface Definition
Parameters:
documentBaseURI - the document base URI of this definition

getDocumentBaseURI

public java.lang.String getDocumentBaseURI()
Get the document base URI of this definition.

Specified by:
getDocumentBaseURI in interface Definition
Returns:
the document base URI

setQName

public void setQName(QName name)
Set the name of this definition.

Specified by:
setQName in interface Definition
Parameters:
name - the desired name

getQName

public QName getQName()
Get the name of this definition.

Specified by:
getQName in interface Definition
Returns:
the definition name

setTargetNamespace

public void setTargetNamespace(java.lang.String targetNamespace)
Set the target namespace in which WSDL elements are defined.

Specified by:
setTargetNamespace in interface Definition

getTargetNamespace

public java.lang.String getTargetNamespace()
Get the target namespace in which the WSDL elements are defined.

Specified by:
getTargetNamespace in interface Definition
Returns:
the target namespace

addNamespace

public void addNamespace(java.lang.String prefix,
                         java.lang.String namespaceURI)
This is a way to add a namespace association to a definition. It is similar to adding a namespace prefix declaration to the top of a <wsdl:definition> element. This has nothing to do with the <wsdl:import> element; there are separate methods for dealing with information described by <wsdl:import> elements.

Specified by:
addNamespace in interface Definition
Parameters:
prefix - the prefix to use for this namespace (when rendering this information as XML). Use null or an empty string to describe the default namespace (i.e. xmlns="...").
namespaceURI - the namespace URI to associate the prefix with. If you use null, the namespace association will be removed.

getNamespace

public java.lang.String getNamespace(java.lang.String prefix)
Get the namespace URI associated with this prefix. Or null if there is no namespace URI associated with this prefix. This is unrelated to the <wsdl:import> element.

Specified by:
getNamespace in interface Definition
See Also:
addNamespace(String, String), getPrefix(String)

getPrefix

public java.lang.String getPrefix(java.lang.String namespaceURI)
Get a prefix associated with this namespace URI. Or null if there are no prefixes associated with this namespace URI. This is unrelated to the <wsdl:import> element.

Specified by:
getPrefix in interface Definition
See Also:
addNamespace(String, String), getNamespace(String)

getNamespaces

public java.util.Map getNamespaces()
Get all namespace associations in this definition. The keys are the prefixes, and the namespace URIs are the values. This is unrelated to the <wsdl:import> element.

Specified by:
getNamespaces in interface Definition
See Also:
addNamespace(String, String)

setTypes

public void setTypes(Types types)
Set the types section.

Specified by:
setTypes in interface Definition

getTypes

public Types getTypes()
Get the types section.

Specified by:
getTypes in interface Definition
Returns:
the types section

addImport

public void addImport(Import importDef)
Add an import to this WSDL description.

Specified by:
addImport in interface Definition
Parameters:
importDef - the import to be added

getImports

public java.util.List getImports(java.lang.String namespaceURI)
Get the list of imports for the specified namespaceURI.

Specified by:
getImports in interface Definition
Parameters:
namespaceURI - the namespaceURI associated with the desired imports.
Returns:
a list of the corresponding imports, or null if there weren't any matching imports

getImports

public java.util.Map getImports()
Get a map of lists containing all the imports defined here. The map's keys are the namespaceURIs, and the map's values are lists. There is one list for each namespaceURI for which imports have been defined.

Specified by:
getImports in interface Definition

addMessage

public void addMessage(Message message)
Add a message to this WSDL description.

Specified by:
addMessage in interface Definition
Parameters:
message - the message to be added

getMessage

public Message getMessage(QName name)
Get the specified message. Also checks imported documents.

Specified by:
getMessage in interface Definition
Parameters:
name - the name of the desired message.
Returns:
the corresponding message, or null if there wasn't any matching message

removeMessage

public Message removeMessage(QName name)
Remove the specified message from this definition.

Specified by:
removeMessage in interface Definition
Parameters:
name - the name of the message to remove
Returns:
the message previously associated with this qname, if there was one; may return null

getMessages

public java.util.Map getMessages()
Get all the messages defined here.

Specified by:
getMessages in interface Definition

addBinding

public void addBinding(Binding binding)
Add a binding to this WSDL description.

Specified by:
addBinding in interface Definition
Parameters:
binding - the binding to be added

getBinding

public Binding getBinding(QName name)
Get the specified binding. Also checks imported documents.

Specified by:
getBinding in interface Definition
Parameters:
name - the name of the desired binding.
Returns:
the corresponding binding, or null if there wasn't any matching binding

removeBinding

public Binding removeBinding(QName name)
Remove the specified binding from this definition.

Specified by:
removeBinding in interface Definition
Parameters:
name - the name of the binding to remove
Returns:
the binding previously associated with this qname, if there was one; may return null

getBindings

public java.util.Map getBindings()
Get all the bindings defined here.

Specified by:
getBindings in interface Definition

addPortType

public void addPortType(PortType portType)
Add a portType to this WSDL description.

Specified by:
addPortType in interface Definition
Parameters:
portType - the portType to be added

getPortType

public PortType getPortType(QName name)
Get the specified portType. Also checks imported documents.

Specified by:
getPortType in interface Definition
Parameters:
name - the name of the desired portType.
Returns:
the corresponding portType, or null if there wasn't any matching portType

removePortType

public PortType removePortType(QName name)
Remove the specified portType from this definition.

Specified by:
removePortType in interface Definition
Parameters:
name - the name of the portType to remove
Returns:
the portType previously associated with this qname, if there was one; may return null

getPortTypes

public java.util.Map getPortTypes()
Get all the portTypes defined here.

Specified by:
getPortTypes in interface Definition

addService

public void addService(Service service)
Add a service to this WSDL description.

Specified by:
addService in interface Definition
Parameters:
service - the service to be added

getService

public Service getService(QName name)
Get the specified service. Also checks imported documents.

Specified by:
getService in interface Definition
Parameters:
name - the name of the desired service.
Returns:
the corresponding service, or null if there wasn't any matching service

removeService

public Service removeService(QName name)
Remove the specified service from this definition.

Specified by:
removeService in interface Definition
Parameters:
name - the name of the service to remove
Returns:
the service previously associated with this qname, if there was one; may return null

getServices

public java.util.Map getServices()
Get all the services defined here.

Specified by:
getServices in interface Definition

setDocumentationElement

public void setDocumentationElement(org.w3c.dom.Element docEl)
Set the documentation element for this document. This dependency on org.w3c.dom.Element should eventually be removed when a more appropriate way of representing this information is employed.

Specified by:
setDocumentationElement in interface Definition
Parameters:
docEl - the documentation element

getDocumentationElement

public org.w3c.dom.Element getDocumentationElement()
Get the documentation element. This dependency on org.w3c.dom.Element should eventually be removed when a more appropriate way of representing this information is employed.

Specified by:
getDocumentationElement in interface Definition
Returns:
the documentation element

addExtensibilityElement

public void addExtensibilityElement(ExtensibilityElement extElement)
Add an extensibility element.

Specified by:
addExtensibilityElement in interface Definition
Parameters:
extElement - the extensibility element to be added

getExtensibilityElements

public java.util.List getExtensibilityElements()
Get all the extensibility elements defined here.

Specified by:
getExtensibilityElements in interface Definition

createBinding

public Binding createBinding()
Create a new binding.

Specified by:
createBinding in interface Definition
Returns:
the newly created binding

createBindingFault

public BindingFault createBindingFault()
Create a new binding fault.

Specified by:
createBindingFault in interface Definition
Returns:
the newly created binding fault

createBindingInput

public BindingInput createBindingInput()
Create a new binding input.

Specified by:
createBindingInput in interface Definition
Returns:
the newly created binding input

createBindingOperation

public BindingOperation createBindingOperation()
Create a new binding operation.

Specified by:
createBindingOperation in interface Definition
Returns:
the newly created binding operation

createBindingOutput

public BindingOutput createBindingOutput()
Create a new binding output.

Specified by:
createBindingOutput in interface Definition
Returns:
the newly created binding output

createFault

public Fault createFault()
Create a new fault.

Specified by:
createFault in interface Definition
Returns:
the newly created fault

createImport

public Import createImport()
Create a new import.

Specified by:
createImport in interface Definition
Returns:
the newly created import

createInput

public Input createInput()
Create a new input.

Specified by:
createInput in interface Definition
Returns:
the newly created input

createMessage

public Message createMessage()
Create a new message.

Specified by:
createMessage in interface Definition
Returns:
the newly created message

createOperation

public Operation createOperation()
Create a new operation.

Specified by:
createOperation in interface Definition
Returns:
the newly created operation

createOutput

public Output createOutput()
Create a new output.

Specified by:
createOutput in interface Definition
Returns:
the newly created output

createPart

public Part createPart()
Create a new part.

Specified by:
createPart in interface Definition
Returns:
the newly created part

createPort

public Port createPort()
Create a new port.

Specified by:
createPort in interface Definition
Returns:
the newly created port

createPortType

public PortType createPortType()
Create a new port type.

Specified by:
createPortType in interface Definition
Returns:
the newly created port type

createService

public Service createService()
Create a new service.

Specified by:
createService in interface Definition
Returns:
the newly created service

createTypes

public Types createTypes()
Create a new types section.

Specified by:
createTypes in interface Definition
Returns:
the newly created types section

setExtensionRegistry

public void setExtensionRegistry(ExtensionRegistry extReg)
Set the ExtensionRegistry for this Definition.

Specified by:
setExtensionRegistry in interface Definition

getExtensionRegistry

public ExtensionRegistry getExtensionRegistry()
Get a reference to the ExtensionRegistry for this Definition.

Specified by:
getExtensionRegistry in interface Definition

toString

public java.lang.String toString()


Copyright ? 2003 IBM. All Rights Reserved.