org.apache.woden.internal.util.om
Class OMUtils

java.lang.Object
  extended by org.apache.woden.internal.util.om.OMUtils

public class OMUtils
extends java.lang.Object

This class contains utility methods required for parsing elements in a WSDL using AXIOM.


Constructor Summary
OMUtils()
           
 
Method Summary
static java.lang.String getAttribute(org.apache.axiom.om.OMElement omElement, java.lang.String attrName)
          Returns the value of an attribute of an element.
static java.lang.String getAttributeNS(org.apache.axiom.om.OMElement el, java.lang.String namespaceURI, java.lang.String localPart)
           
static org.apache.axiom.om.OMElement getElement(java.lang.String uri)
          todo add validation
static org.xml.sax.InputSource getInputSource(org.apache.axiom.om.OMElement element)
           
static org.apache.axiom.om.impl.builder.StAXOMBuilder getOMBuilder(java.lang.String strUri)
           
static QName getQName(java.lang.String prefixedValue, org.apache.axiom.om.OMElement contextEl)
           
static void registerUniquePrefix(java.lang.String prefix, java.lang.String namespaceURI, DescriptionElement desc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMUtils

public OMUtils()
Method Detail

getOMBuilder

public static org.apache.axiom.om.impl.builder.StAXOMBuilder getOMBuilder(java.lang.String strUri)
                                                                   throws java.io.IOException
Parameters:
strUri - The URI where the WSDL can be found
Returns:
A StAXOMBuilder which could be used in obtaining the document object
Throws:
java.io.IOException

getElement

public static org.apache.axiom.om.OMElement getElement(java.lang.String uri)
                                                throws java.io.IOException
todo add validation

Parameters:
uri - of the OMDocument
Returns:
an OMElement representing the document just read
Throws:
java.io.IOException

getAttribute

public static java.lang.String getAttribute(org.apache.axiom.om.OMElement omElement,
                                            java.lang.String attrName)
Returns the value of an attribute of an element. Returns null if the attribute is not found

Parameters:
omElement - Element whose attrib is looked for
attrName - name of attribute to look for
Returns:
the attribute value

getInputSource

public static org.xml.sax.InputSource getInputSource(org.apache.axiom.om.OMElement element)
Parameters:
element - OMElement which would most probably contain
Returns:
a SAX inputsource from the OMElement

getQName

public static QName getQName(java.lang.String prefixedValue,
                             org.apache.axiom.om.OMElement contextEl)
                      throws WSDLException
Parameters:
prefixedValue - to which the QName is prefixed
contextEl - Element in which the QName is sought for
Returns:
The relevant QName for the prefix
Throws:
WSDLException

getAttributeNS

public static java.lang.String getAttributeNS(org.apache.axiom.om.OMElement el,
                                              java.lang.String namespaceURI,
                                              java.lang.String localPart)
Parameters:
el - Element whose attrib is looked for
namespaceURI - namespace URI of attribute to look for
localPart - local part of attribute to look for
Returns:
the attribute value

registerUniquePrefix

public static void registerUniquePrefix(java.lang.String prefix,
                                        java.lang.String namespaceURI,
                                        DescriptionElement desc)
                                 throws WSDLException
Throws:
WSDLException


Copyright © 2007. All Rights Reserved.