Thanks Dave.

I think I have run into the reasoner OWA principles which have been perpetually 
confusing to me.


According to the specs,
The owl:allValuesFrom restriction requires that for every instance of
the class that has instances of the specified property, the 
values of the property are all members of the class indicated by the 
owl:allValuesFrom clause. 


Which means if I add a min cardinality, it means that PotentialCustomers have 
one proposedScheme pointing to individuals from 'Scheme'. Is this correct ?


    <owl:Class rdf:about="&v1;PotentialCustomer">
        <rdfs:subClassOf rdf:resource="&v1;Customer"/>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&v1;proposedScheme"/>
                <owl:minCardinality 
rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&v1;proposedScheme"/>
                <owl:allValuesFrom rdf:resource="&v1;Scheme"/>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>

Lets assume there is no reasoner and I explicitly created a typed 
PotentialCustomer and try to add a 'proposedScheme' value a) which isn't an 
instance of Scheme and b) not add the 'proposedScheme' at all.


Will Jena throw a validation error ? 


thanks,
Sourajit


________________________________
From: Dave Reynolds <[email protected]>
To: sourajit basak <[email protected]>
Cc: "[email protected]" <[email protected]>
Sent: Thursday, 18 August 2011 7:43 PM
Subject: Re: basic inference capabilities in Jena

Hi,

On Thu, 2011-08-18 at 06:14 -0700, sourajit basak wrote: 
> Suppose I have two class definition like -
> 
> 
> <owl:Class rdf:about="&v1;Customer">
>     <!-- property restrictions -->
> 
>  </owl:Class>
> 
>  <owl:Class rdf:about="&v1;PotentialCustomer">
>         <rdfs:subClassOf rdf:resource="&v1;Customer"/>
>         <rdfs:subClassOf>
>             <owl:Restriction>
>                 <owl:onProperty rdf:resource="&v1;proposedScheme"/>
>                 <owl:allValuesFrom rdf:resource="&v1;Scheme"/>
>             </owl:Restriction>
>         </rdfs:subClassOf>
>   </owl:Class>
> 
> At runtime, I create an instance of Customer and explicitly assert the type. 
> However, for PotentialCustomer, I don't explicitly assert a type but only set 
> the 'proposedSchema' property. If I query for PotentialCustomers, will Jena 
> list correctly. This inferring of triples is a feature handled by reasoners 
> but I am trying to avoid using reasoners when my system is online.

The short answer is "no" but for two different reasons :)

First, unless there is a reasoner running then jena won't see any
inferred types, it is not baked into the API itself somehow - no
inference engine then no inferences. 

So you'll need to either assert the type explicitly, run a reasoner or
run some custom special-purpose reasoner-lite code which asserts the
type based on your assertion of proposedScheme.

Second, note that the open-world assumption means that even a complete
reasoner can't deduce something is a PotentialCustomer just because it
is a Customer and has a proposedScheme value pointing to some Scheme.
That's because there could be other proposedScheme values which aren't
schemes so the reasoner can't be certain the "allValuesFrom" is
satisfied. You might mean that a PotentialCustomer is anyone who has
some proposedScheme in which case use someValuesFrom (or cardinality).

Dave

Reply via email to