de.hpi.fgis.dude.datasource
Class JSONSource.JSONSourceIterator

java.lang.Object
  extended by de.hpi.fgis.dude.util.AbstractIterator<DuDeObject>
      extended by de.hpi.fgis.dude.datasource.AbstractDataSource.AbstractDataSourceIterator<JSONSource>
          extended by de.hpi.fgis.dude.datasource.JSONSource.JSONSourceIterator
All Implemented Interfaces:
Iterator<DuDeObject>
Enclosing class:
JSONSource

protected class JSONSource.JSONSourceIterator
extends AbstractDataSource.AbstractDataSourceIterator<JSONSource>

JSONSourceIterator is used for generating DuDeObjects out of JSONSources.

Author:
Matthias Pohl

Field Summary
 
Fields inherited from class de.hpi.fgis.dude.datasource.AbstractDataSource.AbstractDataSourceIterator
dataSource
 
Constructor Summary
protected JSONSource.JSONSourceIterator(JSONSource source)
          Initializes a JSONSourceIterator using the passed JSONSource.
 
Method Summary
protected  JsonRecord loadNextRecord()
          Returns the data of the next object.
 
Methods inherited from class de.hpi.fgis.dude.datasource.AbstractDataSource.AbstractDataSourceIterator
addAttributeValue, loadNextElement, setAttributeValue
 
Methods inherited from class de.hpi.fgis.dude.util.AbstractIterator
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONSource.JSONSourceIterator

protected JSONSource.JSONSourceIterator(JSONSource source)
                                 throws org.codehaus.jackson.JsonParseException,
                                        IOException
Initializes a JSONSourceIterator using the passed JSONSource.

Parameters:
source - The source of which the data shall be extracted.
Throws:
org.codehaus.jackson.JsonParseException - If the underlying Json syntax is not valid.
IOException - If an IO error occurred while the iterator was initialized.
Method Detail

loadNextRecord

protected JsonRecord loadNextRecord()
                             throws ExtractionFailedException
Description copied from class: AbstractDataSource.AbstractDataSourceIterator
Returns the data of the next object. This method will be called within AbstractDataSource.AbstractDataSourceIterator.loadNextElement().

Specified by:
loadNextRecord in class AbstractDataSource.AbstractDataSourceIterator<JSONSource>
Returns:
The data record of the next object.
Throws:
ExtractionFailedException - If an error occurs while extracting the data.


Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.