Class ITER_JSONSurfer

java.lang.Object
fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
fr.mines_stetienne.ci.sparql_generate.json.ITER_JSONSurfer
All Implemented Interfaces:
fr.mines_stetienne.ci.sparql_generate.iterator.IteratorFunction

public class ITER_JSONSurfer extends fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
Iterator function iter:JSONSurfer extracts a list of sub-JSON documents of a JSON document, according to a forward-only JSONPath expression. See https://github.com/jsurfer/JsonSurfer for the JSONPath syntax specification.

See Live example

The list of parameters is interpreted as follows:

  • Param 1: (json): the URI of the JSON document (a URI), or the JSON document itself (a String)
  • Param 2: the JSONPath query
  • Param 3: (integer: batch) Optional number of rows per batch (by default, all the JSON document is processed as one batch);
  • Param 4 .. N : (auxJsonPath ... ) other JSONPath queries, which will be executed over the results of the execution of jsonPath, and provide one result each.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkBuild​(org.apache.jena.sparql.expr.ExprList args)
     
    void
    exec​(List<org.apache.jena.sparql.expr.NodeValue> args, Consumer<List<List<org.apache.jena.sparql.expr.NodeValue>>> collectionListNodeValue)
     

    Methods inherited from class fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase

    build, exec, getContext

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • ITER_JSONSurfer

      public ITER_JSONSurfer()
  • Method Details

    • checkBuild

      public void checkBuild(org.apache.jena.sparql.expr.ExprList args)
      Specified by:
      checkBuild in class fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
    • exec

      public void exec(List<org.apache.jena.sparql.expr.NodeValue> args, Consumer<List<List<org.apache.jena.sparql.expr.NodeValue>>> collectionListNodeValue)
      Specified by:
      exec in class fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase