public class DescriptionImpl extends WSDLComponentImpl implements Description, DescriptionElement
Note: this class is different to the other WSDL implementation classes,
which all implement two Java interfaces; a component model interface and the
interface for the corresponding WSDL element. Different implementations
are used for the Description component and for the <wsdl:description>
element because the latter exposes the composite structure of imported and
included WSDL documents, while the Description component 'flattens' this
structure into an abstract view of the WSDL. A separate implementation
class, DescriptionElementImpl
, exists to represent
the <wsdl:description> element.
Constructor and Description |
---|
DescriptionImpl(WSDLContext wsdlContext) |
Modifier and Type | Method and Description |
---|---|
BindingElement |
addBindingElement()
Create a BindingElement with this DescriptionElement as its parent and
return a reference to it.
|
ImportElement |
addImportElement()
Create an ImportElement with this DescriptionElement as its parent and
return a reference to it.
|
IncludeElement |
addIncludeElement()
Create an IncludeElement with this DescriptionElement as its parent and
return a reference to it.
|
InterfaceElement |
addInterfaceElement()
Create an InterfaceElement with this DescriptionElement as its parent and
return a reference to it.
|
ServiceElement |
addServiceElement()
Create a ServiceElement with this DescriptionElement as its parent and
return a reference to it.
|
TypesElement |
addTypesElement()
Create a TypesElement with this DescriptionElement as its parent and
return a reference to it.
|
Binding |
getBinding(QName name)
Returns a Binding with the specified name from the {bindings} property of this
Description.
|
BindingElement[] |
getBindingElements()
Return the set of BindingElements within this DescriptionElement.
|
Binding[] |
getBindings()
Represents the {bindings} property of the Description component.
|
URI |
getDocumentBaseURI()
Return the document base URI that was used to locate the <description> element that
this DescriptionElement corresponds to.
|
ElementDeclaration |
getElementDeclaration(QName qname)
Returns the ElementDeclaration with the specified name from the set of ElementDeclarations
represented by the {element declarations} property of this Description.
|
ElementDeclaration[] |
getElementDeclarations()
Represents the {element declarations} property of the Description component.
|
FragmentIdentifier |
getFragmentIdentifier()
Returns the fragment identifier for this WSDL 2.0 component.
|
ImportElement[] |
getImportElements()
Return the set of ImportElements within this DescriptionElement.
|
IncludeElement[] |
getIncludeElements()
Return the set of IncludeElements within this DescriptionElement.
|
Interface |
getInterface(QName name)
Returns an Interface with the specified name from the {interfaces} property of this
Description.
|
InterfaceElement[] |
getInterfaceElements()
Return the set of InterfaceElements within this DescriptionElement.
|
Interface[] |
getInterfaces()
Represents the {interfaces} property of the Description component.
|
Service |
getService(QName name)
Returns a Service with the specified name from the {services} property of this
Description.
|
ServiceElement[] |
getServiceElements()
Return the set of ServiceElements within this DescriptionElement.
|
Service[] |
getServices()
Represents the {services} property of the Description component.
|
URI |
getTargetNamespace()
Return the target namespace URI.
|
TypeDefinition |
getTypeDefinition(QName qname)
Returns the TypeDefinition with the specified name from the set of TypeDefinitions
represented by the {type definitions} property of this Description.
|
TypeDefinition[] |
getTypeDefinitions()
Represents the {type definitions} property of the Description component.
|
TypesElement |
getTypesElement()
Return the TypesElement within this DescriptionElement.
|
void |
setDocumentBaseURI(URI documentBaseURI)
Set the document base URI to the specified URI.
|
void |
setTargetNamespace(URI namespace)
Set the target namespace to the specified URI.
|
Description |
toComponent()
Return the Description component derived from this DescriptionElement.
|
DescriptionElement |
toElement()
Returns a WSDLElement that represents the element information item from the WSDL 2.0
infoset that maps to this WSDLComponent.
|
containsComponent, equals, getComponentExtensionContext, getExtensionProperties, getExtensionProperties, getExtensionProperty, isEquivalentTo, setComponentExtensionContext, toString
addDocumentationElement, getDocumentationElements
addExtensionElement, addNamespace, getDeclaredNamespaces, getExtensionAttribute, getExtensionAttributes, getExtensionAttributesForNamespace, getExtensionElements, getExtensionElementsOfType, getInScopeNamespaces, getNamespacePrefix, getNamespaceURI, hasExtensionAttributesForNamespace, hasExtensionElementsForNamespace, removeExtensionElement, removeNamespace, setExtensionAttribute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, getComponentExtensionContext, isEquivalentTo, setComponentExtensionContext, toString
getExtensionProperties, getExtensionProperties, getExtensionProperty
addDocumentationElement, getDocumentationElements
addNamespace, getDeclaredNamespaces, getInScopeNamespaces, getNamespacePrefix, getNamespaceURI, removeNamespace
getExtensionAttribute, getExtensionAttributes, getExtensionAttributesForNamespace, hasExtensionAttributesForNamespace, setExtensionAttribute
addExtensionElement, getExtensionElements, getExtensionElementsOfType, hasExtensionElementsForNamespace, removeExtensionElement
public DescriptionImpl(WSDLContext wsdlContext)
public Interface[] getInterfaces()
Description
getInterfaces
in interface Description
public Interface getInterface(QName name)
Description
getInterface
in interface Description
name
- the QName of the required Interfacepublic Binding[] getBindings()
Description
getBindings
in interface Description
public Binding getBinding(QName name)
Description
getBinding
in interface Description
name
- the QName of the required Bindingpublic Service[] getServices()
Description
getServices
in interface Description
public Service getService(QName name)
Description
getService
in interface Description
name
- the QName of the required Servicepublic ElementDeclaration[] getElementDeclarations()
Description
getElementDeclarations
in interface Description
public ElementDeclaration getElementDeclaration(QName qname)
Description
getElementDeclaration
in interface Description
qname
- the QName of the required ElementDeclarationpublic TypeDefinition[] getTypeDefinitions()
Description
getTypeDefinitions
in interface Description
public TypeDefinition getTypeDefinition(QName qname)
Description
getTypeDefinition
in interface Description
qname
- the QName of the required TypeDefinitionpublic DescriptionElement toElement()
Description
The Description component is unlike other WSDL components which map neatly to a single WSDL element. Description represents a 'flattened' view of the entire WSDL infoset tree, including the WSDL components from any imported or included WSDL documents, so it could contain the content of multiple <wsdl:description> elements.
If the Component model has been derived from such a composite WSDL infoset, the behaviour of this method is to return the DescriptionElement that represents the root <wsdl:description> element.
toElement
in interface Description
public void setDocumentBaseURI(URI documentBaseURI)
DescriptionElement
setDocumentBaseURI
in interface DescriptionElement
documentBaseURI
- the base URI of the WSDLpublic URI getDocumentBaseURI()
DescriptionElement
getDocumentBaseURI
in interface DescriptionElement
public void setTargetNamespace(URI namespace)
DescriptionElement
targetNamespace
attribute of the <description>
element.setTargetNamespace
in interface DescriptionElement
namespace
- the target namespace URIpublic URI getTargetNamespace()
DescriptionElement
targetNamespace
attribute of the <description>
element.getTargetNamespace
in interface DescriptionElement
public ImportElement[] getImportElements()
DescriptionElement
getImportElements
in interface DescriptionElement
public IncludeElement[] getIncludeElements()
DescriptionElement
getIncludeElements
in interface DescriptionElement
public TypesElement getTypesElement()
DescriptionElement
getTypesElement
in interface DescriptionElement
public TypesElement addTypesElement() throws WSDLException
DescriptionElement
addTypesElement
in interface DescriptionElement
WSDLException
public InterfaceElement[] getInterfaceElements()
DescriptionElement
getInterfaceElements
in interface DescriptionElement
public BindingElement[] getBindingElements()
DescriptionElement
getBindingElements
in interface DescriptionElement
public ServiceElement[] getServiceElements()
DescriptionElement
getServiceElements
in interface DescriptionElement
public ImportElement addImportElement()
DescriptionElement
addImportElement
in interface DescriptionElement
public IncludeElement addIncludeElement()
DescriptionElement
addIncludeElement
in interface DescriptionElement
public InterfaceElement addInterfaceElement()
DescriptionElement
addInterfaceElement
in interface DescriptionElement
public BindingElement addBindingElement()
DescriptionElement
addBindingElement
in interface DescriptionElement
public ServiceElement addServiceElement()
DescriptionElement
addServiceElement
in interface DescriptionElement
public Description toComponent()
DescriptionElement
The Description component is unlike other WSDL components which map neatly to a single WSDL element. Description represents a 'flattened' view of the entire WSDL infoset tree, including the WSDL components from any imported or included WSDL documents, so it could contain the content of multiple <description> elements.
If this DescriptionElement imports or includes other DescriptionElements (that is, if it is the root of a composite WSDL document), the behaviour of this method is equivalent to traversing the WSDL tree recursively and aggregating the WSDL content of each DescriptionElement into a single Description component.
This equates to retrieving the root <description> element and traversing any <wsdl:import> or <wsdl:include> elements to retrieve WSDL content of any nested <description> elements.
The toComponent()
method is only defined for DescriptionElement, not for
other WSDL Element interfaces. This is because the WSDL 2.0 Component model is a nested
hierarchy with a single Description component at the top. To access WSDL components,
we must start at the Description and traverse the component model from there.
toComponent
in interface DescriptionElement
public FragmentIdentifier getFragmentIdentifier()
WSDLComponent
getFragmentIdentifier
in interface WSDLComponent
Copyright © 2005–2014 Apache Software Foundation. All rights reserved.