Thanks for the full disclosure. 

Milorad




>________________________________
> From: Dave Reynolds <dave.e.reyno...@gmail.com>
>To: users@jena.apache.org 
>Sent: Tuesday, January 7, 2014 9:53 PM
>Subject: Re: is there reasoning outside a reasoner in Jena?
> 
>
>On 07/01/14 16:40, Milorad Tosic wrote:
>> Dave,
>>
>> Thanks for answering the original question. However, I am curious to see 
>> where the discussion could continue to:
>>
>> As you pointed out, the meaning of the 'reasoning' and 'underneath' is 
>> actually what is confusing here. Meaning of the listSuperClasses(?RESOURCE) 
>> term in the OntAPIĀ  (from my point of view that we can not distinguish from 
>> some other possible interpretations?) is interpreted as follows:
>>
>> SELECT DISTINCT ?sc WHERE { ?RESOURCE rdfs:subClassOff ?sc . }
>>
>> So, in the RDF language, the listSuperClasses(?RESOURCE) should return 
>> immediate ancestors of the ?RESOURCE.
>
>Sorry, I should have been clearer.
>
>The point is that listSuperClasses(true) forces the call to return only 
>the direct/immediate ancestors. That is not necessarily the result of 
>your query - it is perfectly possible for the RDF to contain additional 
>rdfs:subClassOf assertion (or even the complete rdfs:subClassOf 
>closure). If there is a reasoner present that supports transitive 
>reasoning then this will have computed the transitive reduction to find 
>the immediate ancestors amongst all those that are asserted. So in that 
>case we can query for the transitively-reduced version of the relation 
>which the transitive reasoner allows you to do. If there is no reasoner 
>then the OntClass code does a check and eliminates from the list of 
>returned classes all those for which there's a longer superClassOf route.
>
>This is all an explicit part of the contract and is spelled out in the 
>Javadoc so there is no ambiguity.
>
>You are right that with direct=false (or equivalently with no argument 
>at all) then it just returns the results that are present in the RDF. It 
>doesn't compute the transitive closure. If there's a reasoner present 
>you see the closure, if there is not then you don't.
>
>> In my opinion, any additiional information returned by the query must be 
>> explicitly specified by rules encapsulated within a reasoner.
>
>Yes and that's the contract unless there is some special meaning of the 
>call specified such as the direct case. Indeed in that case it is not 
>returning additional results it is return less results as a result of 
>the algorithm :)
>
>> Evidently, a restriction would be represented in the result set by a blank 
>> node (BN). So, by 'underneath' I mean do not decide about implicit meaning 
>> of blank nodes that exactly must bu done here if we want to make any further 
>> conclusion about super-classes. My feeling is that we would be much safer if 
>> we do not make any further assumptions and say ".. well, we do not know 
>> about BNs" - that actually is exactly what you did in code. Right?
>
>Can't follow that. Only the reasoners handle restrictions specially. The 
>OntAPI just returns the restriction resource (whether it's a URI 
>resource or a bNode), as far as it cares it's just a resource.
>
>
>Dave
>
>>
>> Milorad
>>
>>
>>
>>
>>> ________________________________
>>> From: Dave Reynolds <dave.e.reyno...@gmail.com>
>>> To: users@jena.apache.org
>>> Sent: Tuesday, January 7, 2014 2:52 PM
>>> Subject: Re: is there reasoning outside a reasoner in Jena?
>>>
>>>
>>> On 07/01/14 13:28, Milorad Tosic wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm reading the Jena paper [1] (which is very nice and useful, BTW), where 
>>>> I found the following:
>>>>
>>>>
>>>> "Prior to this release, Jena used a heuristic method to attempt to
>>>> associate restriction properties with the classes sub-classing that
>>>> restriction. Since there were problems with precisely defining the
>>>> heuristic, and ensuring correct behaviour (especially with
>>>> inference models), we have dropped the use of this heuristic from
>>>> Jena 2.2 onwards."
>>>>
>>>> Do I misinterpret the statement when I conclude that Jena API does 
>>>> underneath some reasoning independently on the existing reasoner embedding 
>>>> mechanism?
>>>
>>> Depends what you mean by "reasoning" and "underneath".
>>>
>>> There are parts of the OntAPI where you are explicitly asking for things
>>> which a reasoner might have already worked out. For example
>>> listSuperClasses. The implementation for those checks if there is a
>>> reasoner present and if so just queries directly knowing that the
>>> super-class closure is available from the reasoner. If there is no
>>> reasoner then listSuperClasses has to manually iterate over the super
>>> class tree to fulfil its contract. I wouldn't call that reasoning
>>> underneath though - it is just explicit in the API call what is being
>>> returned.
>>>
>>> Generally the OntAPI design tries to leave reasoning to the reasoner and
>>> minimize the number of places like listSuperClasses where there API has
>>> to bridge the gap in the absence of a reasoner.
>>>
>>> Dave
>>>
>>>
>>>
>>>
>>>
>
>
>
>

Reply via email to