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

    query

    Fields 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    If possible, cast the query to a SPARQL-Generate Query.
    protected org.apache.jena.graph.Node
    createLiteral(String lexicalForm, String langTag, String datatypeURI)
    Creates a literal; used by rule RDFLiteral of the grammar.
    protected final SPARQLExtQuery
    endSubQueryExt(int line, int column)
    Finishes the parsing of a sub GENERATE query.
    protected org.apache.jena.query.Query
    newSubQuery(org.apache.jena.sparql.core.Prologue progloue)
     
    protected final void
    Constructor.
    protected final void
    Starts parsing a sub GENERATE query.
    protected void
    startSubSelect(int line, int col)
    Starts parsing a sub SELECT query.
    final String
    stripQuotes(String string, int i, int j)
    Remove first i and last j characters (e.g. ''' or "{") from a string
    static String
    unescapeStr(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, startWherePattern

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static String unescapeStr(String s, int line, int column)
      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:
      startQuery in class org.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:
      startSubSelect in class org.apache.jena.sparql.lang.SPARQLParserBase
    • newSubQuery

      protected org.apache.jena.query.Query newSubQuery(org.apache.jena.sparql.core.Prologue progloue)
      Overrides:
      newSubQuery in class org.apache.jena.sparql.lang.SPARQLParserBase
    • endSubQueryExt

      protected final SPARQLExtQuery endSubQueryExt(int line, int column)
      Finishes the parsing of a sub GENERATE query.
      Parameters:
      line - -
      column - -
      Returns:
      the sub-generate query.
    • asSPARQLExtQuery

      public final SPARQLExtQuery asSPARQLExtQuery()
      If possible, cast the query to a SPARQL-Generate Query. Else, returns null.
      Returns:
      -
    • stripQuotes

      public final String stripQuotes(String string, int i, int j)
      Remove first i and last j characters (e.g. ''' or "{") from a string
      Parameters:
      string -
      Returns: