2

For my current project I need to load a dataset and different ontologies and expose everything as linked data using Fuseki with TDB and Pubby. Pubby will take a data set from a single location and create URIs based on that location, therefore if we need multiple different locations (as in the case with 2–3 separate ontologies), that would be easy to do with Pubby by adding another data set.

The concept of dataset seems to also apply to Fuseki.

Essentially I will need to expose three types of URIs:

  • www.mywebsite.com/project/data
  • www.mywebsite.com/project/data/structure
  • www.mywebsite.com/project/ontology

In order to create such URIs with Pubby 0.3.3. you will have to specify lines like these:

conf:dataset [
   conf:sparqlEndpoint <sparql_endpoint_url_ONE>;
   conf:sparqlDefaultGraph <sparql_default_graph_name_ONE>;
   conf:datasetBase <http://mywebsite.com/project/>;
   conf:datasetURIPattern "(data)/.*";
   (...)
]

Each data set specified in Pubby will take its data from a certain URL (typically a SPARQL endpoint). For ontologies you will have a dataset that uses the second a datasetURIPattern like this one:

conf:dataset [
   conf:sparqlEndpoint <sparql_endpoint_url_TWO>;
   conf:sparqlDefaultGraph <sparql_default_graph_name_TWO>;
   conf:datasetBase <http://mywebsite.com/project/>;
   conf:datasetURIPattern "(ontology)/.*";
   (...)
]

As you can see the differences would be at the following: conf:sparqlEndpoint (the SPARQL endpoint), conf:sparqlDefaultGraph (the default Graph), conf:datasetURIPattern (needed for creating the actual URIs with Pubby). It is not however clear to me how can I have separate URIs for the data sets when using Fuseki. When using Sesame, for example, I just create two different repositories and this trick works like charm when publishing data with Pubby. Not immediately clear with

The examples from the official Fuseki documentation present a single dataset (read-only or not, etc), but none of them seem to present such a scenario. There is no immediate example where there is a clear separation between the TBox and the ABox, even though this is a fundamental principle of Linked Data (see Keeping ABox and TBox Split).

As far as I understand this should be possible, but how? Also is it correct that the TBox and ABox can be reunited under a single SPARQL endpoint later by using (tdb:unionDefaultGraph true ;).

paxRoman
  • 2,064
  • 3
  • 19
  • 32
  • 1
    It's not clear exactly what you're asking. The prefix of a URI has nothing to do with where triples about it are stored. It sounds like you want to keep your ABox triples in one named graph and your TBox triples in another. Then, if the default graph is the union of the named graphs, you'll see the contents of both in the default graph. What actual problem are you running into? – Joshua Taylor Sep 29 '14 at 16:05
  • 1
    By the way, the dataset concept is not unique to Jena Fuseki; it's quite central in SPARQL. A dataset is a collection of named graphs and a default graph. – Joshua Taylor Sep 29 '14 at 16:08
  • @JoshuaTaylor The confusion came from the need to keep several data set configuration in Pubby for displaying different URIs and I totally forgot about named graph, even though I use them almost daily... – paxRoman Sep 29 '14 at 19:02

1 Answers1

4

The dataset concept is not unique to Jena Fuseki; it's quite central in SPARQL. A dataset is a collection of named graphs and a default graph. The prefix of a URI has nothing to do with where triples about it are stored (whether in a named graph or in the default graph).

It sounds like you want to keep your ABox triples in one named graph and your TBox triples in another. Then, if the default graph is the union of the named graphs, you'll see the contents of both in the default graph. You can do that in Fuseki.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353