Module org.apache.jena.arq
Class RowSetJSONStreaming<E>
java.lang.Object
org.apache.jena.atlas.iterator.IteratorSlotted<Binding>
org.apache.jena.riot.rowset.rw.rs_json.RowSetJSONStreaming<E>
- All Implemented Interfaces:
Iterator<Binding>
,org.apache.jena.atlas.iterator.IteratorCloseable<Binding>
,org.apache.jena.atlas.lib.Closeable
,RowSet
public class RowSetJSONStreaming<E>
extends org.apache.jena.atlas.iterator.IteratorSlotted<Binding>
implements RowSet
Streaming RowSet implementation for application/sparql-results+json
The
getResultVars()
will return null as long as the header has not
been consumed from the underlying stream.
Use RowSetBuffered
to modify the behavior such that getResultVars()
immediately consumes the underlying stream until the header is read,
thereby buffering any encountered bindings for replay.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.sparql.exec.RowSet
RowSet.Exception
-
Method Summary
Modifier and TypeMethodDescriptionstatic RowSetBuffered<RowSetJSONStreaming<?>>
createBuffered
(InputStream in, LabelToNode labelMap, Supplier<DataBag<Binding>> bufferFactory, ValidationSettings validationSettings, ErrorHandler errorHandler) static RowSetJSONStreaming<?>
createUnbuffered
(InputStream in, LabelToNode labelMap, ValidationSettings validationSettings, ErrorHandler errorHandler) int
int
int
long
Return the row number.int
boolean
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
Methods inherited from interface org.apache.jena.sparql.exec.RowSet
close, forEach, hasNext, materialize, next, rewindable, stream
-
Method Details
-
createBuffered
public static RowSetBuffered<RowSetJSONStreaming<?>> createBuffered(InputStream in, LabelToNode labelMap, Supplier<DataBag<Binding>> bufferFactory, ValidationSettings validationSettings, ErrorHandler errorHandler) -
createUnbuffered
public static RowSetJSONStreaming<?> createUnbuffered(InputStream in, LabelToNode labelMap, ValidationSettings validationSettings, ErrorHandler errorHandler) -
getRowNumber
public long getRowNumber()Description copied from interface:RowSet
Return the row number. The first row is row 1.- Specified by:
getRowNumber
in interfaceRowSet
-
getResultVars
- Specified by:
getResultVars
in interfaceRowSet
-
hasAskResult
public boolean hasAskResult() -
getAskResult
-
getKHeadCount
public int getKHeadCount() -
getKBooleanCount
public int getKBooleanCount() -
getKResultsCount
public int getKResultsCount() -
getUnknownJsonCount
public int getUnknownJsonCount()
-