W3C home > Mailing lists > Public > www-rdf-logic@w3.org > March 2004

Re: Abstract Classes

From: John Colgrave <colgrave@hursley.ibm.com>
Date: Tue, 16 Mar 2004 09:56:50 -0000
To: <www-rdf-logic@w3.org>
Message-ID: <001101c40b3d$0076e900$b4d51409@T30COLGRAVE>

In response to Eric Jain, Peter F. Patel-Schneider wrote:
> > > Maybe  you could explain what you are actually trying
> > > to accomplish here
> > 
> > Given the following class hierarchy:
> > 
> >   <owl:Class rdf:ID="Feature"/>
> > 
> >   <owl:Class rdf:ID="Secondary_Structure_Feature">
> >     <rdfs:subClassOf>
> >       <owl:Class rdf:about="#Feature"/>
> >     </rdfs:subClassOf>
> >   </owl:Class>
> > 
> >   <owl:Class rdf:ID="Active_Site_Feature">
> >     <rdfs:subClassOf>
> >       <owl:Class rdf:about="#Feature"/>
> >     </rdfs:subClassOf>
> >   </owl:Class>
> > 
> > I would like to state that there are no instances that are Features but
> > not also instances of a subclass of a Feature, ever. In OOP this can be
> > accomplished simply by declaring the base class abstract. Quite possible
> > that I'm too much caught up in the OOP mindset to see why such a
> > restriction doesn't make sense from a logical point of view.

I am new to RDF etc. and I may be too caught up in OOP too but I have a
similar requirement.  I would like to be able to say that there are no
instances of Feature, only instances of Secondary_Structure_Feature and
instances of Active_Site_Feature, to continue with this example.

> Well, in some sense you don't have to say ANYTHING for this to be true.
> For example, any instance of the (named) class Feature is also an instance
> of the (unnamed) class 
> 
> 	<owl:Class>
>           <owl:intersectionOf rdf:parseType="Collection">
> 	    <owl:Class rdf:about="#Feature" />
> 	    <owl:Class rdf:about="#Feature" />
> 	  </owl:intersectionOf>
> 	</owl:Class>
> 
> Perhaps you would like to say something stronger, perhaps that ``there are
> no instances that are Features but not also instances of a proper subclass
> of a Feature, ever''.  However, this doesn't work, as any instance of
> Feature, say  
> 
> 	<Feature rdf:about="#instance" />
> 
> is an instance of the class
> 
> 	<owl:Class>
> 	    <owl:oneOf rdf:parseType="Collection">
> 	      <owl:Thing rdf:about="#instance" />
> 	    </owl:oneOf>
> 	</owl:Class>
> 
> which is a proper subclass of Feature.

I guess what I want is to say that there are no instances of Feature only
instances of classes related to Feature by subClassOf.  Would this exclude
your anonymous class?

> Given that neither of these makes sense, just what is it that you want to
> say?  Note that if you know that any Feature must be in one of a known set
> of classes, C1 to Cn, you can say
> 
> 	<owl:Class rdf:about="#Feature">
> 	  <rdfs:subClassOf>
> 	    <owl:Class>
> 	      <owl:unionOf rdf:parseType="Collection">
> 	        <owl:Class rdf:about="#C1" />
> 		...
> 		<owl:Class rdf:about="#Cn" />
> 	      </owl:unionOf>
> 	    </owl:Class>
> 	  </rdfs:subClassOf>
> 	</owl:Class>
> 
> However, you can't say in OWL that any particular instance of Feature has
> to be known to be in one of the C1 to Cn.

Is this because an instance could be in more than one of the C1 to Cn?

Couldn't you combine this with disjoint to achieve the desired effect?

As I said above, I would like to restrict the set of classes to subclasses
of Feature.  Your classes C1 to Cn could be arbitrary classes not related to
Feature couldn't they?

John Colgrave
IBM
Received on Tuesday, 16 March 2004 04:57:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:48 GMT