Skip to content
Permalink
Browse files
Fuseki doc updates
  • Loading branch information
afs committed Sep 21, 2020
1 parent 1b8b395 commit 1d3953a1db253e49d6881b9390c2971ef6f9c80c
Show file tree
Hide file tree
Showing 16 changed files with 858 additions and 660 deletions.
@@ -5,36 +5,39 @@ slug: index

Apache Jena Fuseki is a SPARQL server. It can run as a operating system
service, as a Java web application (WAR file), and as a standalone server.
It provides security (using [Apache Shiro](https://shiro.apache.org/)) and
has a user interface for server monitoring and administration.

It provides the SPARQL 1.1
[protocols for query and update](http://www.w3.org/TR/sparql11-protocol/)
Fuseki comes in in two forms, a single system "webapp", combined with a UI
for admin and query, and as "main", a server suitable to run as part of a larger
deployment, including [with Docker](fuseki-main.html#docker) or running embedded.
Both forms use the same core protocol engine and [same configuration file
format](fuseki-configuration.html).

Fuseki provides the
SPARQL 1.1 [protocols for query and update](http://www.w3.org/TR/sparql11-protocol/)
as well as the
[SPARQL Graph Store protocol](http://www.w3.org/TR/sparql11-http-rdf-update/).

Fuseki is tightly integrated with [TDB](../tdb/index.html) to provide a robust,
transactional persistent storage layer, and incorporates
[Jena text query](../query/text-query.html).
It can be used to provide the protocol engine for other RDF query and
storage systems.

## Contents

- [Download](#download-fuseki)
- [Download with UI](#download-fuseki)
- [Getting Started](#getting-started-with-fuseki)
- [Security](fuseki-security.html)
- [Running Fuseki](fuseki-run.html)
- [As a standalone server with UI](fuseki-run.html#fuseki-standalone-server)
- [As a service](fuseki-run.html#fuseki-service)
- [As a web application](fuseki-run.html#fuseki-web-application)
- [As an standalone SPARQL server](fuseki-main.html)
- [As an embedded SPARQL server](fuseki-main.html)
- Architecture
- [Server URI scheme : services and datasets](fuseki-data-services.html)
- [Server Admin Protocol](fuseki-server-protocol.html)
- [Running Fuseki with UI](fuseki-webapp.html)
- [As a standalone server with UI](fuseki-webapp.html#fuseki-standalone-server)
- [As a service](fuseki-webapp.html#fuseki-service)
- [As a web application](fuseki-webapp.html#fuseki-web-application)
- [Security](fuseki-security.html) with [Apache Shiro](https://shiro.apache.org/)
- [Running Fuseki Server](fuseki-main.html)
- [Setup](fuseki-main.html#setup)
- [As a Docker container](fuseki-main#fuseki-docker)
- [As an embedded SPARQL server](fuseki-embedded.html)
- [Security and data access control](fuseki-data-access-control.html)
- [Fuseki Configuration](fuseki-configuration.html)
- [Logging](fuseki-logging.html)
- [Server Statistics and Metrics](fuseki-server-info.html)
- [How to Contribute](#how-to-contribute)
- Client access
- [Use from Java](../rdfconnection)
@@ -45,7 +48,7 @@ The Jena users mailing is the place to get help with Fuseki.

[Email support lists](/help_and_support/#email-support-lists)

## Download Fuseki
## Download Fuseki with UI

Releases of Apache Jena Fuseki can be downloaded from one of the mirror sites:

@@ -57,20 +60,14 @@ preference to any older versions.

**Fuseki download files**

Filename | Description
--------- | -----------
`fuseki-*VER*.distribution.zip` | Fuseki download, includes everything.
`fuseki-*VER*-server.jar` | Fuseki server, as an executable jar.
`fuseki-*VER*-server.war` | Fuseki server, as a web application archive (.war) file.
| Filename | Description |
|---------|-------------|
|`apache-jena-fuseki-*VER*.zip` | Fuseki with UI download |
|`[jena-fuseki-server](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server) | The Fuseki Main packaging |

<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-fuseki-war</artifactId>
<type>war</type>
<version>X.Y.Z</version>
</dependency>
`apache-jena-fuseki-*VER*.zip` contains both a war file and an executable jar.

and for [Fuseki Main](fuseki-main):
Fuskei Main is also available as a Maven artifact:

<dependency>
<groupId>org.apache.jena</groupId>
@@ -99,7 +96,7 @@ This includes packaged builds of Fuseki.
The [quick start](fuseki-quick-start.html) section serves as a basic
guide to getting a Fuseki server running on your local machine.

See [all the ways to run Fuseki](fuseki-run.html) for complete coverage of all the
See [all the ways to run Fuseki](fuseki-webapp.html) for complete coverage of all the
deployment methods for Fuseki.

## How to Contribute
@@ -119,5 +116,5 @@ The development codebase is available from git.
Development builds (not a formal release):
[SNAPSHOT](https://repository.apache.org/content/repositories/snapshots/org/apache/jena/jena-fuseki/)

Source code mirrored to github:
Source code:
[https://github.com/apache/jena/tree/master/jena-fuseki2](https://github.com/apache/jena/tree/master/jena-fuseki2)
@@ -1,17 +1,10 @@
---
title: Fuseki Configuration - New Syntax
title: Fuseki Data Service Configuration Syntax
---

Apache Jena 3.13.0 introduces a new syntax for the facilities of a Fuseki service.

The [previous syntax](fuseki-configuration.html) is still valid.

The new syntax enables more configuration options:

* setting the context on a per-endpoint basis
* having multiple operations at the service access point, switching based on
operation type
* a more general structure for adding custom services
A data service provides a number of operations on a dataset. These can be
explicitly named endpoints or operations at the URL of the dataset. New
operations can be configured in; these typically have their own named endpoints.

## Syntax

@@ -35,16 +28,13 @@ query, and then only on the dataset URL.
ja:data "data.trig" .

This is invoked with a URL of the form
<tt>http://<i>host:port</i>/dataset?query=...</tt>
which is a SPARQl query request sent to the dataset URL.

The new syntax is the `fuseki:endpoint`.
<tt>http://<i>host:port</i>/dataset?query=.\..</tt>
which is a SPARQL query request sent to the dataset URL.

The property `fuseki:endpoint` describes the operation available. No name is
given so the operation is available at the URL of the dataset.

`fuseki:dataset` names the dataset to be used with this data service. The syntax
and options are unchanged from the [previous syntax](fuseki-configuration.html).
`fuseki:dataset` names the dataset to be used with this data service.

In this second example:

@@ -58,7 +48,7 @@ In this second example:

the endpoint has a name. The URL to invoke the operation is now:

<tt>http://<i>host:port</i>/dataset/sparql?query=...</tt>
<tt>http://<i>host:port</i>/dataset/sparql?query=.\..</tt>

and is similar to older form:

@@ -78,40 +68,24 @@ the default. The first example is the same as:
] ;
fuseki:dataset <#dataset> .

### Original Configuration Syntax

The standard set of service installed by running the server from the command line
without a configuration file is:
The syntax described on this page was introduced in Apache Jena 3.13.0.

<#service1> rdf:type fuseki:Service ;
fuseki:name "dataset" ;
fuseki:endpoint [
fuseki:operation fuseki:query ;
fuseki:name "sparql"
];
fuseki:endpoint [
fuseki:operation fuseki:query ;
fuseki:name "query"
] ;
fuseki:endpoint [
fuseki:operation fuseki:update ;
fuseki:name "update"
] ;
fuseki:endpoint [
fuseki:operation fuseki:gsp-r ;
fuseki:name "get"
] ;
fuseki:endpoint [
fuseki:operation fuseki:gsp-rw ;
fuseki:name "data"
] ;
fuseki:endpoint [
fuseki:operation fuseki:upload ;
fuseki:name "upload"
] ;
fuseki:dataset ...
The [previous syntax](fuseki-old-config-endpoint.html) is still valid.

The new syntax enables more configuration options and gives more control of server functionality:

* setting the context on a per-endpoint basis
* having multiple operations at the service access point, switching based on
operation type
* a more general structure for adding custom services
* adding custom extensions to a Fuseki server

## Operations

The following operations are provided:

| URI | Operation |
|-----|-----------|
| `fuseki:query` | SPARQL 1.1 Query with ARQ extensions |
@@ -121,6 +95,61 @@ without a configuration file is:
| `fuseki:upload` | HTML form file upload |
| `fuseki:no-op` | An operation that causes a 400 or 404 error |

Custom extensions can be added (see [Programmatic configuration](fuseki-main.html#build) of the Fuseki server). To be able to uniquely identify the operation, these are usually

fuseki:endpoint [
fuseki:operation fuseki:shacl ;
fuseki:name "shacl" ;
] ;

See the section ["Integration with Apache Jena Fuseki"](/documentation/shacl/#integration-with-apache-jena-fuseki) for details of the SHACL support. While this operation is part of the standard Fuseki distribution, this operation is added during system initialization, using the custom operation support.

### Command Line Equivalents

The standard set of service installed by running the server from the command line
without a configuration file is for a read-only:

<#service1> rdf:type fuseki:Service ;
fuseki:name "dataset" ;
fuseki:endpoint [ fuseki:operation fuseki:query ; ];
fuseki:endpoint [ fuseki:operation fuseki:query ; fuseki:name "sparql" ];
fuseki:endpoint [ fuseki:operation fuseki:query ; fuseki:name "query" ];

fuseki:endpoint [ fuseki:operation fuseki:gsp-r ; ];
fuseki:endpoint [ fuseki:operation fuseki:gsp-r ; fuseki:name "get" ];
fuseki:dataset ...

which supports requests such as:

http://<i>host:port</i>/dataset?query=...

http://<i>host:port</i>/dataset/sparql?query=...

http://<i>host:port</i>/dataset?default

http://<i>host:port</i>/dataset/get?default

and for an updatable dataset (command line `--mem` for an in-memory dataset;
or with TDB storage, with `--update`):

<#service1> rdf:type fuseki:Service ;
fuseki:name "dataset" ;
fuseki:endpoint [ fuseki:operation fuseki:query ;];
fuseki:endpoint [ fuseki:operation fuseki:query ; fuseki:name "sparql" ];
fuseki:endpoint [ fuseki:operation fuseki:query ; fuseki:name "query" ];

fuseki:endpoint [ fuseki:operation fuseki:update ; ];
fuseki:endpoint [ fuseki:operation fuseki:update ; fuseki:name "update" ];

fuseki:endpoint [ fuseki:operation fuseki:gsp-r ; fuseki:name "get" ];
fuseki:endpoint [ fuseki:operation fuseki:gsp-rw ; ] ;
fuseki:endpoint [ fuseki:operation fuseki:gsp-rw ; fuseki:name "data" ];
fuseki:endpoint [ fuseki:operation fuseki:upload ; fuseki:name "upload" ]
fuseki:dataset ...

which adds requests that can change the data.


New operations can be added by programmatic setup in [Fuseki Main](/documentation/fuseki2/fuseki-main).

## Dispatch
@@ -152,7 +181,7 @@ defaulting to `text/trig`.

Custom services usually use a named endpoint. Custom operations
can specific a content type that they handle, which must be unique for the
operation, and they can not provide a query string signature for dispatch.
operation. They can not provide a query string signature for dispatch.

## Common Cases

@@ -173,7 +202,7 @@ This is good for publishing data.

#### Case 2: Dataset level operation.

The 3 SPARQL standard operations for a read-write dataset:
The 3 SPARQL standard operations for a read-write dataset, request are sent to <tt>http://<i>host:port</i>/dataset</tt>. There are no named endpoint services.

<#service> rdf:type fuseki:Service ;
fuseki:name "ds-rw" ;
@@ -198,6 +227,23 @@ The 3 SPARQL standard operations for a read-write dataset:
The operation on this dataset can only be accessed as "/ds-named/sparql",
"/ds-named/update" etc, not as "/ds-named".

#### Case 4: Named endpoints with query of the dataset.

<#service1> rdf:type fuseki:Service ;

fuseki:name "ds" ;
fuseki:endpoint [ fuseki:operation fuseki:query ] ;
fuseki:endpoint [ fuseki:operation fuseki:query; fuseki:name "sparql" ] ;
fuseki:endpoint [ fuseki:operation fuseki:query; fuseki:name "query" ] ;
fuseki:endpoint [ fuseki:operation fuseki:update; fuseki:name "update" ] ;
fuseki:endpoint [ fuseki:operation fuseki:upload; fuseki:name "upload" ] ;
fuseki:endpoint [ fuseki:operation fuseki:gsp_r; fuseki:name "get" ] ;
fuseki:endpoint [ fuseki:operation fuseki:gsp_rw; fuseki:name "data" ] ;
fuseki:dataset <#dataset> .

The operations on this dataset are accessed as "/ds/sparql",
"/ds/update" etc. In addition, "/ds?query=" provided SPARQL query.

## Quad extensions

The GSP (SPARQL Graph Store Protocol) operations provide the HTTP operations of
@@ -213,7 +259,8 @@ and the request or response is one of the syntaxes for datasets

Fuseki also provides [/documentation/io/rdf-binary.html](RDF Binary) for triples and quads.

The quads extension applies when there is no `?default` or `?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).

## Context

@@ -253,7 +300,7 @@ seconds, and complete results in 30 seconds.

## Security

The page [Data Access Control for Fuseki](/documentation/fuseki2/data-access-control)
The page [Data Access Control for Fuseki](./fuseki-data-access-control.html)
covers the

For endpoints, the permitted users are part of the endpoint description.
@@ -263,12 +310,3 @@ For endpoints, the permitted users are part of the endpoint description.
fuseki:name "sparql" ;
fuseki:allowedUsers "user1", "user2"
] ;

## Legacy Behaviour

For compatibility with the older configuration behaviour, the Fuseki dispatch
code includes an additional dispatch option.

If a request is made on the dataset (no service name in the request URL), then
the dispatcher classifies the operation and looks for a named endpoint for that
operation of any name. If one is found, that is used.

0 comments on commit 1d3953a

Please sign in to comment.