I have a problem with the command line tools of Apache Jena. I want to create a tdb2 database for a big turtle file. For this reason I used the tdb2.loader command as follows:
tdb2.tdbloader --loc ~/indexer ~/indexer/test.ttl
My test.ttl file contains entries of the form:
@prefix bbase: <http://data.bibbase.org/ontology/#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix dblp: <https://dblp.org/rdf/schema-2017-04-18#>
<https://dblp.org/rec/conf/romoco/Siegwart13>
a dblp:Publication ;
owl:sameAs <http://dx.doi.org/10.1109/RoMoCo.2013.6614591> ;
dblp:authoredBy <https://dblp.org/pers/s/Siegwart:Roland> ;
dblp:bibtexType bbase:Inproceedings ;
dblp:listedOnTocPage <https://dblp.org/db/conf/romoco/romoco2013> ;
dblp:pageNumbers "98" ;
dblp:primaryElectronicEdition <https://doi.org/10.1109/RoMoCo.2013.6614591> ;
dblp:doi "10.1109/RoMoCo.2013.6614591";
dblp:publicationType dblp:Inproceedings ;
dblp:publishedAsPartOf <https://dblp.org/rec/conf/romoco/2013> ;
dblp:publishedInBook "RoMoCo" ;
dblp:title "Design and navigation of wheeled, running, swimming and flying robots." ;
dblp:yearOfPublication "2013" .
...
Now my problem is that if I query the output (tdb2 file), by using the tdb2.tdbquery command, an empty table will be the result. My query searches for all entities having a dblp:doi property and the result should not be an empty table as you can see on the example above. My query file looks als follows:
PREFIX dblp: <https://dblp.org/rdf/schema-2017-04-18#>
SELECT *
WHERE{
?s dblp:doi ?o .
}
And my my tdb2.query command looks as follows:
./tdb2.tdbquery --loc=~/indexer/Data-0001 --query=~/indexer/query.rq
No matter what I'm doing, my result is always:
---------
| s | o |
=========
---------
If I query the .ttl-files directly with the sparql command in the same manner as I use the tdb2.query command, I will get a reasonable result containing some entries.
Unfortunately I cannot find an answer to my question, neither in the Jena documentation nor in this forum. Can someone give me an answer or at least a hint what might go wrong?
Thanks in advance for your help!
Your --loc
parameter on the query should be the location where you created the TDB2 database i.e. ~/indexer