RE: Type coercing a resource's type?

| 3. Define a subclass of River SeaRiver. Use OWL to restrict SeaRiver's
| EmptiesInto to have Sea as it's range. In this particular case it doesn't
| seem very sensible (a river empties into whatever it comes across, so
| there
| is no real difference between a sea-river and a river, as far as my
| knowledge of geography tells me), but it can be useful elsewhere.

Actually the French do make this distinction. They distinguish two types of rivers: rivière and fleuve. A fleuve empties into the sea, whereas a rivière empties into another river or into a lake. 

On another note, the last solution mentioned by Jon is the cleanest in my book. The fact that for each of these river "types", a restriction holds as to what they empty into is sufficient ground for the creation of subclasses. Another solution would be to create a class BodyOfWater, of which River, Sea and Lake are subclasses. A River can then emptyInto any BodyOfWater, and the specific body is specified at the instance level. BTW: you wouldn't want to say that the Yangtze empties into Sea (which is a class). You need to keep to your level: specify which instance of Sea it empties into, i.e. the EastChinaSea. 


 Rinke Hoekstra

Rinke Hoekstra
Department of Computer Science & Law
University of Amsterdam, PO Box 1030 
1000 BA  Amsterdam,  the Netherlands

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.456 / Virus Database: 256 - Release Date: 18-2-2003

Received on Monday, 24 February 2003 07:15:34 UTC