Sesame
We support the Sesame 2.0 HTTP Protocol which allows us to communicate with any Sesame based store exposed via a Sesame HTTP server. This means we can support Sesame's own store implementations as well as others such as OWLIM and BigData which may be exposed via Sesame.
Connectivity with Sesame is done via a number of classes:
Provider | Description |
---|---|
SesameHttpProtocolConnector | Connect to a Sesame server that uses the latest version of the Sesame protocol |
SesameHttpProtocolVersion6Connector | Connect to a Sesame server that uses Version 6 (the current version) of the Sesame protocol |
SesameHttpProtocolVersion5Connector | Connect to a Sesame server that uses Version 5 of the Sesame protocol. Use this if you are using an older version of Sesame prior to the addition of SPARQL Update support. |
Typically you will most likely just use the SesameHttpProtocolConnector
since that will always reflect the current version of the Sesame protocol.
Supported Capabilities
- Load, Save, Delete, Update and List Graphs
- SPARQL Query
- SPARQL Update (if using Version 6 connector or higher)
Creating a Connection
To create a connection to Sesame you need to know the Base URI of the server and the repository ID e.g.
SesameHttpProtocolConnector sesame = new SesameHttpProtocolConnector("http://localhost:8080/openrdf-sesame/", "example");
If you are using HTTP authentication then you can optionally supply user credentials:
SesameHttpProtocolConnector sesame = new SesameHttpProtocolConnector("http://localhost:8080/openrdf-sesame/", "example", "username", "password");
Additionally there are overloads for supplying a proxy server if necessary.
Managing a Server
We support managing a server via the SesameServer class which implements our Servers API
Managing a server allows you to manage a single catalog at a time, a Sesame connection provides access to its associated server via the ParentServer
or AsyncParentServer
property.
Connecting to a Server
You can also create connect directly to a server by creating an instance of the SesameServer class. This requires you to know the Base URI of the server:
SesameServer sesame = new SesameServer("http://localhost:8080/openrdf-sesame/");
Creating Stores
When creating a store the SesameServer
will use one of the following templates:
Template | Description |
---|---|
SesameMemTemplate | Used to create Sesame memory stores |
SesameNativeTemplate | Used to create Sesame native stores |
SesameHttpTemplate | Used to create Sesame HTTP stores i.e. pointers to other remote Sesame repositories |
Each template has various properties for configuring store type specific settings.