ontolog-forum
[Top] [All Lists]

Re: [ontolog-forum] When to use pure subclassing and when to use subclas

To: "[ontolog-forum]" <ontolog-forum@xxxxxxxxxxxxxxxx>
From: garz <garz@xxxxxxx>
Date: Sat, 25 Jul 2009 16:49:08 +0200
Message-id: <4A6B1B64.700@xxxxxxx>
Hi Patrick,    (01)

i'm an object-oriented programmer, maybe thats why i have problems 
understanding the concepts of an ontology. I dont want to model 
anything, i want to write some components that enable you to create and 
use ontologies in a some program. Therefor i need to understand the 
concepts, so that those components can offer the full spectrum and in a 
convenient way.    (02)

In object-oriented programming there are also classes and inheritance. 
There i subclass a class so that i can add new properties to it (besides 
adding new methods, which arent relevant for ontologies). You write, 
that i cant have properties in a subclass that arent also in the 
parentclass, but instances of a subclass can have properties that 
instances of the superclass dont have because those properties arent 
required in the superclass, but are required in the subclass. Is that right?    (03)

my question arose by studying the two example ontologies food.rdf and 
wine.rdf in the ontology guide on the w3-site:
http://www.w3.org/TR/2004/REC-owl-guide-20040210/food.rdf
http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine.rdf    (04)

in the food.rdf, there are the classes:
<owl:Class rdf:ID="ConsumableThing"/>    (05)

<owl:Class rdf:ID="PotableLiquid">
<rdfs:subClassOf rdf:resource="#ConsumableThing"/>
<owl:disjointWith rdf:resource="#EdibleThing"/>
</owl:Class>    (06)

and in the wine.rdf there is the class:
<owl:Class rdf:ID="Wine">
<rdfs:subClassOf 
rdf:resource="http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid"/>
<rdfs:subClassOf>
   <owl:Restriction>
      <owl:onProperty rdf:resource="#hasMaker"/>
         <owl:cardinality 
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger";>1</owl:cardinality>
   </owl:Restriction>
</rdfs:subClassOf>
.....
</owl:Class>    (07)

<owl:ObjectProperty rdf:ID="hasMaker">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
</owl:ObjectProperty>    (08)

Here, the class Wine defines new properties, that the class 
PortableLiquid doesnt posses. But this is done via anonymous classes 
that are defined between the <rdfs:subClassOf>-tags? So the Wine class 
is subclass of PortableLiquid and a anonymous class that defines the 
property hasMaker and that it this property required, right? So to say, 
the new properties that the Wine class posseses are tricked into the 
Wine class? Tricked because subclasses cant have new properties, like 
you wrote respectively like i hope to have understood it in the right way.    (09)

I want to very much thank you, both Patrick and Alex, for taking your 
time to answer my questions.
@Alex, i will come back to your explanation, as soon as i understand a 
little more.    (010)

Best regards
Mario Uhlig    (011)


Patrick Cassidy schrieb:
> Garz,
>    I am not quite clear about the question, and the distinctions you are
> making.   Every subclass merely picks out of some parent class instances
> that have specific properties.  So you cannot have in a subclass properties
> that are not also in the parent class, but you can *require* that the
> instances of the subclasses have a specific property, even if that property
> is not "mentioned" (i.e. not required) for every instance of the parent
> class.
>
>   The term "intersection" is usually used to refer to an intersection of
> classes - the intersection is the class of entities, each of which is an
> instance of both parent classes.  That intersection is a subclass of each of
> the parent classes.  If you have a class of "RedThings" (anything that is
> red) and a class of "Wines" and you define a class of "RedWines" it could be
> a subclass of both RedThings and of "Wines", and would be the same as the
> intersection of "RedThings" and "Wines", unless you also add other
> restrictions to the "RedWines" class.  [[ this is a bad example, because
> colors are too heterogeneous in application for "RedThings" to be a useful
> class]].  You seem to be using "intersection" in a different sense.
>
>   Perhaps you could give a more specific example of what you would like to
> do.
>
> Pat
>
> Patrick Cassidy
> MICRA, Inc.
> 908-561-3416
> cell: 908-565-4053
> cassidy@xxxxxxxxx
>
>
>   
>> -----Original Message-----
>> From: ontolog-forum-bounces@xxxxxxxxxxxxxxxx [mailto:ontolog-forum-
>> bounces@xxxxxxxxxxxxxxxx] On Behalf Of garz
>> Sent: Friday, July 24, 2009 12:35 PM
>> To: ontolog-forum@xxxxxxxxxxxxxxxx
>> Subject: [ontolog-forum] When to use pure subclassing and when to use
>> subclassing by intersecting
>>
>> Hi,
>>
>> i'm trying to create an ontology and there is a problem that i have in
>> understanding the difference between a pure subclass and a subclass
>> defined as intersection. my own explanation for this is the following:
>>
>> a subclass defined as intersection relates to the properties the
>> superclass has and constraints them. for example redwine constraints
>> the
>> property color of the superclass wine by constraining its value to red.
>> redwine is like an aspect or a view on a class, in this case on the
>> aspect color. or its like an alias picking a subset out of the related
>> superclass. a class defined that way introduces a new concept or term
>> by
>> just using the already existing, its not capable of creating new
>> content, so to speak.
>>
>> a pure subclass should then be used, if there is something new to it,
>> represented as a property that isnt mentioned in the superclass and the
>> subclass is free to introduce this property or not. if the property
>> already was in the superclass, a subclass defined by intersection would
>> be sufficient.
>>
>> am i correct with this thinking? i dont really get it. or is
>> intersection always applicable, but in this case i really dont
>> understand the sense behind it. plz enlighten me.
>>
>> regards
>>
>> _________________________________________________________________
>> Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/
>> Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/
>> Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
>> Shared Files: http://ontolog.cim3.net/file/
>> Community Wiki: http://ontolog.cim3.net/wiki/
>> To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J
>> To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx
>>
>>     
>
>  
> _________________________________________________________________
> Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/  
> Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/  
> Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
> Shared Files: http://ontolog.cim3.net/file/
> Community Wiki: http://ontolog.cim3.net/wiki/ 
> To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J
> To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx
>  
>
>       (012)


_________________________________________________________________
Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/  
Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/  
Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
Shared Files: http://ontolog.cim3.net/file/
Community Wiki: http://ontolog.cim3.net/wiki/ 
To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J
To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx    (013)

<Prev in Thread] Current Thread [Next in Thread>