I'm trying to load some data into named graphs in TDB and then query back with 
Fuseki. Perhaps I am doing something ridiculously stupid here having never 
worked with quads and named graphs before....

For my test case I have about 5 million quads I am trying to load into one 
named graph, here is a sample of some:

<http://example.com/sections/FFF9AF7F-54DF-53A5-E2A1-E08F4F7C270F> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> 
<http://example.com/items/6226E191-0A32-F348-8F38-AABDBC73EE83>  
<http://example.com/> .
<http://example.com/sections/FFF9AF7F-54DF-53A5-E2A1-E08F4F7C270F> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#_9> 
<http://example.com/items/0FBFA283-11EB-1A04-1F68-F8B36E03F932>  
<http://example.com/> .
<http://example.com/sections/FFF9AF7F-54DF-53A5-E2A1-E08F4F7C270F> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://purl.org/vocab/resourcelist/schema#Section>  <http://example.com/> .
<http://example.com/sections/FFF9AF7F-54DF-53A5-E2A1-E08F4F7C270F> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq>  <http://example.com/> .

What I would expect is that each of these quads get loaded into a graph named 
<http://example.com/>

Using tdbloader2, I successfully loaded these into a fresh TDB database 
location.

Start Fuseki 0.2.1-snapshot using this manifest:

@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .

[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB    rdfs:subClassOf  ja:Model .

 <#dataset> rdf:type      tdb:DatasetTDB ;
     tdb:location "/tmp/DBQ-test" ;
     .

I try and submit this test query via the Fueski web interface 
(http://myfusekiserver:3030/sparql.jsp):

select count(?s)
from named <http://example.com/>
where {?s ?p ?o}

Fuseki says:

Error 400: Query may not include a dataset description (FROM/FROM NAMED)


Fuseki - version 0.2.1-SNAPSHOT (Date: 2011-09-08T16:38:26+0000)

Aside: I ran tdbstats on the location where I loaded the quads, I got the 
results I would expect in the stats.opt file:

(stats
  (meta
    (timestamp 
"2011-10-13T10:22:47.351+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>)
    (run@ "2011/10/13 10:22:47 UTC")
    (count 5669532))
  (<http://purl.org/vocab/resourcelist/schema#created> 5037)
  (<http://purl.org/vocab/resourcelist/schema#uri> 21071)
  (<http://lists.talis.com/schema/appConfig#feedbackFunction> 1)
  (<http://purl.org/dc/terms/created> 144982)
....

Thus I would assume my TDB dataset has the correct data in it... Perhaps my 
manifest file is not correct?

Thanks,

Chris

Reply via email to