org.apache.woden.wsdl20.xml
Interface DescriptionElement

All Superinterfaces:
AttributeExtensible, DocumentableElement, ElementExtensible, WSDLElement
All Known Implementing Classes:
DescriptionImpl

public interface DescriptionElement
extends DocumentableElement

Represents the WSDL 2.0 <description> element.

Author:
John Kaputin (jkaputin@apache.org)

Method Summary
 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.
 BindingElement[] getBindingElements()
          Return the set of BindingElements within this DescriptionElement.
 java.net.URI getDocumentBaseURI()
          Return the document base URI that was used to locate the <description> element that this DescriptionElement corresponds to.
 ImportElement[] getImportElements()
          Return the set of ImportElements within this DescriptionElement.
 IncludeElement[] getIncludeElements()
          Return the set of IncludeElements within this DescriptionElement.
 InterfaceElement[] getInterfaceElements()
          Return the set of InterfaceElements within this DescriptionElement.
 ServiceElement[] getServiceElements()
          Return the set of ServiceElements within this DescriptionElement.
 java.net.URI getTargetNamespace()
          Return the target namespace URI.
 TypesElement getTypesElement()
          Return the TypesElement within this DescriptionElement.
 void setDocumentBaseURI(java.net.URI documentBaseURI)
          Set the document base URI to the specified URI.
 void setTargetNamespace(java.net.URI namespaceURI)
          Set the target namespace to the specified URI.
 Description toComponent()
          Return the Description component derived from this DescriptionElement.
 
Methods inherited from interface org.apache.woden.wsdl20.xml.DocumentableElement
addDocumentationElement, getDocumentationElements
 
Methods inherited from interface org.apache.woden.wsdl20.xml.WSDLElement
addNamespace, getDeclaredNamespaces, getInScopeNamespaces, getNamespacePrefix, getNamespaceURI, removeNamespace
 
Methods inherited from interface org.apache.woden.wsdl20.extensions.AttributeExtensible
getExtensionAttribute, getExtensionAttributes, getExtensionAttributesForNamespace, hasExtensionAttributesForNamespace, setExtensionAttribute
 
Methods inherited from interface org.apache.woden.wsdl20.extensions.ElementExtensible
addExtensionElement, getExtensionElements, getExtensionElementsOfType, hasExtensionElementsForNamespace, removeExtensionElement
 

Method Detail

setDocumentBaseURI

void setDocumentBaseURI(java.net.URI documentBaseURI)
Set the document base URI to the specified URI. This is the base URI used to locate the <description> element that this DescriptionElement corresponds to. This is used to resolve relative paths specified within this WSDL description that refer to other WSDL or Schema documents. For example, via <xs:import>, <wsdl:import> or <wsdl:include> elements.

Parameters:
documentBaseURI - the base URI of the WSDL

getDocumentBaseURI

java.net.URI getDocumentBaseURI()
Return the document base URI that was used to locate the <description> element that this DescriptionElement corresponds to. This is used to resolve relative paths within this WSDL description that refer to other WSDL or Schema documents.

Returns:
the document base URI

setTargetNamespace

void setTargetNamespace(java.net.URI namespaceURI)
Set the target namespace to the specified URI. This corresponds to the targetNamespace attribute of the <description> element.

Parameters:
namespaceURI - the target namespace URI

getTargetNamespace

java.net.URI getTargetNamespace()
Return the target namespace URI. This corresponds to the targetNamespace attribute of the <description> element.

Returns:
the target namespace URI.

addImportElement

ImportElement addImportElement()
Create an ImportElement with this DescriptionElement as its parent and return a reference to it. This equates to adding an <import> element to the <description> element.

Returns:
the ImportElement

addIncludeElement

IncludeElement addIncludeElement()
Create an IncludeElement with this DescriptionElement as its parent and return a reference to it. This equates to adding an <include> element to the <description> element.

Returns:
the IncludeElement

addInterfaceElement

InterfaceElement addInterfaceElement()
Create an InterfaceElement with this DescriptionElement as its parent and return a reference to it. This equates to adding an <interface> element to the <description> element.

Returns:
the InterfaceElement

addBindingElement

BindingElement addBindingElement()
Create a BindingElement with this DescriptionElement as its parent and return a reference to it. This equates to adding an <binding> element to the <description> element.

Returns:
the BindingElement

addServiceElement

ServiceElement addServiceElement()
Create a ServiceElement with this DescriptionElement as its parent and return a reference to it. This equates to adding an <service> element to the <description> element.

Returns:
the ServiceElement

getImportElements

ImportElement[] getImportElements()
Return the set of ImportElements within this DescriptionElement. This equates to the set of <import> elements within the <description> element. If no ImportElements exist, an empty array is returned.

Returns:
an array of ImportElement

getIncludeElements

IncludeElement[] getIncludeElements()
Return the set of IncludeElements within this DescriptionElement. This equates to the set of <include> elements within the <description> element. If no IncludeElements exist, an empty array is returned.

Returns:
an array of IncludeElement

getTypesElement

TypesElement getTypesElement()
Return the TypesElement within this DescriptionElement. This corresponds to the <types> element within the <description> element. If no TypesElement exists, this method will return null.

Returns:
the TypesElement

addTypesElement

TypesElement addTypesElement()
                             throws WSDLException
Create a TypesElement with this DescriptionElement as its parent and return a reference to it. If a TypesElement already exists for this DescriptionElement a WSDLException will be thrown.

Returns:
the TypesElement
Throws:
WSDLException

getInterfaceElements

InterfaceElement[] getInterfaceElements()
Return the set of InterfaceElements within this DescriptionElement. This equates to the set of <interface> elements within the <description> element. If no InterfaceElements exist, an empty array is returned.

Returns:
an array of InterfaceElement

getBindingElements

BindingElement[] getBindingElements()
Return the set of BindingElements within this DescriptionElement. This equates to the set of <binding> elements within the <description> element. If no BindingElements exist, an empty array is returned.

Returns:
an array of BindingElement

getServiceElements

ServiceElement[] getServiceElements()
Return the set of ServiceElements within this DescriptionElement. This equates to the set of <service> elements within the <description> element. If no ServiceElements exist, an empty array is returned.

Returns:
an array of ServiceElement

toComponent

Description toComponent()
Return the Description component derived from this 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.

Returns:
the Description component derived from this DescriptionElement


Copyright © 2005-2010 Apache Software Foundation. All Rights Reserved.