c

ai.agnos.sparql.api

SparqlQuery

case class SparqlQuery(query: String, httpMethod: HttpMethod = HttpMethods.GET, queryType: QueryType = DefaultMappedQuery, bindings: Map[String, Value] = Map.empty, defaultGraphs: List[IRI] = Nil, namedGraphs: List[IRI] = Nil, limit: Option[Long] = None, offset: Option[Long] = None, reasoning: Option[Boolean] = None, timeout: Option[Long] = None)(implicit _pm: PrefixMapping) extends SparqlStatement with Product with Serializable

SPARQL Query to be executed, supports both mapped and streaming queries.

The streaming option also allows for full akka-streams integration support with the knowledge graph, which is useful for large results (e.g. reports)

query

the query to be executed

queryType

the type of query, defaults to DefaultMappedQuery

bindings

the request bindings

defaultGraphs

the default graphs passed as query parameters (correspond to FROM <graph> SPARQL statement)

namedGraphs

the named graphs passed as query parameters (correspont to FROM NAMED <graph> SPARQL statement)

limit

an optional limit to be passed as a query parameter

offset

an optional offset to be passed as a query parameter

reasoning

an optional reasoning flag to be passed as a query parameter

timeout

an optional per-query specific timeout to be passed as as query parameter

Linear Supertypes
Serializable, Serializable, Product, Equals, SparqlStatement, ClientHttpRequest, Request, ClientAPIProtocol, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SparqlQuery
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. SparqlStatement
  7. ClientHttpRequest
  8. Request
  9. ClientAPIProtocol
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SparqlQuery(query: String, httpMethod: HttpMethod = HttpMethods.GET, queryType: QueryType = DefaultMappedQuery, bindings: Map[String, Value] = Map.empty, defaultGraphs: List[IRI] = Nil, namedGraphs: List[IRI] = Nil, limit: Option[Long] = None, offset: Option[Long] = None, reasoning: Option[Boolean] = None, timeout: Option[Long] = None)(implicit _pm: PrefixMapping)

    query

    the query to be executed

    queryType

    the type of query, defaults to DefaultMappedQuery

    bindings

    the request bindings

    defaultGraphs

    the default graphs passed as query parameters (correspond to FROM <graph> SPARQL statement)

    namedGraphs

    the named graphs passed as query parameters (correspont to FROM NAMED <graph> SPARQL statement)

    limit

    an optional limit to be passed as a query parameter

    offset

    an optional offset to be passed as a query parameter

    reasoning

    an optional reasoning flag to be passed as a query parameter

    timeout

    an optional per-query specific timeout to be passed as as query parameter

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val bindings: Map[String, Value]
  6. def build(statement_: String): String
    Attributes
    protected
    Definition Classes
    SparqlStatement
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. val defaultGraphs: List[IRI]
  9. lazy val encodedQueryString: String
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def executionTimeout: FiniteDuration

    returns

    the overall execution timeout of this particular statement this will be used by the Future while obtaining a connection and also executing the statement and handling the responses

    Definition Classes
    SparqlStatement
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. val httpMethod: HttpMethod

    returns

    the HTTP Method to be used to communicate with the endpoint

    Definition Classes
    SparqlQuerySparqlStatementClientHttpRequest
  15. def idleTimeout: FiniteDuration

    returns

    the idle timeout for the sparql statement, subclasses should override the default value which is set here to 2 seconds.

    Definition Classes
    SparqlStatement
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val limit: Option[Long]
  18. val namedGraphs: List[IRI]
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. val offset: Option[Long]
  23. implicit val pm: PrefixMapping
    Definition Classes
    SparqlStatement
  24. val query: String
  25. val queryHttpMethod: HttpMethod

    Decides which method to use for the query.

    Decides which method to use for the query. Will return the desired method, unless the query is longer that the POST threshold configured by sparqlQueryPostThreshold, in which case POST is returned

    returns

    the decided HTTP method to be used

  26. val queryType: QueryType
  27. val reasoning: Option[Boolean]
  28. def receiveTimeout: FiniteDuration

    returns

    the receive timeout for the sparql statement, subclasses should override the default value which is set here to 3 seconds.

    Definition Classes
    SparqlStatement
  29. val sparqlQueryPostThreshold: Int

    The threshold at which the SPARQL client will force to use HTTP method on the Sparql endpoint.

    The threshold at which the SPARQL client will force to use HTTP method on the Sparql endpoint. This is due to HTTP limiting the size of the query string.

    Defaults to 2kB, but may be overridden by setting the SPARQL_CLIENT_MAX_HTTP_QUERY_URI_LENGTH environment variable to the desired value.

    See also

    https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2.1

  30. lazy val statement: String

    returns

    the SPARQL statement in executable form

    Definition Classes
    SparqlQuerySparqlStatement
  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. val timeout: Option[Long]
  33. def toString(): String
    Definition Classes
    SparqlStatement → AnyRef → Any
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from SparqlStatement

Inherited from ClientHttpRequest

Inherited from Request

Inherited from ClientAPIProtocol

Inherited from AnyRef

Inherited from Any

Ungrouped