org.codehaus.xfire.util.stax
Class DOMStreamReader

java.lang.Object
  extended by org.codehaus.xfire.util.stax.DOMStreamReader
Direct Known Subclasses:
JDOMStreamReader, W3CDOMStreamReader

public abstract class DOMStreamReader
extends java.lang.Object

Abstract logic for creating XMLStreamReader from DOM documents. Its works using adapters for Element, Node and Attribute ( @see ElementAdapter }

Author:
Tomasz Sztelak

Nested Class Summary
static class DOMStreamReader.ElementFrame
           
 
Field Summary
 java.util.Map properties
           
 
Constructor Summary
DOMStreamReader(DOMStreamReader.ElementFrame frame)
           
 
Method Summary
 void close()
           
protected  void endElement()
           
 java.lang.String getCharacterEncodingScheme()
           
protected abstract  int getChildCount()
           
protected abstract  DOMStreamReader.ElementFrame getChildFrame(int currentChild)
           
protected  DOMStreamReader.ElementFrame getCurrentFrame()
           
abstract  java.lang.String getElementText()
           
 int getEventType()
           
 Location getLocation()
           
abstract  java.lang.String getNamespaceURI(java.lang.String prefix)
           
 java.lang.Object getProperty(java.lang.String key)
           
 int getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
           
 java.lang.String getVersion()
           
 boolean hasName()
           
 boolean hasNext()
           
 boolean hasText()
           
 boolean isCharacters()
           
 boolean isEndElement()
           
 boolean isStandalone()
           
 boolean isStartElement()
           
 boolean isWhiteSpace()
           
protected abstract  int moveToChild(int currentChild)
           
protected  void newFrame(DOMStreamReader.ElementFrame newFrame)
           
 int next()
           
 int nextTag()
           
 void require(int arg0, java.lang.String arg1, java.lang.String arg2)
           
 boolean standaloneSet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

public java.util.Map properties
Constructor Detail

DOMStreamReader

public DOMStreamReader(DOMStreamReader.ElementFrame frame)
Parameters:
element -
Method Detail

getCurrentFrame

protected DOMStreamReader.ElementFrame getCurrentFrame()

getProperty

public java.lang.Object getProperty(java.lang.String key)
                             throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

next

public int next()
         throws XMLStreamException
Throws:
XMLStreamException

newFrame

protected void newFrame(DOMStreamReader.ElementFrame newFrame)

endElement

protected void endElement()

moveToChild

protected abstract int moveToChild(int currentChild)

getChildFrame

protected abstract DOMStreamReader.ElementFrame getChildFrame(int currentChild)

getChildCount

protected abstract int getChildCount()

require

public void require(int arg0,
                    java.lang.String arg1,
                    java.lang.String arg2)
             throws XMLStreamException
Throws:
XMLStreamException

getElementText

public abstract java.lang.String getElementText()
                                         throws XMLStreamException
Throws:
XMLStreamException

nextTag

public int nextTag()
            throws XMLStreamException
Throws:
XMLStreamException

hasNext

public boolean hasNext()
                throws XMLStreamException
Throws:
XMLStreamException

close

public void close()
           throws XMLStreamException
Throws:
XMLStreamException

getNamespaceURI

public abstract java.lang.String getNamespaceURI(java.lang.String prefix)

isStartElement

public boolean isStartElement()

isEndElement

public boolean isEndElement()

isCharacters

public boolean isCharacters()

isWhiteSpace

public boolean isWhiteSpace()

getEventType

public int getEventType()

getTextCharacters

public int getTextCharacters(int sourceStart,
                             char[] target,
                             int targetStart,
                             int length)
                      throws XMLStreamException
Throws:
XMLStreamException

hasText

public boolean hasText()

getLocation

public Location getLocation()

hasName

public boolean hasName()

getVersion

public java.lang.String getVersion()

isStandalone

public boolean isStandalone()

standaloneSet

public boolean standaloneSet()

getCharacterEncodingScheme

public java.lang.String getCharacterEncodingScheme()


Copyright © 2004-2006 Envoi Solutions LLC. All Rights Reserved.