W3C home > Mailing lists > Public > public-owl-dev@w3.org > January to March 2010

Re: Property and Value Inheritance down Subclasses

From: Azhar Jassal <az.jassal@googlemail.com>
Date: Mon, 8 Mar 2010 14:59:00 +0000
Message-ID: <f8212dcc1003080659n5e8ca4d8i7e0c766fc953923b@mail.gmail.com>
To: Uli Sattler <sattler@cs.man.ac.uk>, public-owl-dev@w3.org
Hi,

Thanks for your help.. I am trying to determine if what I would like to do
is possible with OWL. In a nutshell what I'm looking for is property
propagation down classes like in a OODB.

For example, in the code below, I have managed to get Rev1 to inherit the
value of title from Rev. After reasoning, Rev1 shows the value of title as
"Original Title". At Rev2, I try to change the value of title but now after
reasoning have two values, "Original Title" and "New Title" whereas I just
required "New Title". If it had worked, I would of created a Rev3 which
should hold the title, "New Title" from Rev2.

Is this sort of hierarchical data set/ property propagations possible with
OWL or have I really mixed up the line between a OODB and OWL?


@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix ex: <http://www.example.org/> .

ex:title rdf:type owl:DatatypeProperty.

ex:Rev rdfs:subClassOf [
a owl:Restriction;
owl:onProperty ex:title;
owl:hasValue "Original Title";
].

ex:Rev1 rdf:type ex:Rev.

ex:Rev2 rdf:type ex:Rev.
ex:Rev2 ex:title "New Title".



On Mon, Mar 8, 2010 at 1:58 PM, Uli Sattler <sattler@cs.man.ac.uk> wrote:

> Hi Azhar,
>
> a couple of suggestions:
>
> 1) read the OWL primer http://www.w3.org/TR/2009/REC-owl2-primer-20091027/or follow an OWL tutorial, look at existing examples
>
> 2) don't try to write OWL per hand in triples. Use an editor such as
> Protege 4, and use some of its more human readable syntaxes such as
> Manchester syntaxes if need be (you can always translate into triples later
> if you need to do this for some reason)
>
> On 5 Mar 2010, at 16:33, Azhar Jassal wrote:
>
> Hi,
>
> I'm running Joseki+Pellet. I want the properties and corresponding values
> of a Class to be inherited down its subclasses.
>
> So for instance, with the code below, I want <urn:ITEM:1234:REV-1> to
> inherit the value of myitem:title from its parent..
>
>
> you need to be more specific: what do you mean by this?
>
> So after inference <urn:ITEM:1234:REV-1> returns the myitem:title value of
> "Original Name".
>
> Please can someone show me how I should write this in Triples, as what I
> have below does not give me a title value for <urn:ITEM:1234:REV-1>after
> reasoning by Pellet.. Any help or guidance will be highly valued!
>
>
> you have two instances, <urn:ITEM:1234:info> and <urn:ITEM:1234:REV-1>, of
> the classes myitem:info and of one of its subclasses myitem:rev,
>  respectively. Do you want <urn:ITEM:1234:REV-1> have *the same value*
> for myitem:title as <urn:ITEM:1234:info>? This isn't what is commonly
> understood as inheritance? If you really want to "infer" that
>
> <urn:ITEM:1234:REV-1>  myitem:title "Original Name"
>
> then you would need to use some work-around, I am afraid...this is nothing
> supported by OWL directly. One of the questions you'd need to ask is whether
> you are really using 'classes' in the best way, or whether perhaps <
> urn:ITEM:1234:REV-1> is a *part* of <urn:ITEM:1234:info>?
>
> Cheers, Uli
>
>
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
> @prefix myitem: <http://www.myitem.com/meta/> .
> @prefix dc: <http://purl.org/dc/elements/1.1/> .
>
> myitem:info rdf:type rdf:Class .
> myitem:title rdf:type rdf:Property ..
>
> myitem:title rdfs:domain myitem:info .
> myitem:title rdfs:range dc:title .
>
> myitem:rev rdfs:subClassOf myitem:info .
>
> <urn:ITEM:1234> rdf:type myitem:Product .
>
> <urn:ITEM:1234> dc:identifier <urn:ITEM:1234> .
>
> <urn:ITEM:1234:info> rdf:type myitem:info .
> <urn:ITEM:1234:info> myitem:title "Original Name" .
>
> <urn:ITEM:1234:REV-1> rdf:type myitem:rev .
>
>
>
Received on Monday, 8 March 2010 14:59:34 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 27 March 2013 09:32:58 GMT