Class SPARQLExtParserBase
java.lang.Object
org.apache.jena.sparql.lang.QueryParserBase
org.apache.jena.sparql.lang.SPARQLParserBase
fr.mines_stetienne.ci.sparql_generate.lang.SPARQLExtParserBase
- Direct Known Subclasses:
SPARQLExtParser
public class SPARQLExtParserBase
extends org.apache.jena.sparql.lang.SPARQLParserBase
Class that extends the ARQ SPARQL Parser class with the operations for SPARQL
Generate.
-
Field Summary
Fields inherited from class org.apache.jena.sparql.lang.SPARQLParserBase
queryFields inherited from class org.apache.jena.sparql.lang.QueryParserBase
activeLabelMap, nRDFfirst, nRDFnil, nRDFobject, nRDFpredicate, nRDFreifies, nRDFrest, nRDFsubject, nRDFtype, parserLog, ParserLoggerName, previousLabels, prologue, XSD_FALSE, XSD_TRUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal SPARQLExtQueryIf possible, cast the query to a SPARQL-Generate Query.protected org.apache.jena.graph.NodecreateLiteral(String lexicalForm, String langTag, String datatypeURI) Creates a literal; used by rule RDFLiteral of the grammar.protected final SPARQLExtQueryendSubQueryExt(int line, int column) Finishes the parsing of a sub GENERATE query.protected org.apache.jena.query.QuerynewSubQuery(org.apache.jena.sparql.core.Prologue progloue) protected final voidConstructor.protected final voidStarts parsing a sub GENERATE query.protected voidstartSubSelect(int line, int col) Starts parsing a sub SELECT query.final StringstripQuotes(String string, int i, int j) Remove first i and last j characters (e.g. ''' or "{") from a stringstatic StringunescapeStr(String s, int line, int column) Unescapes a string literal: \{ and \} are braces, the other escapes are those of SPARQL.Methods inherited from class org.apache.jena.sparql.lang.SPARQLParserBase
createDeleteDataSink, createInsertDataSink, emitDataBlockValue, emitDataBlockVariable, emitUpdate, endSubSelect, finishDataBlockValueRow, finishDataDelete, finishDataInsert, finishDeleteTemplate, finishInlineData, finishInsertTemplate, finishModifyUpdate, finishQuery, finishUpdateOperation, finishUpdateRequest, finishValuesClause, finishWherePattern, getQuery, popQuery, pushQuery, setQuery, setUpdate, startDataBlockValueRow, startDataDelete, startDataInsert, startDeleteTemplate, startInlineData, startInsertTemplate, startModifyUpdate, startUpdateOperation, startUpdateRequest, startValuesClause, startWherePatternMethods inherited from class org.apache.jena.sparql.lang.QueryParserBase
asExpr, checkConcrete, checkRDFString, clearReifierId, compressGroupOfOneGroup, createBNode, createBNode, createExprExists, createExprNotExists, createListNode, createLiteralDecimal, createLiteralDouble, createLiteralDT, createLiteralInteger, createLiteralLang, createLiteralString, createNode, createTripleTerm, createVariable, declareVersion, doubleValue, endBasicGraphPattern, endGroup, endTriplesBlock, finishAggregate, fixupPrefix, getAggregateDepth, getAllowAggregatesInExpressions, getBNodesAreAllowed, getBNodesAreVariables, getOrAllocReifierId, getPrologue, insert, insert, insert, insert, insert, insertTripleReifier, integerValue, isBNodeIRI, makeFunction_BNode, makeFunction_BNode, makeFunction_IRI, makeFunction_IRI, makeFunction_URI, makeFunction_URI, preConditionReifier, resolveIRI, resolvePName, resolveQuotedIRI, setAccGraph, setAllowAggregatesInExpressions, setBase, setBNodesAreAllowed, setBNodesAreVariables, setInConstructTemplate, setPrefix, setPrologue, setReifierId, startAggregate, startBasicGraphPattern, startGroup, startTriplesBlock, stripChars, stripQuotes, stripQuotes3, stripSign, throwParseException, throwParseException, unescape, unescapePName, unescapeUnicode, warnDeprecation
-
Constructor Details
-
SPARQLExtParserBase
public SPARQLExtParserBase()
-
-
Method Details
-
createLiteral
protected org.apache.jena.graph.Node createLiteral(String lexicalForm, String langTag, String datatypeURI) Creates a literal; used by rule RDFLiteral of the grammar. Jena 5 moved this method to a package-private class. -
unescapeStr
Unescapes a string literal: \{ and \} are braces, the other escapes are those of SPARQL. The string is read once from left to right, so that in "a\\}b" the escape is \\ and not \}. -
startQuery
protected final void startQuery()Constructor.- Overrides:
startQueryin classorg.apache.jena.sparql.lang.SPARQLParserBase
-
startSubQueryExt
protected final void startSubQueryExt()Starts parsing a sub GENERATE query. -
startSubSelect
protected void startSubSelect(int line, int col) Starts parsing a sub SELECT query.- Overrides:
startSubSelectin classorg.apache.jena.sparql.lang.SPARQLParserBase
-
newSubQuery
protected org.apache.jena.query.Query newSubQuery(org.apache.jena.sparql.core.Prologue progloue) - Overrides:
newSubQueryin classorg.apache.jena.sparql.lang.SPARQLParserBase
-
endSubQueryExt
Finishes the parsing of a sub GENERATE query.- Parameters:
line- -column- -- Returns:
- the sub-generate query.
-
asSPARQLExtQuery
If possible, cast the query to a SPARQL-Generate Query. Else, returns null.- Returns:
- -
-
stripQuotes
Remove first i and last j characters (e.g. ''' or "{") from a string- Parameters:
string-- Returns:
-