Class E_IRITemplate

java.lang.Object
org.apache.jena.sparql.expr.ExprNode
org.apache.jena.sparql.expr.ExprFunction
org.apache.jena.sparql.expr.ExprFunction1
org.apache.jena.sparql.expr.E_IRI
fr.mines_stetienne.ci.sparql_generate.expr.E_IRITemplate
All Implemented Interfaces:
org.apache.jena.sparql.expr.Expr

public class E_IRITemplate extends org.apache.jena.sparql.expr.E_IRI
The IRI of an IRI template, such as <stop/{?id}>: IRI(CONCAT(c0, ENCODE_FOR_URI(STR(?id)), ...)), with the same value as E_IRI. Jena parses and resolves the whole IRI for each solution; this expression resolves the constant first part c0 once, and appends the rest when it can only extend the path of that IRI: characters of a path segment (unreserved, percent-encoded) and slashes, and no dot segment; or, after a first part that ends in the query or the fragment, the same characters. Otherwise it evaluates as E_IRI. It is written as IRI(...).
  • Field Summary

    Fields inherited from class org.apache.jena.sparql.expr.E_IRI

    parserBase, relExpr

    Fields inherited from class org.apache.jena.sparql.expr.ExprFunction1

    expr

    Fields inherited from class org.apache.jena.sparql.expr.ExprFunction

    funcSymbol, opSign

    Fields inherited from interface org.apache.jena.sparql.expr.Expr

    CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL, NONE
  • Constructor Summary

    Constructors
    Constructor
    Description
    E_IRITemplate(String parserBase, org.apache.jena.sparql.expr.E_StrConcat concat)
     
    E_IRITemplate(String parserBase, org.apache.jena.sparql.expr.Expr expr)
    IRI(expr) for any expression: only the check of plain absolute IRIs applies (see isPlainAbsolute(String)).
    E_IRITemplate(org.apache.jena.sparql.expr.E_StrConcat concat)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.jena.sparql.expr.Expr
    copy(org.apache.jena.sparql.expr.Expr expr)
     
    org.apache.jena.sparql.expr.NodeValue
    eval(org.apache.jena.sparql.expr.NodeValue v, org.apache.jena.sparql.function.FunctionEnv env)
     
    protected org.apache.jena.sparql.expr.NodeValue
    evalSpecial(org.apache.jena.sparql.engine.binding.Binding binding, org.apache.jena.sparql.function.FunctionEnv env)
     
    static void
    optimize(org.apache.jena.query.Query query)
    Replaces IRI(CONCAT(...)) by an E_IRITemplate in the BIND clauses of a group (and of the groups it contains) and in the projected expressions of a query: they are lost when the query is copied by serializing it.
    static org.apache.jena.sparql.expr.Expr
    optimize(org.apache.jena.sparql.expr.Expr expr)
    Replaces IRI(...) by an E_IRITemplate in an expression.

    Methods inherited from class org.apache.jena.sparql.expr.E_IRI

    equals, eval, getFunctionPrintName, getParserBase, getRelExpr, hashCode

    Methods inherited from class org.apache.jena.sparql.expr.ExprFunction1

    apply, applyNodeTransform, copySubstitute, eval, getArg, getArg, numArgs, visit

    Methods inherited from class org.apache.jena.sparql.expr.ExprFunction

    getArgs, getFunction, getFunctionIRI, getFunctionName, getFunctionSymbol, getOpName, isFunction

    Methods inherited from class org.apache.jena.sparql.expr.ExprNode

    asVar, deepCopy, equals, equalsBySyntax, eval, getConstant, getExpr, getExprVar, getGraphPattern, getVarName, getVarsMentioned, isConstant, isExpr, isGraphPattern, isSatisfied, isVariable, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • E_IRITemplate

      public E_IRITemplate(org.apache.jena.sparql.expr.E_StrConcat concat)
    • E_IRITemplate

      public E_IRITemplate(String parserBase, org.apache.jena.sparql.expr.E_StrConcat concat)
    • E_IRITemplate

      public E_IRITemplate(String parserBase, org.apache.jena.sparql.expr.Expr expr)
      IRI(expr) for any expression: only the check of plain absolute IRIs applies (see isPlainAbsolute(String)).
  • Method Details

    • optimize

      public static void optimize(org.apache.jena.query.Query query)
      Replaces IRI(CONCAT(...)) by an E_IRITemplate in the BIND clauses of a group (and of the groups it contains) and in the projected expressions of a query: they are lost when the query is copied by serializing it. The other elements are left as they are.
      Parameters:
      query - the query, changed in place.
    • optimize

      public static org.apache.jena.sparql.expr.Expr optimize(org.apache.jena.sparql.expr.Expr expr)
      Replaces IRI(...) by an E_IRITemplate in an expression.
    • evalSpecial

      protected org.apache.jena.sparql.expr.NodeValue evalSpecial(org.apache.jena.sparql.engine.binding.Binding binding, org.apache.jena.sparql.function.FunctionEnv env)
      Overrides:
      evalSpecial in class org.apache.jena.sparql.expr.E_IRI
    • eval

      public org.apache.jena.sparql.expr.NodeValue eval(org.apache.jena.sparql.expr.NodeValue v, org.apache.jena.sparql.function.FunctionEnv env)
      Overrides:
      eval in class org.apache.jena.sparql.expr.E_IRI
    • copy

      public org.apache.jena.sparql.expr.Expr copy(org.apache.jena.sparql.expr.Expr expr)
      Overrides:
      copy in class org.apache.jena.sparql.expr.E_IRI