1

In thingweb-repository in file ThingDescriptionCollectionHandler.java on line 173:

tdb = dataset.getDefaultModel();
tdb.createResource(resourceUri.toString()).addProperty(DC.source, data);

Question: I am trying to write a SPARQL query to run against the default graph of a dataset to check if the data is present and return that data resourceUri from the graph.

I tried to follow different tutorials of writing a SPARQL query but did not succeed so far. Any suggestion how to write a query against dataset default graph and which parameters are there in Jena RDF Dataset that can be queried?

UninformedUser
  • 8,397
  • 1
  • 14
  • 23
SHAHS
  • 462
  • 1
  • 5
  • 13
  • 1
    It's not clear which query you tried and how. Basically, if you do not specify a graph, the default graph will be used. That means, it should work with any dataset resp. model – UninformedUser Mar 06 '17 at 20:05

1 Answers1

3

I think you want something like:

SELECT ?s ?p ?o
WHERE {GRAPH <urn:x-arq:DefaultGraph> { ?s ?p ?o.} }

You should take a look at this part of the docs. Jena special graph names

chrisis
  • 1,983
  • 5
  • 20
  • 17