package api
- Alphabetic
- Public
- All
Type Members
-
trait
ClientAPIProtocol extends AnyRef
Client API Protocol, all concrete API requests use this
-
abstract
class
ClientHttpRequest extends Request
Represents any request sent to the Sparql endpoint via HTTP, which may include Sparql statements or graph-store protocol operations.
- abstract class ClientHttpResponse extends Response
-
case class
ClientMappedQuery[T <: SparqlResult](mapper: ResultMapper[T]) extends MappedQuery[T] with Product with Serializable
Client-provided result mapper.
-
case class
DropGraph(graphIri: Option[IRI], context: Option[Any] = None) extends GraphStoreRequest with Product with Serializable
Represents an operation to drop a single graph via the graph-store protocol.
Represents an operation to drop a single graph via the graph-store protocol.
- graphIri
the graph IRI to drop, if not specified this denotes the DEFAULT graph
- abstract class ErrorHandler extends AnyRef
- trait ErrorHandlerSupport extends AnyRef
-
case class
GetGraph(graphIri: Option[IRI], context: Option[Any] = None) extends GraphStoreRequest with Product with Serializable
Represents the operation to retrieve a single graph via the graph-store protocol.
Represents the operation to retrieve a single graph via the graph-store protocol.
- graphIri
the graph IRI to get, if not specified this denotes the DEFAULT graph
-
trait
GraphStoreProtocol extends ClientAPIProtocol
Implementation of the graph-store API messages.
- abstract class GraphStoreRequest extends ClientHttpRequest with GraphStoreProtocol
-
case class
GraphStoreResponse(request: GraphStoreRequest, success: Boolean, statusCode: Int, statusText: String, model: Option[Model] = None) extends ClientHttpResponse with GraphStoreProtocol with Product with Serializable
The response entity for graph store operations.
The response entity for graph store operations.
- request
the request object
- success
true if the operation was successful
- statusCode
the HTTP status code of the response
- statusText
the HTTP status reason text
- model
the response RDF graph (model) if available
-
abstract
class
InsertGraph extends GraphStoreRequest
Represents an operation to insert graph(s) via the graph-store protocol.
Represents an operation to insert graph(s) via the graph-store protocol.
-
case class
InsertGraphFromModel(graphModel: Model, graphIri: Option[IRI] = None, mergeGraphs: Boolean = false, context: Option[Any] = None) extends InsertGraph with Product with Serializable
Used to insert an in-memory RDF model into the triple store.
Used to insert an in-memory RDF model into the triple store.
- graphModel
the graph model
- graphIri
optional graph IRI, defaults to None
- mergeGraphs
indicates if the inserted data should be merged data already in the specified graph in the database, if set to false the previously stored data in the graph will be replaced with the payload, defaults to false
- context
an optional context to be carried along the flow
-
case class
InsertGraphFromPath(path: Path, modelFormat: RDFFormat, graphIri: Option[IRI] = None, mergeGraphs: Boolean = false, context: Option[Any] = None) extends InsertGraph with Product with Serializable
Used to insert RDF contents from a file or another resource into the triple store.
Used to insert RDF contents from a file or another resource into the triple store.
- path
the local filesystem path of the file to use
- modelFormat
the RDF format to use, supporting all formats available in org.eclipse.rdf4j.rio.Rio
- graphIri
an optional graph IRI, will insert into the default graph if no graph is specified. NB: if the incoming RDF is in "quads" format, i.e. NQUADS or JSON-LD, the graph in the RDF is ignored and instead the graphIri property is used.
- mergeGraphs
indicates if the inserted data should be merged data already in the specified graph in the database, if set to false the previously stored data in the graph will be replaced with the payload, defaults to false
- context
an optional context to be carried along the flow
-
case class
InsertGraphFromURL(url: URL, modelFormat: RDFFormat, graphIri: Option[IRI] = None, mergeGraphs: Boolean = false, context: Option[Any] = None) extends InsertGraph with Product with Serializable
Used to insert RDF contents from a file or another resource into the triple store.
Used to insert RDF contents from a file or another resource into the triple store.
- url
the URL of the file to use
- modelFormat
the RDF format to use, supporting all formats available in org.eclipse.rdf4j.rio.Rio
- graphIri
an optional graph IRI, will insert into the default graph if no graph is specified. NB: if the incoming RDF is in "quads" format, i.e. NQUADS or JSON-LD, the graph in the RDF is ignored and instead the graphIri property is used.
- mergeGraphs
indicates if the inserted data should be merged data already in the specified graph in the database, if set to false the previously stored data in the graph will be replaced with the payload, defaults to false
- context
an optional context to be carried along the flow
- trait MappedQuery[T <: SparqlResult] extends QueryType
- abstract class PagingParams extends AnyRef
-
case class
PingResponse(success: Boolean = true) extends ClientHttpResponse with SparqlClientProtocol with Product with Serializable
"Is-Alive" response
-
class
PrefixMapping extends AnyRef
Inspired by Jena's PrefixMappingImpl class, this class does more or les the same.
Inspired by Jena's PrefixMappingImpl class, this class does more or les the same.
See http://svn.apache.org/repos/asf/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/shared/impl/PrefixMappingImpl.java
- case class QueryPaging(offset: Option[Long], limit: Option[Long]) extends PagingParams with Product with Serializable
-
case class
QuerySolution(values: Map[String, QuerySolutionValue]) extends Product with Serializable
The default query solution, used to unmarshal the 'application/sparql-results+json' server response.
- case class QuerySolutionValue(type: String, datatype: Option[String] = None, value: String = null) extends Product with Serializable
- trait QueryType extends AnyRef
-
trait
Request extends ClientAPIProtocol
Request
-
trait
Response extends ClientAPIProtocol
Response
- trait ResultMapper[T <: SparqlResult] extends SolutionMapper[T]
- case class ResultSet(head: ResultSetVars, results: ResultSetResults) extends SparqlResult with Product with Serializable
- case class ResultSetResults(bindings: List[QuerySolution]) extends Product with Serializable
- case class ResultSetVars(vars: List[String]) extends Product with Serializable
-
sealed
trait
SparqlClientError extends AnyRef
Error messages
- trait SparqlClientProtocol extends ClientAPIProtocol
- case class SparqlClientRequestFailed(message: String) extends RuntimeException with SparqlClientError with Product with Serializable
- case class SparqlClientRequestFailedWithError(message: String, throwable: Throwable) extends RuntimeException with SparqlClientError with Product with Serializable
- abstract class SparqlConstruct extends SparqlStatement
- trait SparqlConstructFactory extends AnyRef
-
case class
SparqlErrorResult(error: Throwable, code: Int, message: String) extends SparqlResult with Product with Serializable
Error result
-
case class
SparqlModelResult(model: Model) extends SparqlResult with Product with Serializable
A result representing an RDF Model
A result representing an RDF Model
- model
the RDF model
-
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.
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
-
case class
SparqlRequest(statement: SparqlStatement, context: Option[Any] = None) extends ClientHttpRequest with SparqlClientProtocol with Product with Serializable
Represents a single Sparql request to be sent to the triple store.
Represents a single Sparql request to be sent to the triple store.
- statement
the sparql statement string, any | margins will be stripped automatically
- context
an optional context to be carried along the flow
-
case class
SparqlResponse(request: SparqlRequest, success: Boolean = true, status: StatusCode = StatusCodes.OK, result: List[SparqlResult] = Nil, error: Option[SparqlClientError] = None) extends ClientHttpResponse with SparqlClientProtocol with Product with Serializable
Represents a response from the triple store for a Sparql request.
Represents a response from the triple store for a Sparql request.
- request
the underlying request object is returned with the response
- success
true if the sparql statement execution succeeded
- status
the HTTP status of the result
- result
results
- error
optional error message, if available
- trait SparqlResult extends AnyRef
-
abstract
class
SparqlStatement extends ClientHttpRequest
SparqlStatement is the interface representing all SPARQL statements.
SparqlStatement is the interface representing all SPARQL statements. Create a subclass of SparqlStatement for each and every statement that you send to the SparqlClient.
By the way, this also goes for some non SPARQL statements such as some Graph API statements
- abstract class SparqlUpdate extends SparqlStatement
-
case class
StreamedQuery(desiredContentType: ContentType = `application/sparql-results+json`) extends QueryType with Product with Serializable
For queries that return a streamed source of the triple stores response directly, which is suitable for large batch jobs and long lasting operations.
- case class StreamingSparqlResult(dataStream: Source[ByteString, Any], contentType: Option[ContentType]) extends SparqlResult with Product with Serializable
- case class SystemExitErrorHandler(exitCode: Int) extends ErrorHandler with Product with Serializable
Value Members
- object DefaultErrorHandler extends ErrorHandler
-
object
DefaultMappedQuery extends MappedQuery[ResultSet] with Product with Serializable
Default Mapped Query, mapping to ResultSet object.
- object DropGraphM
- object GetGraphM
- object IgnoreAndLogErrorHandler extends ErrorHandler
- object InsertGraphFromModelM
- object InsertGraphFromPathM
- object InsertGraphFromURLM
-
object
NamespaceConstants
Defines the most generic namespaces as constants
- object NoPaging extends PagingParams with Product with Serializable
- object PagingParams
-
object
PingRequest extends Request with Product with Serializable
"Is-Alive" request
- object PrefixMapping
- object ResultSetMapper extends ResultMapper[ResultSet]
- object SparqlConstruct extends SparqlConstructFactory
- object SparqlFilterConstruct extends SparqlConstructFactory
- object SparqlSearchConstruct extends SparqlConstructFactory
- object SparqlUpdate