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: "Patrick Cassidy" <pat@xxxxxxxxx>
Date: Sat, 25 Jul 2009 23:55:28 -0400
Message-id: <022501ca0da4$ea79aa00$bf6cfe00$@com>
Garz,
  To answer the question:
[Garz] > 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?
  Yes, it is true that instances of a subclass can have properties that are
not *required* in the parent class.  That is the most common difference
between a subclass and its parent.  But recall that instances of a subclass
are **also** instances of the parent class - so it is not possible to assert
that instances of the parent class *cannot* have the distinctive property of
the subclass - that would be a contradiction.  Likewise, if one requires
instances of a parent class to have a certain property, and then asserts
that instances of a subclass have a contradictory property, that would also
be a contradiction.
   I think we both understand the principle involved here, but I am
concerned that saying that instances of a parent class *do not* have a
property of the subclass may lead to the interpretation that instances of
the parent class *cannot* have a property present in a subclass, which would
be erroneous.  In the wine example, we could *not* say that instances of a
"PotableLiquid" cannot have a maker; but that property is not required for
all instances of PotableLiquid, only for some instances.    (01)

Pat    (02)

Patrick Cassidy
MICRA, Inc.
908-561-3416
cell: 908-565-4053
cassidy@xxxxxxxxx    (03)


> -----Original Message-----
> From: ontolog-forum-bounces@xxxxxxxxxxxxxxxx [mailto:ontolog-forum-
> bounces@xxxxxxxxxxxxxxxx] On Behalf Of garz
> Sent: Saturday, July 25, 2009 10:49 AM
> To: [ontolog-forum]
> Subject: Re: [ontolog-forum] When to use pure subclassing and when to
> use subclassing by intersecting
> 
> Hi Patrick,
> 
> 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.
> 
> 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?
> 
> 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
> 
> in the food.rdf, there are the classes:
> <owl:Class rdf:ID="ConsumableThing"/>
> 
> <owl:Class rdf:ID="PotableLiquid">
> <rdfs:subClassOf rdf:resource="#ConsumableThing"/>
> <owl:disjointWith rdf:resource="#EdibleThing"/>
> </owl:Class>
> 
> 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</o
> wl:cardinality>
>    </owl:Restriction>
> </rdfs:subClassOf>
> .....
> </owl:Class>
> 
> <owl:ObjectProperty rdf:ID="hasMaker">
> <rdf:type
> rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
> </owl:ObjectProperty>
> 
> 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.
> 
> 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.
> 
> Best regards
> Mario Uhlig
> 
> 
> 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
> >
> >
> >
> 
> 
> _________________________________________________________________
> 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
>     (04)


_________________________________________________________________
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    (05)

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