Package edu.suffolk.litlab.efsp.ecfcodes
Class CodeDocIterator
java.lang.Object
edu.suffolk.litlab.efsp.ecfcodes.CodeDocIterator
A class that iterates over Genericode XML files using constant memory.
Call CodeDocIterator.setup() to create the class, and then just treat it like any
normal iterator.
See the Genericode spec for more information about the XML structure this class expects, and the XmlEventReader docs for more information about how we navigate XML.
The default XmlReaderStream would load in the entire XML file at once, and some of the files that we read in can be rather large, around 800MB (2.5GB when read in memory).
-
Method Summary
Modifier and TypeMethodDescriptionGets the version of the CodeDoc, i.e.booleanhasNext()next()Returns a row of the genericode object, as a map from the Column Id to its value.static CodeDocIteratorsetup(InputStream input) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Method Details
-
setup
- Throws:
CodeDocException
-
getVersion
Gets the version of the CodeDoc, i.e. <Identification><Version>84D2F1B7...^lt;/Version> -
hasNext
public boolean hasNext() -
next
Returns a row of the genericode object, as a map from the Column Id to its value.
-