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
- Alphabetic
- By Inheritance
- SparqlQuery
- Serializable
- Serializable
- Product
- Equals
- SparqlStatement
- ClientHttpRequest
- Request
- ClientAPIProtocol
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val bindings: Map[String, Value]
-
def
build(statement_: String): String
- Attributes
- protected
- Definition Classes
- SparqlStatement
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val defaultGraphs: List[IRI]
- lazy val encodedQueryString: String
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
httpMethod: HttpMethod
- returns
the HTTP Method to be used to communicate with the endpoint
- Definition Classes
- SparqlQuery → SparqlStatement → ClientHttpRequest
-
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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val limit: Option[Long]
- val namedGraphs: List[IRI]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val offset: Option[Long]
-
implicit
val
pm: PrefixMapping
- Definition Classes
- SparqlStatement
- val query: String
-
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
- val queryType: QueryType
- val reasoning: Option[Boolean]
-
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
-
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.
-
lazy val
statement: String
- returns
the SPARQL statement in executable form
- Definition Classes
- SparqlQuery → SparqlStatement
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val timeout: Option[Long]
-
def
toString(): String
- Definition Classes
- SparqlStatement → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )