Package org.aksw.jenax.stmt.util
Class SparqlStmtIterator
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<SparqlStmt>
org.aksw.jenax.stmt.util.SparqlStmtIterator
- All Implemented Interfaces:
Iterator<SparqlStmt>
An iterator over a string that holds a sequence of SPARQL queries; uses positions reported by parse exceptions
to find the boundaries of queries.
The provided parser must operate in classifier mode - i.e. it must not throw QueryParseExceptions but report them
via
SparqlStmt.getParseException().
TODO Ideally, an extension to the jena sparql grammar should allow parsing such sequences of queries.- Author:
- raven Mar 21, 2018
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSparqlStmtIterator(Function<String, SparqlStmt> parser, String str) SparqlStmtIterator(Function<String, SparqlStmt> parser, String str, int line, int column) -
Method Summary
Modifier and TypeMethodDescriptionprotected SparqlStmtintintgetLine()static booleanisEmptyString(String str) Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peekMethods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
parser
-
str
-
line
protected int line -
column
protected int column
-
-
Constructor Details
-
SparqlStmtIterator
-
SparqlStmtIterator
-
-
Method Details
-
getLine
public int getLine() -
getColumn
public int getColumn() -
isEmptyString
-
computeNext
- Specified by:
computeNextin classcom.google.common.collect.AbstractIterator<SparqlStmt>
-