org.apache.woden.internal.util.om
Class OMUtils
java.lang.Object
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.
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 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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OMUtils
public OMUtils()
getOMBuilder
public static org.apache.axiom.om.impl.builder.StAXOMBuilder getOMBuilder(java.lang.String strUri)
throws java.io.IOException,
java.net.URISyntaxException,
javax.xml.stream.XMLStreamException
- 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
java.net.URISyntaxException
javax.xml.stream.XMLStreamException
getElement
public static org.apache.axiom.om.OMElement getElement(java.lang.String uri)
throws java.io.IOException,
java.net.URISyntaxException,
javax.xml.stream.XMLStreamException
- todo add validation
- Parameters:
uri
- of the OMDocument
- Returns:
- an OMElement representing the document just read
- Throws:
java.io.IOException
java.net.URISyntaxException
javax.xml.stream.XMLStreamException
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 forattrName
- 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
Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.