Package com.ibm.wsdl
Class DefinitionImpl
- java.lang.Object
-
- com.ibm.wsdl.AbstractWSDLElement
-
- com.ibm.wsdl.DefinitionImpl
-
- All Implemented Interfaces:
java.io.Serializable,Definition,AttributeExtensible,ElementExtensible,WSDLElement
public class DefinitionImpl extends AbstractWSDLElement implements Definition
This class represents a WSDL definition.- Author:
- Paul Fremantle, Nirmal Mukhi, Matthew J. Duftler
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Mapbindingsprotected java.lang.StringdocumentBaseURIprotected ExtensionRegistryextRegprotected java.util.Mapimportsprotected java.util.Mapmessagesprotected QNamenameprotected java.util.Mapnamespacesprotected java.util.ListnativeAttributeNamesprotected java.util.MapportTypesstatic longserialVersionUIDprotected java.util.Mapservicesprotected java.lang.StringtargetNamespaceprotected Typestypes-
Fields inherited from class com.ibm.wsdl.AbstractWSDLElement
docEl, extElements, extensionAttributes
-
Fields inherited from interface javax.wsdl.extensions.AttributeExtensible
LIST_OF_QNAMES_TYPE, LIST_OF_STRINGS_TYPE, NO_DECLARED_TYPE, QNAME_TYPE, STRING_TYPE
-
-
Constructor Summary
Constructors Constructor Description DefinitionImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBinding(Binding binding)Add a binding to this WSDL description.voidaddImport(Import importDef)Add an import to this WSDL description.voidaddMessage(Message message)Add a message to this WSDL description.voidaddNamespace(java.lang.String prefix, java.lang.String namespaceURI)This is a way to add a namespace association to a definition.voidaddPortType(PortType portType)Add a portType to this WSDL description.voidaddService(Service service)Add a service to this WSDL description.BindingcreateBinding()Create a new binding.BindingFaultcreateBindingFault()Create a new binding fault.BindingInputcreateBindingInput()Create a new binding input.BindingOperationcreateBindingOperation()Create a new binding operation.BindingOutputcreateBindingOutput()Create a new binding output.FaultcreateFault()Create a new fault.ImportcreateImport()Create a new import.InputcreateInput()Create a new input.MessagecreateMessage()Create a new message.OperationcreateOperation()Create a new operation.OutputcreateOutput()Create a new output.PartcreatePart()Create a new part.PortcreatePort()Create a new port.PortTypecreatePortType()Create a new port type.ServicecreateService()Create a new service.TypescreateTypes()Create a new types section.java.util.MapgetAllBindings()Get all the bindings defined in this Definition and those in any imported Definitions in the WSDL tree.java.util.MapgetAllPortTypes()Get all the portTypes defined in this Definition and those in any imported Definitions in the WSDL tree.java.util.MapgetAllServices()Get all the services defined in this Definition and those in any imported Definitions in the WSDL tree.BindinggetBinding(QName name)Get the specified binding.java.util.MapgetBindings()Get all the bindings defined in this Definition.java.lang.StringgetDocumentBaseURI()Get the document base URI of this definition.ExtensionRegistrygetExtensionRegistry()Get a reference to the ExtensionRegistry for this Definition.java.util.MapgetImports()Get a map of lists containing all the imports defined here.java.util.ListgetImports(java.lang.String namespaceURI)Get the list of imports for the specified namespaceURI.MessagegetMessage(QName name)Get the specified message.java.util.MapgetMessages()Get all the messages defined here.java.lang.StringgetNamespace(java.lang.String prefix)Get the namespace URI associated with this prefix.java.util.MapgetNamespaces()Get all namespace associations in this definition.java.util.ListgetNativeAttributeNames()Get the list of local attribute names defined for this element in the WSDL specification.PortTypegetPortType(QName name)Get the specified portType.java.util.MapgetPortTypes()Get all the portTypes defined in this Definition.java.lang.StringgetPrefix(java.lang.String namespaceURI)Get a prefix associated with this namespace URI.QNamegetQName()Get the name of this definition.ServicegetService(QName name)Get the specified service.java.util.MapgetServices()Get all the services defined in this Definition.java.lang.StringgetTargetNamespace()Get the target namespace in which the WSDL elements are defined.TypesgetTypes()Get the types section.BindingremoveBinding(QName name)Remove the specified binding from this definition.ImportremoveImport(Import importDef)Remove an import from this WSDL description.MessageremoveMessage(QName name)Remove the specified message from this definition.java.lang.StringremoveNamespace(java.lang.String prefix)Remove the namespace URI associated with this prefix.PortTyperemovePortType(QName name)Remove the specified portType from this definition.ServiceremoveService(QName name)Remove the specified service from this definition.voidsetDocumentBaseURI(java.lang.String documentBaseURI)Set the document base URI of this definition.voidsetExtensionRegistry(ExtensionRegistry extReg)Set the ExtensionRegistry for this Definition.voidsetQName(QName name)Set the name of this definition.voidsetTargetNamespace(java.lang.String targetNamespace)Set the target namespace in which WSDL elements are defined.voidsetTypes(Types types)Set the types section.java.lang.StringtoString()-
Methods inherited from class com.ibm.wsdl.AbstractWSDLElement
addExtensibilityElement, getDocumentationElement, getExtensibilityElements, getExtensionAttribute, getExtensionAttributes, removeExtensibilityElement, setDocumentationElement, setExtensionAttribute
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.wsdl.extensions.AttributeExtensible
getExtensionAttribute, getExtensionAttributes, setExtensionAttribute
-
Methods inherited from interface javax.wsdl.extensions.ElementExtensible
addExtensibilityElement, getExtensibilityElements, removeExtensibilityElement
-
Methods inherited from interface javax.wsdl.WSDLElement
getDocumentationElement, setDocumentationElement
-
-
-
-
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
-
nativeAttributeNames
protected java.util.List nativeAttributeNames
-
extReg
protected ExtensionRegistry extReg
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
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:
setDocumentBaseURIin interfaceDefinition- 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:
getDocumentBaseURIin interfaceDefinition- Returns:
- the document base URI
-
setQName
public void setQName(QName name)
Set the name of this definition.- Specified by:
setQNamein interfaceDefinition- Parameters:
name- the desired name
-
getQName
public QName getQName()
Get the name of this definition.- Specified by:
getQNamein interfaceDefinition- Returns:
- the definition name
-
setTargetNamespace
public void setTargetNamespace(java.lang.String targetNamespace)
Set the target namespace in which WSDL elements are defined.- Specified by:
setTargetNamespacein interfaceDefinition- Parameters:
targetNamespace- the target namespace
-
getTargetNamespace
public java.lang.String getTargetNamespace()
Get the target namespace in which the WSDL elements are defined.- Specified by:
getTargetNamespacein interfaceDefinition- 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:
addNamespacein interfaceDefinition- 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:
getNamespacein interfaceDefinition- See Also:
addNamespace(String, String),getPrefix(String)
-
removeNamespace
public java.lang.String removeNamespace(java.lang.String prefix)
Remove the namespace URI associated with this prefix.- Specified by:
removeNamespacein interfaceDefinition- Parameters:
prefix- the prefix of the namespace to be removed.- Returns:
- the namespace URI which was removed
-
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:
getPrefixin interfaceDefinition- 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:
getNamespacesin interfaceDefinition- See Also:
addNamespace(String, String)
-
setTypes
public void setTypes(Types types)
Set the types section.- Specified by:
setTypesin interfaceDefinition
-
getTypes
public Types getTypes()
Get the types section.- Specified by:
getTypesin interfaceDefinition- Returns:
- the types section
-
addImport
public void addImport(Import importDef)
Add an import to this WSDL description.- Specified by:
addImportin interfaceDefinition- Parameters:
importDef- the import to be added
-
removeImport
public Import removeImport(Import importDef)
Remove an import from this WSDL description.- Specified by:
removeImportin interfaceDefinition- Parameters:
importDef- the import to be removed- Returns:
- the removed Import
-
getImports
public java.util.List getImports(java.lang.String namespaceURI)
Get the list of imports for the specified namespaceURI.- Specified by:
getImportsin interfaceDefinition- 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:
getImportsin interfaceDefinition
-
addMessage
public void addMessage(Message message)
Add a message to this WSDL description.- Specified by:
addMessagein interfaceDefinition- Parameters:
message- the message to be added
-
getMessage
public Message getMessage(QName name)
Get the specified message. Also checks imported documents.- Specified by:
getMessagein interfaceDefinition- 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:
removeMessagein interfaceDefinition- 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:
getMessagesin interfaceDefinition
-
addBinding
public void addBinding(Binding binding)
Add a binding to this WSDL description.- Specified by:
addBindingin interfaceDefinition- Parameters:
binding- the binding to be added
-
getBinding
public Binding getBinding(QName name)
Get the specified binding. Also checks imported documents.- Specified by:
getBindingin interfaceDefinition- 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:
removeBindingin interfaceDefinition- 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 in this Definition.- Specified by:
getBindingsin interfaceDefinition
-
addPortType
public void addPortType(PortType portType)
Add a portType to this WSDL description.- Specified by:
addPortTypein interfaceDefinition- Parameters:
portType- the portType to be added
-
getPortType
public PortType getPortType(QName name)
Get the specified portType. Also checks imported documents.- Specified by:
getPortTypein interfaceDefinition- 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:
removePortTypein interfaceDefinition- 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 in this Definition.- Specified by:
getPortTypesin interfaceDefinition
-
addService
public void addService(Service service)
Add a service to this WSDL description.- Specified by:
addServicein interfaceDefinition- Parameters:
service- the service to be added
-
getService
public Service getService(QName name)
Get the specified service. Also checks imported documents.- Specified by:
getServicein interfaceDefinition- 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:
removeServicein interfaceDefinition- 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 in this Definition.- Specified by:
getServicesin interfaceDefinition
-
createBinding
public Binding createBinding()
Create a new binding.- Specified by:
createBindingin interfaceDefinition- Returns:
- the newly created binding
-
createBindingFault
public BindingFault createBindingFault()
Create a new binding fault.- Specified by:
createBindingFaultin interfaceDefinition- Returns:
- the newly created binding fault
-
createBindingInput
public BindingInput createBindingInput()
Create a new binding input.- Specified by:
createBindingInputin interfaceDefinition- Returns:
- the newly created binding input
-
createBindingOperation
public BindingOperation createBindingOperation()
Create a new binding operation.- Specified by:
createBindingOperationin interfaceDefinition- Returns:
- the newly created binding operation
-
createBindingOutput
public BindingOutput createBindingOutput()
Create a new binding output.- Specified by:
createBindingOutputin interfaceDefinition- Returns:
- the newly created binding output
-
createFault
public Fault createFault()
Create a new fault.- Specified by:
createFaultin interfaceDefinition- Returns:
- the newly created fault
-
createImport
public Import createImport()
Create a new import.- Specified by:
createImportin interfaceDefinition- Returns:
- the newly created import
-
createInput
public Input createInput()
Create a new input.- Specified by:
createInputin interfaceDefinition- Returns:
- the newly created input
-
createMessage
public Message createMessage()
Create a new message.- Specified by:
createMessagein interfaceDefinition- Returns:
- the newly created message
-
createOperation
public Operation createOperation()
Create a new operation.- Specified by:
createOperationin interfaceDefinition- Returns:
- the newly created operation
-
createOutput
public Output createOutput()
Create a new output.- Specified by:
createOutputin interfaceDefinition- Returns:
- the newly created output
-
createPart
public Part createPart()
Create a new part.- Specified by:
createPartin interfaceDefinition- Returns:
- the newly created part
-
createPort
public Port createPort()
Create a new port.- Specified by:
createPortin interfaceDefinition- Returns:
- the newly created port
-
createPortType
public PortType createPortType()
Create a new port type.- Specified by:
createPortTypein interfaceDefinition- Returns:
- the newly created port type
-
createService
public Service createService()
Create a new service.- Specified by:
createServicein interfaceDefinition- Returns:
- the newly created service
-
createTypes
public Types createTypes()
Create a new types section.- Specified by:
createTypesin interfaceDefinition- Returns:
- the newly created types section
-
setExtensionRegistry
public void setExtensionRegistry(ExtensionRegistry extReg)
Set the ExtensionRegistry for this Definition.- Specified by:
setExtensionRegistryin interfaceDefinition
-
getExtensionRegistry
public ExtensionRegistry getExtensionRegistry()
Get a reference to the ExtensionRegistry for this Definition.- Specified by:
getExtensionRegistryin interfaceDefinition
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractWSDLElement
-
getNativeAttributeNames
public java.util.List getNativeAttributeNames()
Get the list of local attribute names defined for this element in the WSDL specification.- Specified by:
getNativeAttributeNamesin interfaceAttributeExtensible- Returns:
- a List of Strings, one for each local attribute name
-
getAllBindings
public java.util.Map getAllBindings()
Get all the bindings defined in this Definition and those in any imported Definitions in the WSDL tree.- Specified by:
getAllBindingsin interfaceDefinition
-
getAllPortTypes
public java.util.Map getAllPortTypes()
Get all the portTypes defined in this Definition and those in any imported Definitions in the WSDL tree.- Specified by:
getAllPortTypesin interfaceDefinition
-
getAllServices
public java.util.Map getAllServices()
Get all the services defined in this Definition and those in any imported Definitions in the WSDL tree.- Specified by:
getAllServicesin interfaceDefinition
-
-