On 19/12/17 21:41, Piotr Nowara wrote:
Hi,

I got a TDB powered JAVA app which is issuing a lot of  SPARQL UPDATES and
SELECTS (most of them accessing multiple named graphs at once). My app
obtains a Jena connection using this simple API call:

this.dataset = TDBFactory.createDataset(this.storagePath);

Then this dataset object is used to run SPARQL UPDATES and SELECTS.

I would like to replicate this solution using Jena Fuseki but I wonder if
that’s possible since the DatasetAccessor class provides only methods to
access separate named graphs. What I need is a database/dataset level
access. The Fuseki database should be persistent.

I'd be grateful for any clue or code example.
Query and update work on datasets.

RDFConnection
http://jena.apache.org/documentation/rdfconnection/
is the combined interface to both local and remote datasets and includes some operations that include whole GET/POST/PUT of datasets

RDFConnection.connect("http:/localhost:3030/myDataset")

for migration from local, note that data is copied across the network when doing dataset operations. RDFConnection has whole dataset operations in the style of SPARQL Graph Store Protocol (=DatasetAccessor) operations.
If your graphs and dataset are large is maybe not what you want.

Because this across the network, the semantics of lcoal and remote are not identical unless you ask the local mode to do copying:

  RDFConnection.connect(datasets, Isolation.COPY)

which is a good simulation for a local/remote (and slower for local than no COPY)

     Andy



Thanks,

Piotr

Reply via email to