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) intintintlongReturn the row number.intbooleanMethods inherited from class org.apache.jena.atlas.iterator.IteratorSlotted
close, hasNext, next, peek, peekMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods 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:RowSetReturn the row number. The first row is row 1.- Specified by:
getRowNumberin interfaceRowSet
-
getResultVars
- Specified by:
getResultVarsin interfaceRowSet
-
hasAskResult
public boolean hasAskResult() -
getAskResult
-
getKHeadCount
public int getKHeadCount() -
getKBooleanCount
public int getKBooleanCount() -
getKResultsCount
public int getKResultsCount() -
getUnknownJsonCount
public int getUnknownJsonCount()
-