com.hp.hpl.jena.sparql.resultset
Class JSONInputIterator
java.lang.Object
com.hp.hpl.jena.sparql.util.PrintSerializableBase
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase
com.hp.hpl.jena.sparql.resultset.JSONInputIterator
- All Implemented Interfaces:
- QueryIterator, PrintSerializable, Iterator<Binding>, Printable, Closeable
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
JSONInputIterator
public JSONInputIterator(InputStream input)
- Creates a SPARQL JSON Iterator
Automatically parses some portion of the input to determine the variables in use
getVars
public Iterator<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(IndentedWriter out,
SerializationContext sCxt)
Licenced under the Apache License, Version 2.0