org.apache.woden.internal.wsdl20
Class WSDLElementImpl

java.lang.Object
  extended by org.apache.woden.internal.wsdl20.WSDLElementImpl
All Implemented Interfaces:
AttributeExtensible, ElementExtensible, WSDLElement
Direct Known Subclasses:
DocumentableImpl, DocumentationImpl

public class WSDLElementImpl
extends java.lang.Object
implements WSDLElement

This abstract class defines the behaviour common to all WSDL elements. That is, it implements support for extension attributes and elements. This interface can be used as a common reference for all WSDL elements represented by the Element API.

Author:
jkaputin@apache.org

Constructor Summary
WSDLElementImpl()
           
 
Method Summary
 void addExtensionElement(ExtensionElement extEl)
           
 void addNamespace(java.lang.String prefix, java.net.URI namespace)
          Associate the specified prefix with the specified namespace URI to this WSDL element.
 NamespaceDeclaration[] getDeclaredNamespaces()
          Return the namespaces and their associated prefixes declared directly within this WSDL element.
 XMLAttr getExtensionAttribute(QName attrType)
          Return the extension attribute with this QName.
 XMLAttr[] getExtensionAttributes()
          Return all extension attributes.
 XMLAttr[] getExtensionAttributesForNamespace(java.net.URI namespace)
          Return the extension attributes from this namespace.
 ExtensionElement[] getExtensionElements()
           
 ExtensionElement[] getExtensionElementsOfType(QName elemType)
           
 NamespaceDeclaration[] getInScopeNamespaces()
          Return all namespaces and their associated prefixes that are in-scope to this WSDL element.
 java.lang.String getNamespacePrefix(java.net.URI namespace)
          Return the prefix associated with the specified namespace URI.
 java.net.URI getNamespaceURI(java.lang.String prefix)
          Return the namespace URI associated with the specified prefix, or null if there is no such namespace declaration.
 boolean hasExtensionAttributesForNamespace(java.net.URI namespace)
          Return true if the implementor has extension attributes belonging to this namespace, otherwise false.
 boolean hasExtensionElementsForNamespace(java.net.URI namespace)
          Return true if the implementor has extension elements belonging to this namespace, otherwise false.
 void removeExtensionElement(ExtensionElement extEl)
           
 java.net.URI removeNamespace(java.lang.String prefix)
          Remove the namespace URI associated with the specified prefix from this WSDL element.
 void setExtensionAttribute(QName attrType, XMLAttr attr)
          Store the extension attribute object identified by the QName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDLElementImpl

public WSDLElementImpl()
Method Detail

setExtensionAttribute

public void setExtensionAttribute(QName attrType,
                                  XMLAttr attr)
Description copied from interface: AttributeExtensible
Store the extension attribute object identified by the QName. If the attribute argument is null, remove the extension attribute identified by the specified QName argument. TODO ? @throws IllegalArgumentException if the QName is null

Specified by:
setExtensionAttribute in interface AttributeExtensible

getExtensionAttribute

public XMLAttr getExtensionAttribute(QName attrType)
Description copied from interface: AttributeExtensible
Return the extension attribute with this QName.

Specified by:
getExtensionAttribute in interface AttributeExtensible

getExtensionAttributesForNamespace

public XMLAttr[] getExtensionAttributesForNamespace(java.net.URI namespace)
Description copied from interface: AttributeExtensible
Return the extension attributes from this namespace.

Specified by:
getExtensionAttributesForNamespace in interface AttributeExtensible

getExtensionAttributes

public XMLAttr[] getExtensionAttributes()
Description copied from interface: AttributeExtensible
Return all extension attributes.

Specified by:
getExtensionAttributes in interface AttributeExtensible

hasExtensionAttributesForNamespace

public boolean hasExtensionAttributesForNamespace(java.net.URI namespace)
Description copied from interface: AttributeExtensible
Return true if the implementor has extension attributes belonging to this namespace, otherwise false.

Specified by:
hasExtensionAttributesForNamespace in interface AttributeExtensible

addExtensionElement

public void addExtensionElement(ExtensionElement extEl)
Specified by:
addExtensionElement in interface ElementExtensible

removeExtensionElement

public void removeExtensionElement(ExtensionElement extEl)
Specified by:
removeExtensionElement in interface ElementExtensible

getExtensionElements

public ExtensionElement[] getExtensionElements()
Specified by:
getExtensionElements in interface ElementExtensible

getExtensionElementsOfType

public ExtensionElement[] getExtensionElementsOfType(QName elemType)
Specified by:
getExtensionElementsOfType in interface ElementExtensible

hasExtensionElementsForNamespace

public boolean hasExtensionElementsForNamespace(java.net.URI namespace)
Description copied from interface: ElementExtensible
Return true if the implementor has extension elements belonging to this namespace, otherwise false.

Specified by:
hasExtensionElementsForNamespace in interface ElementExtensible

addNamespace

public void addNamespace(java.lang.String prefix,
                         java.net.URI namespace)
Description copied from interface: WSDLElement
Associate the specified prefix with the specified namespace URI to this WSDL element. This equates to adding an xmlns namespace declaration to this WSDL 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.

Specified by:
addNamespace in interface WSDLElement
Parameters:
prefix - the prefix String associated with namespaceURI
namespace - the namespace URI associated with prefix

removeNamespace

public java.net.URI removeNamespace(java.lang.String prefix)
Description copied from interface: WSDLElement
Remove the namespace URI associated with the specified prefix from this WSDL element. This equates to removing an xmlns namespace declaration from this WSDL element. To remove the default namespace, specify null or the empty string "" for the prefix.

Specified by:
removeNamespace in interface WSDLElement
Parameters:
prefix - the prefix String associated with the namespace to be removed
Returns:
the removed namespace URI or null if no prefix/namespace association exists

getNamespacePrefix

public java.lang.String getNamespacePrefix(java.net.URI namespace)
Description copied from interface: WSDLElement
Return the prefix associated with the specified namespace URI. The scope of the search corresponds to the scope of namespace declarations in XML. That is, from the current element upwards to the root element (to the wsdl:description).

Specified by:
getNamespacePrefix in interface WSDLElement
Parameters:
namespace - the namespace URI whose associated prefix is required
Returns:
the associated prefix String

getNamespaceURI

public java.net.URI getNamespaceURI(java.lang.String prefix)
Description copied from interface: WSDLElement
Return the namespace URI associated with the specified prefix, or null if there is no such namespace declaration. The scope of the search corresponds to the scope of namespace declarations in XML. That is, from the current element upwards to the root element (to the wsdl:description). To request the default namespace, specify null or the empty string "" for the prefix.

Specified by:
getNamespaceURI in interface WSDLElement
Parameters:
prefix - the prefix whose associated namespace URI is required
Returns:
the associated namespace URI

getInScopeNamespaces

public NamespaceDeclaration[] getInScopeNamespaces()
Description copied from interface: WSDLElement
Return all namespaces and their associated prefixes that are in-scope to this WSDL element. That is, those declared directly within this element and those declared in ancestor elements upwards to the root element (to the wsdl:description).

Specified by:
getInScopeNamespaces in interface WSDLElement
Returns:
an array of NamespaceDeclaration

getDeclaredNamespaces

public NamespaceDeclaration[] getDeclaredNamespaces()
Description copied from interface: WSDLElement
Return the namespaces and their associated prefixes declared directly within this WSDL element.

Specified by:
getDeclaredNamespaces in interface WSDLElement
Returns:
an array of NamespaceDeclaration


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