Class ITER_HTTPGet
java.lang.Object
fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
fr.mines_stetienne.ci.sparql_generate.iterator.library.ITER_HTTPGet
- All Implemented Interfaces:
IteratorFunction
Iterator function
iter:HTTPGet
binds the responses of regular GET operations to a HTTP(s) URL.
See Live example
- Param 1: (a URI or String) the Web URI where regular GET operations are operated;
- Param 2: (a positive Integer) the number of seconds between successive calls to the Web API;
- Param 3 (optional): the total number of calls to make (a positive Integer). If not provided, the iterator never ends.
Example:
The clause
ITERATOR iter:HTTPGet(<https://example.org/room1/temperature>,60) AS ?temperature
will fetch the temperature of room 1 every 60 seconds, indefinetely.
- Since:
- 2018-09-27
- Author:
- El-Mehdi Khalfi invalid input: '<'el-mehdi.khalfi at emse.fr>
-
Field Summary
FieldsFields inherited from class fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
arguments -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckBuild(org.apache.jena.sparql.expr.ExprList args) Partially checks if the iterator function can be executed with the given arguments.voidexec(List<org.apache.jena.sparql.expr.NodeValue> args, Consumer<List<List<org.apache.jena.sparql.expr.NodeValue>>> listNodeValues) 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 Details
-
URI
The SPARQL function URI.- See Also:
-
-
Constructor Details
-
ITER_HTTPGet
public ITER_HTTPGet()
-
-
Method Details
-
checkBuild
public void checkBuild(org.apache.jena.sparql.expr.ExprList args) Description copied from class:IteratorStreamFunctionBasePartially checks if the iterator function can be executed with the given arguments.- Specified by:
checkBuildin classIteratorStreamFunctionBase- Parameters:
args- -
-
exec
public void exec(List<org.apache.jena.sparql.expr.NodeValue> args, Consumer<List<List<org.apache.jena.sparql.expr.NodeValue>>> listNodeValues) Description copied from class:IteratorStreamFunctionBaseIteratorFunction call to a list of evaluated argument values.- Specified by:
execin classIteratorStreamFunctionBase- Parameters:
args- -listNodeValues- - where to emit collections of nodevalues
-