java.lang.Object
org.apache.jena.atlas.iterator.IteratorSlotted<E>
org.apache.jena.riot.rowset.rw.rs_json.IteratorRsJSON<E>
- Type Parameters:
E
- The type of elements to yield by this iterator
- All Implemented Interfaces:
Iterator<E>
,org.apache.jena.atlas.iterator.IteratorCloseable<E>
,org.apache.jena.atlas.lib.Closeable
public class IteratorRsJSON<E>
extends org.apache.jena.atlas.iterator.IteratorSlotted<E>
An iterator that reads sparql result set domain elements from a
underlying gson JsonReader.
This iterator is 'dumb': it neither validates nor keeps statistics.
For this purpose the iterator delegates to
RsJsonEltEncoder
which
is responsible for creating instances of type E from the state of the
json stream.-
Constructor Summary
ConstructorsConstructorDescriptionIteratorRsJSON
(com.google.gson.Gson gson, com.google.gson.stream.JsonReader jsonReader, org.apache.jena.riot.rowset.rw.rs_json.RsJsonEltEncoder<E> eltEncoder) IteratorRsJSON
(com.google.gson.Gson gson, com.google.gson.stream.JsonReader jsonReader, org.apache.jena.riot.rowset.rw.rs_json.RsJsonEltEncoder<E> eltEncoder, org.apache.jena.riot.rowset.rw.rs_json.ParserState parserState) Constructor that allows setting the initial parser state such as when starting to parse in a hadoop input split. -
Method Summary
Methods inherited from class org.apache.jena.atlas.iterator.IteratorSlotted
close, hasNext, next, peek, peek
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
IteratorRsJSON
public IteratorRsJSON(com.google.gson.Gson gson, com.google.gson.stream.JsonReader jsonReader, org.apache.jena.riot.rowset.rw.rs_json.RsJsonEltEncoder<E> eltEncoder) -
IteratorRsJSON
public IteratorRsJSON(com.google.gson.Gson gson, com.google.gson.stream.JsonReader jsonReader, org.apache.jena.riot.rowset.rw.rs_json.RsJsonEltEncoder<E> eltEncoder, org.apache.jena.riot.rowset.rw.rs_json.ParserState parserState) Constructor that allows setting the initial parser state such as when starting to parse in a hadoop input split.
-
-
Method Details
-
closeIterator
public void closeIterator()
-