com.epam.xml.reader
Class AbstractDocumentReader

java.lang.Object
  extended by com.epam.xml.reader.AbstractDocumentReader
All Implemented Interfaces:
DocumentReader
Direct Known Subclasses:
DOMReader

public abstract class AbstractDocumentReader
extends Object
implements DocumentReader


Field Summary
protected  Element current
           
 
Constructor Summary
protected AbstractDocumentReader(Element root)
           
 
Method Summary
 void close()
          Close the reader, if necessary.
protected abstract  Element getChild(Integer pointer)
           
protected abstract  Integer getChildCount()
           
protected abstract  Element getParent()
           
 boolean hasMoreChildren()
          Does the node have any more children remaining that have not yet been read?
 boolean isEndOfDocument()
          Checks of end of xml document.
 void moveDown()
          Select the current child as current node.
 void moveUp()
          Select the parent node as current node.
protected abstract  void reassignCurrentElement(Element current)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.epam.xml.reader.DocumentReader
addUnmarshalerListener, execute, getAttribute, getAttribute, getAttributeCount, getAttributeName, getNodeName, getValue
 

Field Detail

current

protected Element current
Constructor Detail

AbstractDocumentReader

protected AbstractDocumentReader(Element root)
Method Detail

close

public void close()
Description copied from interface: DocumentReader
Close the reader, if necessary.

Specified by:
close in interface DocumentReader

hasMoreChildren

public boolean hasMoreChildren()
Description copied from interface: DocumentReader
Does the node have any more children remaining that have not yet been read?

Specified by:
hasMoreChildren in interface DocumentReader
Returns:
True if element has the children nodes.

isEndOfDocument

public boolean isEndOfDocument()
Description copied from interface: DocumentReader
Checks of end of xml document.

Specified by:
isEndOfDocument in interface DocumentReader
Returns:
True if end of document.

moveDown

public void moveDown()
Description copied from interface: DocumentReader
Select the current child as current node. A call to this function must be balanced with a call to DocumentReader.moveUp().

Specified by:
moveDown in interface DocumentReader

moveUp

public void moveUp()
Description copied from interface: DocumentReader
Select the parent node as current node.

Specified by:
moveUp in interface DocumentReader

getChildCount

protected abstract Integer getChildCount()

getParent

protected abstract Element getParent()

getChild

protected abstract Element getChild(Integer pointer)

reassignCurrentElement

protected abstract void reassignCurrentElement(Element current)


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.