java.lang.Object
fr.mines_stetienne.ci.sparql_generate.function.library.ST_Format
All Implemented Interfaces:
org.apache.jena.sparql.function.Function

public class ST_Format extends Object implements org.apache.jena.sparql.function.Function
Function st:format formats its arguments, as in STTL.
  • Param 1: the format, a string, or the IRI of a document that contains the format;
  • Params 2 .. N: the values, each written as its unquoted string where the format has %s, as with String.format(String, Object...).
FORMAT { "format" expr1 ... } in a TEMPLATE query is compiled to a call to st:format. An argument that cannot be evaluated is skipped; with the option debugTemplate, an error message is given in its place.
Author:
Maxime Lefrançois
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    build(String uri, org.apache.jena.sparql.expr.ExprList args, org.apache.jena.sparql.util.Context context)
     
    org.apache.jena.sparql.expr.NodeValue
    exec(List<org.apache.jena.sparql.expr.NodeValue> args, org.apache.jena.sparql.function.FunctionEnv env)
     
    org.apache.jena.sparql.expr.NodeValue
    exec(org.apache.jena.sparql.engine.binding.Binding binding, org.apache.jena.sparql.expr.ExprList args, String uri, org.apache.jena.sparql.function.FunctionEnv env)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • URI

      public static String URI
  • Constructor Details

    • ST_Format

      public ST_Format()
  • Method Details

    • build

      public final void build(String uri, org.apache.jena.sparql.expr.ExprList args, org.apache.jena.sparql.util.Context context)
      Specified by:
      build in interface org.apache.jena.sparql.function.Function
    • exec

      public org.apache.jena.sparql.expr.NodeValue exec(org.apache.jena.sparql.engine.binding.Binding binding, org.apache.jena.sparql.expr.ExprList args, String uri, org.apache.jena.sparql.function.FunctionEnv env)
      Specified by:
      exec in interface org.apache.jena.sparql.function.Function
    • exec

      public org.apache.jena.sparql.expr.NodeValue exec(List<org.apache.jena.sparql.expr.NodeValue> args, org.apache.jena.sparql.function.FunctionEnv env)