W3C home > Mailing lists > Public > semantic-web@w3.org > July 2006

RE: Mutually Exclusive Properties in OWL

From: Hans Teijgeler <hans.teijgeler@quicknet.nl>
Date: Sun, 9 Jul 2006 23:56:58 +0200
To: "'Ashraful Alam'" <masud80@hotmail.com>, <semantic-web@w3.org>
Message-ID: <000d01c6a3a2$9d820090$6c7ba8c0@hans>
Hi Ash,
 
You may think that 'type' in XML Schema is something totally different from
an OWL Class, but to me that is pretty much the same.

Your choice of properties was strange, because what is actually says is that
members of MyFavoriteFruit (e.g. the apple in your hand) either has chosen
for members of SweetFruit or for members of NonSweetFruit. Can you visualize
that?
 
As far as I know there is no way to make two RDF properties mutually
exclusive. But for the same token I cannot dream up an example where that
would be realistic. Can you?
 
Regards,
Hans
 
   _____  

From: Ashraful Alam [mailto:masud80@hotmail.com] 
Sent: Sunday, July 09, 2006 19:20
To: hans.teijgeler@quicknet.nl; semantic-web@w3.org
Subject: RE: Mutually Exclusive Properties in OWL



Hi Hans,

Thanks for your response. Correct me if I am wrong but XML doesn't have the
notion of 'Class',  so in my ex1.xsd the two elements -- SweetFruit and
NonSweetFruit -- are not technically classes. Instead the closest
resemblance to the class concept in XML is 'type'. Therefore I model the
complexType in ex1.xsd as a Class in ex1.owl and elements with regular
datatypes (e.g., String, integer) as properties having the same datatypes.
In your suggested OWL profile, you define the two elements as Classes, so
that you can list the favorite fruits (e.g., Kiwi) through the properties of
these classes. I wanted to skip this extra level of Class definitions. In my
OWL example, I have one class and two properties, whereas in your case there
will be a total of three classes and two properties.  I think your OWL
example is the way to go, I just wanted to do it with less clutter. 

And just to be certain, there is no way to model the idea that two
properties are mutually exclusive within the confines of a particular class,
right?

Regards,

Ash

Hi Ash,
 
You changed from two mutually exclusive Classes to two mutually exclusive
Properties. Why is that?
 
In your example ex1.xsd SweetFruit and NonSweetFruit are subclasses of
MyFavoriteFruit.
In your example ex1.owl you tell in fact that your favorite fruit has chosen
either sweet fruit or non-sweet fruit, and that seems rather cannibalistic
:-)
 
If you would stick to your ex1.xsd example that could read in OWL:
 
<owl:Class id="MyFavoriteFruit">
    <owl:subClassOf>
        <owl:Class>
            <owl:unionOf rdf:parseType="Collection"> 
                <owl:Class rdf:about="#SweetFruit"/> 
                <owl:Class rdf:about="#NonSweetFruit"/> 
            </owl:unionOf>
        </owl:Class>
    </owl:subClassOf>
<owl:Class>

where owl:unionOf is analogous to logical disjunction (OR).
 
In order to be more precise you should also make SweetFruit and
NonSweetFruit explicitly mutually exclusive (XOR) (being XOR is not
guaranteed by owl:unionOf):
 
<owl:Class rdf:about="#SweetFruit">
    <owl:disjointWith rdf:resource="#NonSweetFruit"/>
</owl:Class>
 
Regards,
Hans
 

____________________
OntoConsult
Hans Teijgeler
ISO 15926 specialist
Netherlands
+31-72-509 2005
HYPERLINK "http://www.infowebml.ws/"www.InfowebML.ws 
HYPERLINK "mailto:hans.teijgeler@quicknet.nl"hans.teijgeler@quicknet.nl
 
   _____  


Hello,
I was trying to map an xml schema document into an ontology and got stuck
trying to figure out the corresponding semantics of xs:choice in OWL. Here I
assume 'xs' is a prefix to refer to XML-Schema namespace. For instance, take
this example :
 
ex1.xsd
======
<xs:element name="MyFavoriteFruit" type="base:MyFavoriteFruitType>
 
<xs:complexType name="MyFavoriteFruitType">
   <xs:choice>
      <xs:element name="SweetFruit" type="xs:String">
      <xs:element name="NonSweetFruit" type="xs:String">
   </xs:choice>
</xs:complexType>
 
The interpreation here is my favorite fruit can be either a sweet fruit or a
non-sweet fruit and a client application of the above document can actually
determine whether the favorite fruit was 'SweetFruit' or 'NonSweetFruit'.
The last part is important to me since my application has to make decisions
based on the kind of fruit chosen. One possible OWL profile of ex1.xsd can
be as follows.
 
ex1.owl
======
<owl:Class id="MyFavoriteFruit">
   <owl:subClassOf>
      <owl:Class>
         <owl:oneOf parseType="collection">
             <owl:Restriction>
                <owl:onProperty about="hasChosenSweetFruit">
                <owl:cardinality datatype="xs:integer">1</owl:cardinality>
             </owl:Restriction>
             <owl:Restriction> 
                <owl:onProperty about="hasChosenNonSweetFruit">
                <owl:cardinality datatype="xs:integer">1</owl:cardinality>
             </owl:Restriction>
          </owl:oneOf>
      </owl:Class>
   </owl:subClassOf>
<owl:Class>
 
Above owl file is certainly 'valid', but what I don't know is if it captures
the interpretation that an instance of MyFavoriteFruit can have *either*
hasChosenSweetFruit *or* hasChosenNonSweetFruit (i.e. are these properties
mutually exclusive through 'oneOf'?). If not, what alternatives do I have?
Your comments will be greatly appreciated.
 
-Ash 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date: 07-Jul-06



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date: 07-Jul-06




--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date: 07-Jul-06



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date: 07-Jul-06
 
Received on Sunday, 9 July 2006 21:57:36 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:11 GMT