|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.woden.internal.wsdl20.WSDLElementImpl
org.apache.woden.internal.wsdl20.WSDLObjectImpl
org.apache.woden.internal.wsdl20.DocumentableImpl
org.apache.woden.internal.wsdl20.DescriptionImpl
This class provides the implementation for a Description component from the WSDL Component Model, as described in the WSDL 2.0 specification.
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 Summary | |
DescriptionImpl()
|
Method Summary | |
BindingElement |
addBindingElement()
Create a BindingElement with this DescriptionElement as its parent and return a reference to it. |
void |
addElementDeclaration(ElementDeclaration elDec)
|
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. |
void |
addNamespace(java.lang.String prefix,
java.net.URI namespace)
Associate the specified prefix with the specified namespace URI. |
ServiceElement |
addServiceElement()
Create a ServiceElement with this DescriptionElement as its parent and return a reference to it. |
void |
addTypeDefinition(TypeDefinition typeDef)
|
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. |
java.net.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. |
ExtensionRegistry |
getExtensionRegistry()
Return the ExtensionRegistry used handle WSDL extensions defined by this DescriptionElement and by any WSDL elements nested within it. |
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. |
java.net.URI |
getNamespace(java.lang.String prefix)
Return the namespace URI associated with the specified prefix. |
java.util.Map |
getNamespaces()
Return the set of all prefix/namespace URI associations. |
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. |
java.net.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 |
removeNamespace(java.lang.String prefix)
Remove the namespace URI associated with the specified prefix. |
void |
setDocumentBaseURI(java.net.URI documentBaseURI)
Set the document base URI to the specified URI. |
void |
setExtensionRegistry(ExtensionRegistry extReg)
Specify the ExtensionRegistry to be used handle WSDL extensions defined by this DescriptionElement and by any WSDL elements nested within it. |
void |
setTargetNamespace(java.net.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. |
Methods inherited from class org.apache.woden.internal.wsdl20.DocumentableImpl |
addDocumentationElement, getDocumentationElements |
Methods inherited from class org.apache.woden.internal.wsdl20.WSDLObjectImpl |
containsComponent, equals, getComponentExtensionsForNamespace, setComponentExtensions |
Methods inherited from class org.apache.woden.internal.wsdl20.WSDLElementImpl |
addExtensionElement, getExtensionAttribute, getExtensionAttributes, getExtensionAttributesForNamespace, getExtensionElements, getExtensionElementsOfType, hasExtensionAttributesForNamespace, hasExtensionElementsForNamespace, removeExtensionElement, setExtensionAttribute |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.woden.wsdl20.WSDLComponent |
equals, getComponentExtensionsForNamespace |
Methods inherited from interface org.apache.woden.wsdl20.xml.DocumentableElement |
addDocumentationElement, getDocumentationElements |
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 |
Constructor Detail |
public DescriptionImpl()
Method Detail |
public Interface[] getInterfaces()
Description
getInterfaces
in interface Description
public Interface getInterface(QName name)
Description
getInterface
in interface Description
name
- the QName of the required Interface
public Binding[] getBindings()
Description
getBindings
in interface Description
public Binding getBinding(QName name)
Description
getBinding
in interface Description
name
- the QName of the required Binding
public Service[] getServices()
Description
getServices
in interface Description
public Service getService(QName name)
Description
getService
in interface Description
name
- the QName of the required Service
public ElementDeclaration[] getElementDeclarations()
Description
getElementDeclarations
in interface Description
public ElementDeclaration getElementDeclaration(QName qname)
Description
getElementDeclaration
in interface Description
qname
- the QName of the required ElementDeclaration
public TypeDefinition[] getTypeDefinitions()
Description
getTypeDefinitions
in interface Description
public TypeDefinition getTypeDefinition(QName qname)
Description
getTypeDefinition
in interface Description
qname
- the QName of the required TypeDefinition
public 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(java.net.URI documentBaseURI)
DescriptionElement
setDocumentBaseURI
in interface DescriptionElement
documentBaseURI
- the base URI of the WSDLpublic java.net.URI getDocumentBaseURI()
DescriptionElement
getDocumentBaseURI
in interface DescriptionElement
public void setTargetNamespace(java.net.URI namespace)
DescriptionElement
targetNamespace
attribute of the <description>
element.
setTargetNamespace
in interface DescriptionElement
namespace
- the target namespace URIpublic java.net.URI getTargetNamespace()
DescriptionElement
targetNamespace
attribute of the <description>
element.
getTargetNamespace
in interface DescriptionElement
public void addNamespace(java.lang.String prefix, java.net.URI namespace)
DescriptionElement
xmlns
namespace declaration to the
<description> element.
To define the default namespace, specify null or the empty string "" for the prefix.
If null is specified for the namespace URI, the prefix/namespace association will be
removed (i.e. the same behaviour as the removeNamespace
method).
If the specified prefix is already associated with a namespace URI,
that association will be replaced by the specified prefix/namespace association.
addNamespace
in interface DescriptionElement
prefix
- the prefix String associated with namespace
namespace
- the namespace URI associated with prefix
public void removeNamespace(java.lang.String prefix)
DescriptionElement
xmlns
namespace declaration from the
<description> element.
To remove the default namespace, specify null or the empty string "" for the prefix.
If the specified prefix is not associated with a namespace, no action is performed.
removeNamespace
in interface DescriptionElement
prefix
- the prefix String associated with a namespacepublic java.net.URI getNamespace(java.lang.String prefix)
DescriptionElement
xmlns
namespace declaration on the
<description> element.
To return the default namespace, specify null or the empty string "" for the prefix.
If the specified prefix is not associated with a namespace, null is returned.
getNamespace
in interface DescriptionElement
prefix
- the prefix String associated with a namespacepublic java.util.Map getNamespaces()
DescriptionElement
xmlns
namespace declaration on the
<description> element.
getNamespaces
in interface DescriptionElement
public ImportElement[] getImportElements()
DescriptionElement
getImportElements
in interface DescriptionElement
public IncludeElement[] getIncludeElements()
DescriptionElement
getIncludeElements
in interface DescriptionElement
public TypesElement getTypesElement()
DescriptionElement
TODO modify this behaviour to return null if none exists and define a new factory method called createTypesElement() WODEN-141
getTypesElement
in interface DescriptionElement
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 void setExtensionRegistry(ExtensionRegistry extReg)
DescriptionElement
setExtensionRegistry
in interface DescriptionElement
extReg
- the ExtensionRegistry used with this descriptionpublic ExtensionRegistry getExtensionRegistry()
DescriptionElement
getExtensionRegistry
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 void addElementDeclaration(ElementDeclaration elDec)
public void addTypeDefinition(TypeDefinition typeDef)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |