Date: 2009-09-03 13:07:46
From: J.Petrak-at-dcs.shef.ac.uk
I am using Sesame2.3-pr1 together with OWLIM3-beta10
and have had very odd problems with the following
SERQL query:
select distinct A FROM {A} rdfs:subClassOf {_:bnodenn}
WHERE A!=x:theClass MINUS
select distinct B FROM {B} owl:equivalentClass {_:bnodenn}
This query consistently returned some _:bnodeXY in the result set
that was quite definitely an owl:equivalentClass of _:bnodenn
In other words, running the query
select distinct B FROM {B} owl:equivalentClass {_:bnodenn}
indeed DID return _:bnodeXY and yet it is also included in the
result set for the original query where the MINUS operator should
have removed it!
If I instead use this query:
select distinct A FROM {A} rdfs:subClassOf {_:bnodenn}
WHERE A!=x:theClass AND A!=ALL (
select distinct B FROM {B} owl:equivalentClass {_:bnodenn})
_:bnodeXY is correctly not in the result set any more.
I tried to re-creating the repository and I tried all combinations
of owl-max with partialRDFS, no partialRDFS, persistent and not
persistent and in all cases the same incorrect output of
the first query is created (of course, each time the actual
blank node ids are different)
I also tried this with a native repository with rdfs and direct
type inference and there, this problem did not occur.
I have trouble to see how this can be anything else but a bug:
Should not the output of
SetA MINUS SetB
always be exactly identical to
elements el from SetA WHERE el != ALL SetB?
Cheers,
Johann

asked 02 Apr '13, 12:30

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k142160227
accept rate: 30%

edited 17 Apr '13, 09:47

nkrustev's gravatar image

nkrustev ♦♦
66117


Date: 2009-10-03 13:10:36
From: J.Petrak-at-dcs.shef.ac.uk
It turns out that this is neither an OWLIM nor
a Sesame bug, but a change in the specification
between Sesame1 and Sesame2 (although not really explicitly
documented in the Sesame2 docs I think).
Thanks Marin for pointing me in the right direction!
Cheers,
Johann
I asked on the Sesame mailing list about this and got the following
reply:
link

answered 02 Apr '13, 12:30

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k142160227
accept rate: 30%

edited 17 Apr '13, 09:47

nkrustev's gravatar image

nkrustev ♦♦
66117

Date: 2009-10-02 16:23:58
From: marin.nozhchev-at-ontotext.com
Hi Johann,
Apparently, Sesame expects the names of the columns in queries linked by 
MINUS to be the same.
So
select distinct A FROM {A} rdfs:subClassOf {_:bnodenn}
WHERE A!=x:theClass MINUS
select distinct B FROM {B} owl:equivalentClass {_:bnodenn}
won't work, but
select distinct A FROM {A} rdfs:subClassOf {_:bnodenn}
WHERE A!=x:theClass MINUS
select distinct A FROM {A} owl:equivalentClass {_:bnodenn}
works!
There is some sense in it though. Consider that table operation:
fruit        | vegetable
--------------------
apple     |  potato
grapes   |  tomato
MINUS
vegetable |  fruit
-----------------
potato     |  apple
It will correctly return
fruit        | vegetable
---------------------
grapes   |  tomato
It's not very well described in the Sesame documentation - 
http://www.openrdf.org/doc/sesame2/users/ch09.html#d0e2194 - but that 
behavior doesn't contradict what's written there.
Hope this helps,
Marin
link

answered 02 Apr '13, 12:30

Discussion-Board-Archive's gravatar image

Discussion-B...
6.1k142160227
accept rate: 30%

edited 17 Apr '13, 09:47

nkrustev's gravatar image

nkrustev ♦♦
66117

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:

×261
×242
×18

Asked: 02 Apr '13, 12:30

Seen: 1,081 times

Last updated: 17 Apr '13, 09:47

powered by BitNami OSQA