uk.ac.man.documentparser.input
Class PMC2

java.lang.Object
  extended by uk.ac.man.documentparser.input.PMC2
All Implemented Interfaces:
java.lang.Iterable<Document>, java.util.Iterator<Document>, DocumentIterator

public class PMC2
extends java.lang.Object
implements DocumentIterator


Field Summary
private  org.w3c.dom.Document doc
           
private  java.lang.String id
           
private  java.lang.String xml
           
 
Constructor Summary
PMC2(java.io.File xmlLocation, java.lang.String[] dtdLocations)
           
PMC2(java.lang.StringBuffer data, java.lang.String[] dtdLocation)
           
 
Method Summary
private  java.lang.String filter(java.lang.String str)
           
private  Section[] getSection(org.w3c.dom.NodeList mainElement)
           
 boolean hasNext()
           
 java.util.Iterator<Document> iterator()
           
private  void load(java.lang.StringBuffer data, java.lang.String[] dtdLocation)
           
private  java.lang.String loadFile(java.io.File f)
           
 Document next()
           
 void remove()
           
private  void removeSections(Section[] sections, java.lang.String keyword)
           
 void skip()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doc

private org.w3c.dom.Document doc

xml

private java.lang.String xml

id

private java.lang.String id
Constructor Detail

PMC2

public PMC2(java.io.File xmlLocation,
            java.lang.String[] dtdLocations)

PMC2

public PMC2(java.lang.StringBuffer data,
            java.lang.String[] dtdLocation)
Method Detail

load

private void load(java.lang.StringBuffer data,
                  java.lang.String[] dtdLocation)

filter

private java.lang.String filter(java.lang.String str)

iterator

public java.util.Iterator<Document> iterator()
Specified by:
iterator in interface java.lang.Iterable<Document>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<Document>

getSection

private Section[] getSection(org.w3c.dom.NodeList mainElement)

loadFile

private java.lang.String loadFile(java.io.File f)

next

public Document next()
Specified by:
next in interface java.util.Iterator<Document>

removeSections

private void removeSections(Section[] sections,
                            java.lang.String keyword)

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<Document>

skip

public void skip()
Specified by:
skip in interface DocumentIterator