On 01/10/15 10:23, Miika Alonen wrote:
Hi,

Fuseki 2.3.0 doesnt seem to return prefixes and namespaces from 
text:TextDataset with graph protocol. You would expect that these return the 
same result:

Hi Miika,

I tried your example and it works for me.

If you loaded from N-triples or with a bulk loader there aren't any prefixes (the bulk loaders do now, post the last releases, save the prefixes).

IIRC CONSTRUCT gets its prefixes from the query.


GET /textDataset?default HTTP/1.1

which does not agree with the configuration below ...

The form "/dataset?default", directly using the graph store protocol on the dataset, rather than "/dataset/data?default", got fixed recently (post the last releases). That might accoutn for twhat you are seeing (if it worked at all).

        Andy

Host: localhost:3030
Accept: text/turtle; charset=utf-8
and

CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o }


but graph protocol from TextDataset returns expanded content (without prefixes 
and namespaces), while CONSTRUCT queries returns compact data with prefixes and 
namespaces.

I'v tried couple of configurations with the same result and it doesnt seem to 
matter if the TDB dataset is called trough separate service. Am i missing 
something or is this a bug or a feature? :)

So directly on the TDB service, no text dataset, also does not have prefixes? See above - looks like there aren't any loaded.


My current "simplified" configuration is:

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


[] rdf:type fuseki:Server ;

fuseki:services (
<#TestService>
) .

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

# Text
[] ja:loadClass "org.apache.jena.query.text.TextQuery" .
text:TextDataset rdfs:subClassOf ja:RDFDataset .
text:TextIndexLucene rdfs:subClassOf text:TextIndex .

<#TestService> rdf:type fuseki:Service ;
fuseki:name "search" ;
fuseki:dataset <#text_dataset> ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceUpload "upload" ;
.

<#text_dataset> rdf:type text:TextDataset ;
text:dataset <#dataset> ;
text:index <#indexLucene> ;
.

<#dataset> rdf:type tdb:DatasetTDB ;
tdb:location "TEST_TDB" ;
tdb:unionDefaultGraph true ;
.

<#indexLucene> a text:TextIndexLucene ;
text:directory <file:Lucene> ;
text:entityMap <#entityMap> ;
.

<#entityMap> a text:EntityMap ;
text:entityField "uri" ;
text:graphField "graph" ; ## enable graph-specific indexing
text:defaultField "label" ; ## Must be defined in the text:map
text:map (
# rdfs:label
[ text:field "label" ;
text:predicate rdfs:label ;
text:analyzer [ a text:LowerCaseKeywordAnalyzer ] ]
# rdfs:comment
[ text:field "comment" ;
text:predicate rdfs:comment ;
text:analyzer [ a text:LowerCaseKeywordAnalyzer ] ]
) .


Best Regards,
Miika Alonen

CSC - IT Center for Science
[email protected]


Reply via email to