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:
IteratorFunction
public class ITER_JSONSurfer extends 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.
- Author:
- Maxime Lefrançois, Omar Qawasmeh
-
-
Field Summary
Fields Modifier and Type Field Description static String
URI
-
Fields inherited from class fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
arguments
-
-
Constructor Summary
Constructors Constructor Description ITER_JSONSurfer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkBuild(ExprList args)
Partially checks if the iterator function can be executed with the given arguments.void
exec(List<NodeValue> args, Consumer<List<List<NodeValue>>> collectionListNodeValue)
IteratorFunction call to a list of evaluated argument values.-
Methods inherited from class fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
build, exec, getContext
-
-
-
-
Field Detail
-
URI
public static final String URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkBuild
public void checkBuild(ExprList args)
Description copied from class:IteratorStreamFunctionBase
Partially checks if the iterator function can be executed with the given arguments.- Specified by:
checkBuild
in classIteratorStreamFunctionBase
- Parameters:
args
- -
-
exec
public void exec(List<NodeValue> args, Consumer<List<List<NodeValue>>> collectionListNodeValue)
Description copied from class:IteratorStreamFunctionBase
IteratorFunction call to a list of evaluated argument values.- Specified by:
exec
in classIteratorStreamFunctionBase
- Parameters:
args
- -collectionListNodeValue
- - where to emit collections of nodevalues
-
-