Class JSONInputIterator
- java.lang.Object
-
- org.apache.jena.sparql.util.PrintSerializableBase
-
- org.apache.jena.sparql.engine.iterator.QueryIteratorBase
-
- org.apache.jena.riot.resultset.rw.JSONInputIterator
-
- All Implemented Interfaces:
java.util.Iterator<Binding>
,org.apache.jena.atlas.io.Printable
,org.apache.jena.atlas.lib.Closeable
,QueryIterator
,PrintSerializable
public class JSONInputIterator extends QueryIteratorBase
Streaming Iterator over SPARQL JSON results, not yet fully implemented (see JENA-267)Creating the Iterator automatically causes it to parse a small chunk of the stream to determine the variables in the result set either by reading the header or reading some portion of the results if the results appear before the header since JSON does not guarantee the order of keys within an object
-
-
Field Summary
-
Fields inherited from class org.apache.jena.sparql.engine.iterator.QueryIteratorBase
traceIterators
-
-
Constructor Summary
Constructors Constructor Description JSONInputIterator(java.io.InputStream input)
Creates a SPARQL JSON Iterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<java.lang.String>
getVars()
Returns the variables present in the result setsboolean
isBooleanResult()
Gets whether the SPARQL JSON represents a boolean result setvoid
output(org.apache.jena.atlas.io.IndentedWriter out, SerializationContext sCxt)
-
Methods inherited from class org.apache.jena.sparql.engine.iterator.QueryIteratorBase
cancel, close, debug, hasNext, next, nextBinding, remove
-
Methods inherited from class org.apache.jena.sparql.util.PrintSerializableBase
output, toString, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.jena.sparql.util.PrintSerializable
toString
-
Methods inherited from interface org.apache.jena.sparql.engine.QueryIterator
isJoinIdentity
-
-
-
-
Method Detail
-
getVars
public java.util.Iterator<java.lang.String> getVars()
Returns the variables present in the result sets
-
isBooleanResult
public boolean isBooleanResult()
Gets whether the SPARQL JSON represents a boolean result set
-
output
public void output(org.apache.jena.atlas.io.IndentedWriter out, SerializationContext sCxt)
-
-