Skip to content
Permalink
Browse files
Update for GSP and quads
  • Loading branch information
afs committed Apr 23, 2022
1 parent aaa59ac commit 1435ccb54511138bc3283d09a10dbf754b23d8ee
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
@@ -172,7 +172,7 @@ form with field "update=".

A GSP operation has `?default` or `?graph=`.

Quads operations have no query string and a have a `Content-Type` for a data in
Quads operations are also provided by GSP endpoints when there is no query string and a have a `Content-Type` for a data in
a RDF triples or quads syntax.

So, for example "GET /dataset" is a request to get all the triples and quads in the
@@ -257,10 +257,10 @@ GET, POST, PUT (not DELETE, that would be the dataset itself),
and the request or response is one of the syntaxes for datasets
(TriG, N-Quads, JSON-LD, TriX).

Fuseki also provides [/documentation/io/rdf-binary.html](RDF Binary) for triples and quads.
The DSP ("Dataset Store Protocol") operations provide operations similar to GSP
but operating on the dataset, not a speciifc graph.

The quads extension applies when there is no `?default` or `?graph`.
`GET` fetches the dataset in quads format, and `PUT` and `POST` take quads format data (N-Quads and Trig).
Fuseki also provides [/documentation/io/rdf-binary.html](RDF Binary) for triples and quads.

## Context

@@ -91,7 +91,7 @@ To silence logging from Java, try:

## Building a server {#build}

A ``FusekiServer`` is built by creating a configuration,
A `FusekiServer` is built by creating a configuration,
building the server, then running it. The application needs to start
the server.

@@ -112,16 +112,17 @@ dataset that can be updated via HTTP.
...
server.stop() ;

The services are avilable on a named endpoint and also on the dataset URL itself.

URLs:

| Service | Endpoint |
|---------|----------|
| SPARQL Query | ``http://host:3330/ds/query`` |
| SPARQL Query | ``http://host:3330/ds/sparql`` |
| SPARQL Update | ``http://host:3330/ds/update`` |
| File upload | ``http://host:3330/ds/update`` |
| GSP read-write | ``http://host:3330/ds/data`` |
| Read-write quads | ``http://host:3330/ds`` |
| Service | Endpoint1 | Endpoint2 |
|---------|----------|------------|
| SPARQL Query | `http://host:3330/ds/query` | `http://host:3330/ds` |
| SPARQL Query | `http://host:3330/ds/sparql` | `http://host:3330/ds` |
| SPARQL Update | `http://host:3330/ds/update` | `http://host:3330/ds` |
| GSP read-write | `http://host:3330/ds/data` | `http://host:3330/ds` |


"GSP" = SPARQL Graph Store Protocol

@@ -132,24 +133,23 @@ set that is read-only over HTTP. The application can still update the dataset.
Dataset ds = ... ;
FusekiServer server = FusekiServer.create()
.port(3332)
.add("/ds", ds, true)
.add("/ds", ds, false)
.build() ;
server.start() ;

| Service | Endpoint |
|---------|----------|
| SPARQL Query | ``http://host:3332/ds/query`` |
| SPARQL Query | ``http://host:3332/ds/sparql`` |
| GSP read-only | ``http://host:3332/ds/data`` |
| GET quads | ``http://host:3332/ds`` |
| Service | Endpoint | Endpoint2 |
|---------|----------|-----------|
| SPARQL Query | `http://host:3332/ds/query` | `http://host:3332/ds` |
| SPARQL Query | `http://host:3332/ds/sparql` | `http://host:3332/ds` |
| GSP read-only | `http://host:3332/ds/data` | `http://host:3332/ds` |

### Example 3

Different combinations of services and endpoint names can be given using a `DataService`.

DatasetGraph dsg = ... ;
DataService dataService = new DataService(dsg) ;
dataService.addEndpoint(OperationName.Quads_RW, "");
dataService.addEndpoint(OperationName.GSP_RW, "");
dataService.addEndpoint(OperationName.Query, "");
dataService.addEndpoint(OperationName.Update, "");

@@ -159,15 +159,14 @@ Different combinations of services and endpoint names can be given using a `Data
.build() ;
server.start() ;

This setup puts all the operation on the dataset URL. The ``Content-type`` and any query
This setup puts all the operation on the dataset URL. The `Content-type` and any query
string is used to determine the operation.

| Service | Endpoint |
|---------|----------|
| SPARQL Query | ``http://host:3332/ds`` |
| SPARQL Update | ``http://host:3332/ds`` |
| GSP read-only | ``http://host:3332/ds`` |
| GET/POST quads | ``http://host:3332/ds`` |
| SPARQL Query | `http://host:3332/ds` |
| SPARQL Update | `http://host:3332/ds` |
| GSP read-write | `http://host:3332/ds` |

### Example 4

0 comments on commit 1435ccb

Please sign in to comment.