Modeling restrictions on properties

rdfs:Domain is often overused often has the reverse semantics from the intent

 

Let's examine the statement in ontdev that specifies the domain of hasMeasurementCapabilities:

<owl:ObjectProperty rdf:about="http://mmisw.org/ont/mmi/20090609T064417/device/hasMeasurementCapabilities">     
       <rdfs:domain rdf:resource="http://mmisw.org/ont/mmi/20090609T064417/device/Sensor"/>
</owl:ObjectProperty>


The probable intent of the model is to guarantee that Sensors measure a specific set of things given in the range of hasMeasurementCapabilities. But like it or not, the semantics of this in RDFS is that if an object O hasMeasurementCapabilities O then O is a Sensor. This is respectable---this is a sensor ontology so why shouldn't we say that the only thing that can measure something is for us a Sensor---but it could make it difficult to integrate DevOnt data with other data described by a different ontolgy in which other things than Sensors have measurement capabilities. For example, a ruler measures length, but in an integration with data describing, among other things, rulers, we will be forced to think of a ruler as a sensor. That should not be done lightly.


The way OWL addresses this issue is to talk about restrictions on the class Sensor in terms of hasMeasurementCapabilities, rather than to talk about hasMeasurementCapabilities in terms of class Sensor.


Below I'll abbreviate http://mmisw.org/ont/mmi/20090609T064417/device/hasMeasurementCapabiliti... as "mmi:hasMeasurementCapabilities" and http://mmisw.org/ont/mmi/20090609T064417/device/Sensor as "mmi:Sensor". This is a slight abuse of some otherwise standard abbreviation mechanisms in XML.


<rdfs:Class rdf:about="mmi:Sensor">
    <rdfs:subClassOf>
        
<owl:Restriction>
                <owl:onProperty>
                     <owl:ObjectProperty rdf:about="mmi:hasMeasurementCapabilities"/>
                </owl:onProperty>
               
<owl:allValuesFrom>
                            <owl:Class rdf:about="mmi:MeasurementCapabilities"/>
               </owl:allValuesFrom>
          </owl:Restriction>
     </rdfs:subClassOf>
</owl:ObjectProperties>
 


This is saying that Sensor is a subclass of a certain class. What class? Well, it is the anonymous class defined by the body of the special element <owl:Restriction> (Java and some other OOP languages have anonymous inner classes also, defined similarly by specifying only their body. It's dangerous though to make too much of the relation between OOP and ontology modeling. ). So let's look at that class. The syntax of owl:Restriction is that it requires two things: (a)a property on which to base the restriction---here mmi:hasMeasurementCapabilities and (b) the nature of that restriction, here that all values must come from mmi:MeasurementCapabilities. In plain language: if you are an mmi:Sensor you can only measure mmi:MeasurementCapabilities. But if you are something else, you can measure some other kind of thing and this can be done in a way that guarantees that the data integration will not change the sense of measurement capabilities for either the mmi:Sensor data participant or the other data participant in the integration.


In DevOnt, probably each of the places an rdfs:Domain is specified, the intent is better met by the owl:Restriction pattern.

 

--Bob Morris