java.lang.Object
fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
fr.mines_stetienne.ci.sparql_generate.iterator.library.ITER_HTTPGet
All Implemented Interfaces:
fr.mines_stetienne.ci.sparql_generate.iterator.IteratorFunction

public class ITER_HTTPGet extends fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase
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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
    The SPARQL function URI.
  • 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>>> listNodeValues)
     

    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_HTTPGet

      public ITER_HTTPGet()
  • 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>>> listNodeValues)
      Specified by:
      exec in class fr.mines_stetienne.ci.sparql_generate.iterator.IteratorStreamFunctionBase