Gno.Store.Adapters.Qlever (Gno v0.1.0)

Copy Markdown View Source

A Gno.Store.Adapter implementation for QLever.

QLever uses a single root endpoint for all SPARQL operations (query, update, and Graph Store Protocol). Write operations require an access token.

Manifest Configuration

@prefix gno:  <http://gno.app/> .
@prefix gnoa: <http://gno.app/ns/adapter/> .

<Qlever> a gnoa:Qlever
    ; gno:storeEndpointScheme "http"          # optional (default: "http")
    ; gno:storeEndpointHost "localhost"       # optional (default: "localhost")
    ; gno:storeEndpointPort 7001              # optional (default: 7001)
    ; gnoa:qleverAccessToken "my-access-token"  # required for write operations
.

Default Graph Semantics

QLever uses union default graph semantics: the default graph is the union of all named graphs and the real default graph. The adapter automatically normalizes this by setting the default-graph-uri parameter to <http://qlever.cs.uni-freiburg.de/builtin-functions/default-graph> for query operations.

Unsupported Operations

QLever does not support the following SPARQL graph management operations: LOAD, CLEAR, CREATE, ADD, COPY, MOVE. Attempting these will return {:error, %Gno.Store.UnsupportedOperationError{}}.

Summary

Types

t()

@type t() :: %Gno.Store.Adapters.Qlever{
  __additional_statements__: term(),
  __id__: term(),
  access_token: term(),
  default_graph_semantics_config: term(),
  graph_store_endpoint: term(),
  host: term(),
  port: term(),
  query_endpoint: term(),
  scheme: term(),
  update_endpoint: term(),
  userinfo: term()
}

Functions

build(id)

build(id, initial)

build!(id)

build!(id, initial)

build_id(attributes)

from(value)

@spec from(Grax.Schema.t()) :: {:ok, t()} | {:error, any()}

from!(value)

@spec from!(Grax.Schema.t()) :: t()

graph_semantics(adapter)

Returns the graph semantics for a specific adapter instance.

Checks the default_graph_semantics_config manifest property first, falling back to default_graph_semantics/0.

load(graph, id, opts \\ [])

@spec load(
  RDF.Graph.t() | RDF.Description.t(),
  RDF.IRI.coercible() | RDF.BlankNode.t(),
  opts :: keyword()
) :: {:ok, t()} | {:error, any()}

load!(graph, id, opts \\ [])

@spec load!(
  RDF.Graph.t() | RDF.Description.t(),
  RDF.IRI.coercible() | RDF.BlankNode.t(),
  opts :: keyword()
) :: t()