Hi, this might be a silly question, but I've just installed GraphDB-Lite locally, and made a new repository through the sesame workbench. I've tried with both OWL2 RL reduced optimized and OWL-horst-optimized as ruleset. Then I've inserted a bunch of ontologies, using

LOAD <someUri> INTO <x://ontologies>

This worked, but I was wondering when I would see infered statements, as my quesies only show the triples that were in the loaded documents, and no infered ones. Then I proceeded with inserting some simple test statements:

x:testClass rdf:type rdfs:Class.
x:testClass2 rdf:type rdfs:Class.
x:testClass2 rdfs:subClassOf x:testClass.
x:testResource rdf:type x:testClass2.

When I describe x:testResource, I get only one triples, where I was expecting to find the inferred:

x:testResource rdf:type x:testClass

Should I indeed expect to see that? What could be going wrong? Or do I need to do something different / extra to turn inference on?

All my queries are executed through the HTTP API btw, like so:

POST http://localhost:8080/openrdf-sesame/repositories/graphdb-test/statements
...
$params = array('update'=>$query,'queryLn'=>'sparql','infer'=>true);

edit: also, I didn't change any setting when creating the repository, I chose a ruleset and set a baseUrl, but left "New triples file" and "Imported RDF files" empty. Also, I tried with rdfs:subPropertyOf examples too without result.

asked 30 Jan '15, 11:59

Flion's gravatar image

Flion
21227
accept rate: 0%

edited 30 Jan '15, 12:41


Hi,

definitely something is not right. Even with the test that you've described should produce inferred triples. The inference is enabled by default, once you've selected a rule-set different than "emtpy". Which version of GraphDB-Lite are you using?

link

answered 02 Feb '15, 09:17

Venelin%20Kotsev's gravatar image

Venelin Kotsev
4212
accept rate: 20%

I reinstalled tomcat server (which cleared previous contents of webapps) but chose some option to keep some data. I then placed openrdf-sesame.war and openrdf-workbench.war from graphdb-lite-6.0.8210.zip in webapps, and went to the sesame workbench, which still contained all previous repositories. I then created 2 new repositories, where I could choose the OWLIM-lite option as type, so I assumed that should work. I think I'll try removing tomcat with all previous data soon...

(04 Feb '15, 06:25) Flion

I just reinstalled. Cleared all data. Former repositories gone. Only 1 GraphDB-Lite repository with OWL-MAX ruleset and the results are the same. I'm doing this on Windows 8.1, tomcat 6.0, graphdb-lite-6.0.8210. Both SELECT * WHERE { <http://www.ex.com/testResource> ?p ?o } and DESCRIBE <http://www.ex.com/testResource> with the test data as in the question above return only the explicit statements that I inserted myself. Not the expected x:testResource rdf:type x:testClass

(04 Feb '15, 07:46) Flion

You could check the the first 4 lines of the storage/owlim.properties file in your repository, to see the number of explicit and total statements. If these are the same, then the inference is somehow not enabled. All the rulesets support such type/subClassOf inference (rdfs, owl-horst + their optimized versions).

link

answered 04 Feb '15, 03:30

mitac's gravatar image

mitac ♦♦
963
accept rate: 28%

the .properties file for both GraphDB repositories I created (with different rule systems) only show: 1) #BNodes created so far 2)#Sun Feb 01 14:10:43 CET 2015 3 & 4) namespace-mapping 5) bnodes=1 6-x) namespace mapping

(04 Feb '15, 06:19) Flion

I just reinstalled tomcat completely and made a fresh install of GraphDB-Lite. The test-repo/storage/sail.properties contains the same content as above. This is for a repository with OWL-MAX ruleset. So I'm not sure what you mean with the number of explicit and total statements. Should I be seeing that or do you mean a different file?

(04 Feb '15, 07:43) Flion

It's working now!

The error was in my own code that sends the HTTP requests. I was sending the parameter 'infer'=>true for both update queries and select queries.

Then I checked with sesame's system documentation again, which sais:

'infer' (optional): Specifies whether inferred statements should be included in the query evaluation. Inferred statements are included by default. Specifying any value other than "true" (ignoring case) restricts the query evluation to explicit statements only.

So I changed my code to 'infer'=>"true", inserted another triple, and there it was: the inferred x:testResource rdf:type x:testClass.

Hooray! Tnx for the help.

link

answered 04 Feb '15, 08:05

Flion's gravatar image

Flion
21227
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×18
×13
×13
×2

Asked: 30 Jan '15, 11:59

Seen: 3,187 times

Last updated: 17 Jul, 05:54

powered by BitNami OSQA