org.apache.axis2.om.impl.dom
Class DOMStAXWrapper

java.lang.Object
  extended byorg.apache.axis2.om.impl.dom.DOMStAXWrapper
All Implemented Interfaces:
XMLStreamConstants, XMLStreamReader

public class DOMStAXWrapper
extends Object
implements XMLStreamReader, XMLStreamConstants

This is exactly the same as org.apache.axis2.om.impl.llom.OMStAXWrapper. BUT this uses the org.apache.axis2.om.impl.dom.DOMNavigator. Note - This class also implements the streaming constants interface to get access to the StAX constants.


Field Summary
 
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
 
Constructor Summary
DOMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode)
          When constructing the OMStaxWrapper, the creator must produce the builder (an instance of the OMXMLparserWrapper of the input) and the Element Node to start parsing.
DOMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode, boolean cache)
          Constructor OMStAXWrapper
 
Method Summary
 void close()
          Method close.
 int getAttributeCount()
           
 String getAttributeLocalName(int i)
           
 QName getAttributeName(int i)
           
 String getAttributeNamespace(int i)
           
 String getAttributePrefix(int i)
           
 String getAttributeType(int i)
           
 String getAttributeValue(int i)
           
 String getAttributeValue(String s, String s1)
          Method getAttributeValue.
 String getCharacterEncodingScheme()
          Method getCharacterEncodingScheme.
 String getElementText()
           
 String getEncoding()
          Method getEncoding.
 int getEventType()
           
 String getLocalName()
           
 Location getLocation()
          Method getLocation.
 QName getName()
           
 NamespaceContext getNamespaceContext()
          Method getNamespaceContext.
 int getNamespaceCount()
           
 String getNamespacePrefix(int i)
           
 String getNamespaceURI()
           
 String getNamespaceURI(int i)
           
 String getNamespaceURI(String s)
          Method getNamespaceURI.
 String getPIData()
          Method getPIData.
 String getPITarget()
          Method getPITarget.
 String getPrefix()
           
 Object getProperty(String s)
          Method getProperty.
 String getText()
           
 char[] getTextCharacters()
           
 int getTextCharacters(int i, char[] chars, int i1, int i2)
           
 int getTextLength()
           
 int getTextStart()
           
 String getVersion()
          Method getVersion.
 boolean hasName()
           
 boolean hasNext()
          Method hasNext.
 boolean hasText()
           
 boolean isAllowSwitching()
          Method isAllowSwitching.
 boolean isAttributeSpecified(int i)
           
 boolean isCharacters()
          Method isCharacters.
 boolean isEndElement()
          Method isEndElement.
 boolean isStandalone()
          Method isStandalone.
 boolean isStartElement()
          Method isStartElement.
 boolean isWhiteSpace()
          Method isWhiteSpace.
 int next()
          Method next.
 int nextTag()
          Not implemented yet
 void require(int i, String s, String s1)
           
 void setAllowSwitching(boolean b)
          Method setAllowSwitching.
 void setParser(XMLStreamReader parser)
           
 boolean standaloneSet()
          Method standaloneSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMStAXWrapper

public DOMStAXWrapper(OMXMLParserWrapper builder,
                      OMElement startNode)
When constructing the OMStaxWrapper, the creator must produce the builder (an instance of the OMXMLparserWrapper of the input) and the Element Node to start parsing. The wrapper parses(proceed) until the end of the given element. Hence care must be taken to pass the root element if the entire document is needed.

Parameters:
builder -
startNode -

DOMStAXWrapper

public DOMStAXWrapper(OMXMLParserWrapper builder,
                      OMElement startNode,
                      boolean cache)
Constructor OMStAXWrapper

Parameters:
builder -
startNode -
cache -
Method Detail

setAllowSwitching

public void setAllowSwitching(boolean b)
Method setAllowSwitching.

Parameters:
b -

isAllowSwitching

public boolean isAllowSwitching()
Method isAllowSwitching.

Returns:
Returns boolean.

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface XMLStreamReader
Returns:
Returns String.
See Also:
XMLStreamReader.getPrefix()

getNamespaceURI

public String getNamespaceURI()
Specified by:
getNamespaceURI in interface XMLStreamReader
Returns:
Returns String.
See Also:
XMLStreamReader.getNamespaceURI()

hasName

public boolean hasName()
Specified by:
hasName in interface XMLStreamReader
Returns:
Returns String.
See Also:
XMLStreamReader.hasName()

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface XMLStreamReader
Returns:
Returns String.
See Also:
XMLStreamReader.getLocalName()

getName

public QName getName()
Specified by:
getName in interface XMLStreamReader
Returns:
Returns QName.
See Also:
XMLStreamReader.getName()

hasText

public boolean hasText()
Specified by:
hasText in interface XMLStreamReader
Returns:
Returns boolean.
See Also:
XMLStreamReader.hasText()

getTextLength

public int getTextLength()
Specified by:
getTextLength in interface XMLStreamReader
Returns:
Returns int.
See Also:
XMLStreamReader.getTextLength()

getTextStart

public int getTextStart()
Specified by:
getTextStart in interface XMLStreamReader
Returns:
Returns int.
See Also:
XMLStreamReader.getTextStart()

getTextCharacters

public int getTextCharacters(int i,
                             char[] chars,
                             int i1,
                             int i2)
                      throws XMLStreamException
Specified by:
getTextCharacters in interface XMLStreamReader
Parameters:
i -
chars -
i1 -
i2 -
Returns:
Returns int.
Throws:
XMLStreamException
See Also:
XMLStreamReader.getTextCharacters(int, char[], int, int)

getTextCharacters

public char[] getTextCharacters()
Specified by:
getTextCharacters in interface XMLStreamReader
Returns:
Returns char[].
See Also:
XMLStreamReader.getTextCharacters()

getText

public String getText()
Specified by:
getText in interface XMLStreamReader
Returns:
Returns String.
See Also:
XMLStreamReader.getText()

getEventType

public int getEventType()
Specified by:
getEventType in interface XMLStreamReader
Returns:
Returns int.
See Also:
XMLStreamReader.getEventType()

getNamespaceURI

public String getNamespaceURI(int i)
Specified by:
getNamespaceURI in interface XMLStreamReader
Parameters:
i -
Returns:
Returns String.
See Also:
XMLStreamReader.getNamespaceURI(java.lang.String)

getNamespacePrefix

public String getNamespacePrefix(int i)
Specified by:
getNamespacePrefix in interface XMLStreamReader
Parameters:
i -
Returns:
Returns String.
See Also:
XMLStreamReader.getNamespacePrefix(int)

getNamespaceCount

public int getNamespaceCount()
Specified by:
getNamespaceCount in interface XMLStreamReader
Returns:
Returns int.
See Also:
XMLStreamReader.getNamespaceCount()

isAttributeSpecified

public boolean isAttributeSpecified(int i)
Specified by:
isAttributeSpecified in interface XMLStreamReader
Parameters:
i -
Returns:
Returns boolean.
See Also:
XMLStreamReader.isAttributeSpecified(int)

getAttributeValue

public String getAttributeValue(int i)
Specified by:
getAttributeValue in interface XMLStreamReader
Parameters:
i -
Returns:
Returns String.
See Also:
XMLStreamReader.getAttributeValue(java.lang.String, java.lang.String)

getAttributeType

public String getAttributeType(int i)
Specified by:
getAttributeType in interface XMLStreamReader
Parameters:
i -
Returns:
Returns String.
See Also:
XMLStreamReader.getAttributeType(int)

getAttributePrefix

public String getAttributePrefix(int i)
Specified by:
getAttributePrefix in interface XMLStreamReader
Parameters:
i -
Returns:
Returns String.
See Also:
XMLStreamReader.getAttributePrefix(int)

getAttributeLocalName

public String getAttributeLocalName(int i)
Specified by:
getAttributeLocalName in interface XMLStreamReader
Parameters:
i -
Returns:
Returns String.
See Also:
XMLStreamReader.getAttributeLocalName(int)

getAttributeNamespace

public String getAttributeNamespace(int i)
Specified by:
getAttributeNamespace in interface XMLStreamReader
Parameters:
i -
Returns:
Returns String.
See Also:
XMLStreamReader.getAttributeNamespace(int)

getAttributeName

public QName getAttributeName(int i)
Specified by:
getAttributeName in interface XMLStreamReader
Parameters:
i -
Returns:
Returns QName.
See Also:
XMLStreamReader.getAttributeName(int)

getAttributeCount

public int getAttributeCount()
Specified by:
getAttributeCount in interface XMLStreamReader
Returns:
Returns int.
See Also:
XMLStreamReader.getAttributeCount()

getAttributeValue

public String getAttributeValue(String s,
                                String s1)
Method getAttributeValue.

Specified by:
getAttributeValue in interface XMLStreamReader
Parameters:
s -
s1 -
Returns:
Returns String.

isWhiteSpace

public boolean isWhiteSpace()
Method isWhiteSpace.

Specified by:
isWhiteSpace in interface XMLStreamReader
Returns:
Returns boolean.

isCharacters

public boolean isCharacters()
Method isCharacters.

Specified by:
isCharacters in interface XMLStreamReader
Returns:
Returns boolean.

isEndElement

public boolean isEndElement()
Method isEndElement.

Specified by:
isEndElement in interface XMLStreamReader
Returns:
Returns boolean.

require

public void require(int i,
                    String s,
                    String s1)
             throws XMLStreamException
Specified by:
require in interface XMLStreamReader
Parameters:
i -
s -
s1 -
Throws:
XMLStreamException
See Also:
XMLStreamReader.require(int, String, String)

isStartElement

public boolean isStartElement()
Method isStartElement.

Specified by:
isStartElement in interface XMLStreamReader
Returns:
Returns boolean.

getNamespaceURI

public String getNamespaceURI(String s)
Method getNamespaceURI.

Specified by:
getNamespaceURI in interface XMLStreamReader
Parameters:
s -
Returns:
Returns String.

close

public void close()
           throws XMLStreamException
Method close.

Specified by:
close in interface XMLStreamReader
Throws:
XMLStreamException

hasNext

public boolean hasNext()
                throws XMLStreamException
Method hasNext.

Specified by:
hasNext in interface XMLStreamReader
Returns:
Returns boolean.
Throws:
XMLStreamException

nextTag

public int nextTag()
            throws XMLStreamException
Not implemented yet

Specified by:
nextTag in interface XMLStreamReader
Returns:
Returns int.
Throws:
OMStreamingException
XMLStreamException

getElementText

public String getElementText()
                      throws XMLStreamException
Specified by:
getElementText in interface XMLStreamReader
Returns:
Returns String.
Throws:
XMLStreamException
See Also:
XMLStreamReader.getElementText()

next

public int next()
         throws XMLStreamException
Method next.

Specified by:
next in interface XMLStreamReader
Returns:
Returns int.
Throws:
XMLStreamException

getProperty

public Object getProperty(String s)
                   throws IllegalArgumentException
Method getProperty.

Specified by:
getProperty in interface XMLStreamReader
Parameters:
s -
Returns:
Returns Object.
Throws:
IllegalArgumentException

getNamespaceContext

public NamespaceContext getNamespaceContext()
Method getNamespaceContext.

Specified by:
getNamespaceContext in interface XMLStreamReader
Returns:
Returns NamespaceContext.

getEncoding

public String getEncoding()
Method getEncoding.

Specified by:
getEncoding in interface XMLStreamReader
Returns:
Returns String.

getLocation

public Location getLocation()
Method getLocation.

Specified by:
getLocation in interface XMLStreamReader
Returns:
Returns Location.

getVersion

public String getVersion()
Method getVersion.

Specified by:
getVersion in interface XMLStreamReader
Returns:
Returns String.

isStandalone

public boolean isStandalone()
Method isStandalone.

Specified by:
isStandalone in interface XMLStreamReader
Returns:
Returns boolean.

standaloneSet

public boolean standaloneSet()
Method standaloneSet.

Specified by:
standaloneSet in interface XMLStreamReader
Returns:
Returns boolean.

getCharacterEncodingScheme

public String getCharacterEncodingScheme()
Method getCharacterEncodingScheme.

Specified by:
getCharacterEncodingScheme in interface XMLStreamReader
Returns:
Returns String.

getPITarget

public String getPITarget()
Method getPITarget.

Specified by:
getPITarget in interface XMLStreamReader
Returns:
Returns String.

getPIData

public String getPIData()
Method getPIData.

Specified by:
getPIData in interface XMLStreamReader
Returns:
Returns String.

setParser

public void setParser(XMLStreamReader parser)