Reputation: 1304
I am new to Jenna TDB and Fuseki. I would like to load Lehigh University Benchmark (LUBM) data generated with their data generator (ver.1.7) in to Fuseki. This is about 400 .owl files. used the following Configuration file, that comes with Fuseki for inferencing:
<#service1> rdf:type fuseki:Service ;
fuseki:name "inf" ; # http://host/inf
fuseki:serviceQuery "sparql" ; # SPARQL query service
#fuseki:serviceUpdate "update" ;
fuseki:serviceReadWriteGraphStore "data" ;
# A separate read-only graph store endpoint:
fuseki:serviceReadGraphStore "get" ;
fuseki:dataset <#dataset> ;
.
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model_inf> ;
.
<#model_inf> a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
] .
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "myDB" ;
tdb:unionDefaultGraph true ;
.
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#tdbDataset> .
Fuseki starts without any issues. However when I execute the following command:
./s-put http://localhost:3030/inf/data default ~/Owl/univ-bench.owl
I get the an error:405 HTTP method PUT is not supported by this URL http://localhost:3030/inf/data?default
I have couple of questions:
1.The update in the config file is clearly not disabled, so why do I get this message.
2.In order to load all the 400 .owl file as one graph apparently I have to disable the update and enable tdb:unionDefaultGraph true
(This is mentioned in the config file that came with Fuseki) if that is the case how on earth am I suppose to load the data to Fuseki.
Please let me know what am I missing here and how I can do this correctly.
Thanks in advance for the help.
Edit: I found out that you will need to add the following:
fuseki:serviceReadWriteGraphStore "data" ;
# A separate read-only graph store endpoint:
fuseki:serviceReadGraphStore "get" ;
in order to be able to use s-put
to load data, however every time I add a new file it overwrites the data from the previous file and therefore the inferencing doesn't work. What did I do wrong here? How do I load the data correctly that all the files are loaded to the same graph and inferencing work?
Edit So digging more in to this problem I found out that there are two ways to load the data.
you can add the following where you define the model in the config file:
ja:content [ja:externalContent <file://// Path_to_owl_file >] ;
So for me I added it under <#model_inf> a ja:InfModel ;
However, if you have 400 files that will be really tedious.
You can separately loaded the data using tdbloader2
and point the config file to the directory that the tdbload builds as a database. Which is also described here
$ tdbloader2 --loc tdb PATH_TO_DIR_or_OWL_Files
The issue currently is that when I run a simple query for instance the following query I get a Out of memory error.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ub: <http://cs.uga.edu#>
SELECT *
WHERE
{
?X rdf:type ub:GraduateStudent .
?X ub:takesCourse <http://www.Department0.University0.edu/GraduateCourse0>
}
I increased the memory for Fuseki-Server (int the server script) to up to 5GB and still get a out of memory error for this simple query. Any idea why that might be happening?
Upvotes: 1
Views: 1722
Reputation: 16690
s-put does a PUT - which is defined to be a "replace contents".
Use s-post to add to a graph.
LUBM is sufficiently simple in structure that (1) it is not very realistic and (2) inference can be applied to each university alone and the data loaded so at query time, it has all been expanded.
Upvotes: 0