On 14/09/11 17:26, Tim Harsch wrote:
I used the TDB example config to create the config below. It should
allow me to use FROM and FROM NAMED clauses to alter the dataset queried
from the TDB quads, (with named graphs loaded). But not attempt to load
RDF from the web. It appears it attempts to still fetch documents from
web, as I usually get URL not found message from Joseki. Is this a bug?
or something I'm doing wrong?

Thanks,
Tim

Hi Tim,

Joseki does dataset processing before the request gets to TDB hence the attempt to load from the web.

Fuseki (=Joseki4) should this right. In Fuseki, the handling of FROM-web loading is delegated to service. There are two kinds of service - dataset-backed and a general executor that has no background data. That means the one case of having FROM-web loading AND a fixed dataset isn't supported on the same service endpoint; it can be added but I haven't seen it used to effect.

So in Fuseki, the dataset gets to see the whole request, and decide what to do with FROM. And so TDB handles it as a restriction over the configured dataset.

While we get sorted out with Apache release process, the current development snapshot of 0.2.1 is the best to use (include draft configuration file support, simpler but not compatible with Joseki).

        Andy





@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>  .
@prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>  .
@prefix xsd:<http://www.w3.org/2001/XMLSchema#>  .

@prefix module:<http://joseki.org/2003/06/module#>  .
@prefix joseki:<http://joseki.org/2005/06/configuration#>  .
@prefix ja:<http://jena.hpl.hp.com/2005/11/Assembler#>  .
@prefix sdb:<http://jena.hpl.hp.com/2007/sdb#>  .
@prefix tdb:<http://jena.hpl.hp.com/2008/tdb#>  .

<>  rdfs:label "Joseki Configuration File - TDB example" .
# Stripped down to support one service that exposes an
# TDB store as a SPARQL endpoint for query.

[]  rdf:type joseki:Server .

## --------------------------------------------------------------
## Services

<#service1>
     rdf:type            joseki:Service ;
     rdfs:label          "SPARQL-TDB" ;
     joseki:serviceRef   "sparql" ;          # web.xml must route this name to 
Joseki
     joseki:dataset<#dataset>  ;
     joseki:processor    joseki:MyProcessorSPARQL ;
     .



## --------------------------------------------------------------
## Datasets

## Initialize TDB.

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

## ---- A whole dataset managed by TDB
<#dataset>  rdf:type      tdb:DatasetTDB ;
     tdb:location "icdTest" ;
     .


## --------------------------------------------------------------
## Processors

joseki:MyProcessorSPARQL
     rdfs:label "SPARQL processor with no web loading" ;
     rdf:type joseki:Processor ;
     module:implementation
     [   rdf:type   joseki:ServiceImpl ;
         module:className<java:org.joseki.processors.SPARQL>
     ] ;

     # This processor will accept queries with FROM/FROM NAMED
     joseki:allowExplicitDataset       "true"^^xsd:boolean ;
     joseki:allowWebLoading            "false"^^xsd:boolean ;
     # The database is safe for MRSW (multiple-reader, single-writer).
     joseki:lockingPolicy              joseki:lockingPolicyMRSW ;
     .

Reply via email to