W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 2003

Can rdfs:subClassOf be used in definition of a Property

From: Xie Guotong <guotongxie@hotmail.com>
Date: Tue, 16 Dec 2003 01:56:59 +0000
To: www-rdf-interest@w3.org
Message-ID: <BAY7-F80ZLOkEiQFhLu00005d8f@hotmail.com>

Hi,
I think this is an issue of great importance.I've a question 
now.rdf:Property is an instance of rdfs:Class.
From RDFS specification,we know that "The rdfs:domain of rdfs:subClassOf is 
rdfs:Class. The rdfs:range of rdfs:subClassOf is rdfs:Class."
Then why we can not use rdfs:subClassOf in definition of a Property.
In order to express my idea more concretely,I've a sample here.I want to 
model a fact that People Love People,and the Love is a complex property
with its own property.My OWL description is as follows.I'm looking forward 
to your comments and feedbacks that if it's right.:-),or what's wrong?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wme [
     <!ENTITY rdf  "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
     <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
     <!ENTITY xsd  "http://www.w3.org/2001/XMLSchema#" >
     <!ENTITY owl  "http://www.w3.org/2002/07/owl#" >
     <!ENTITY love  "http://love.net/#" >
   ]>
<rdf:RDF
  xmlns     ="&love;"
  xmlns:owl ="&owl;"
  xml:base  ="http://love.net"
  xmlns:rdf ="&rdf;"
  xmlns:rdfs="&rdfs;"
>
	<owl:Ontology>
		<rdfs:comment>
			People Love People
			Author: Guo Tong Xie  
			Date:15/12,2003                                 
		</rdfs:comment>
		<owl:imports rdf:resource="http://www.w3.org/2002/07/owl" />
	</owl:Ontology>

	<owl:Class rdf:ID="People">
		<rdfs:comment>
			A kind of animal.			
		</rdfs:comment>
		<rdfs:subClassOf>
			<owl:Restriction>
			<owl:onProperty rdf:resource="#Love"/>
			<owl:minCardinality 
rdf:datatype="&xsd;nonNegativeInteger">0</owl:minCardinality>
			</owl:Restriction>
		</rdfs:subClassOf>
	</owl:Class>
	
	<owl:ObjectProperty rdf:ID="Love">
		<rdf:type rdf:resource="&owl;SymmetricProperty"/>
		<rdfs:domain rdf:resource="#People"/>
		<rdfs:range rdf:resource="#People"/>
		<rdfs:subClassOf>
			<owl:Restriction>
				<owl:onProperty rdf:resource="#hasRelationship"/>
				<owl:minCardinality 
rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
				<owl:maxCardinality 
rdf:datatype="&xsd;nonNegativeInteger">1</owl:maxCardinality>
			</owl:Restriction>
		</rdfs:subClassOf>
	</owl:ObjectProperty>	
	
	<owl:ObjectProperty rdf:ID="hasRelationship">
		<rdfs:domain rdf:resource="#Love"/>
		<rdfs:range rdf:resource="#LoveType"/>
	</owl:ObjectProperty>	
	
	<owl:Class rdf:ID="LoveType">
		<rdfs:comment>
			type of love			
		</rdfs:comment>
		<owl:oneOf rdf:parseType="Collection">
			<owl:Thing rdf:about="Lover"/>
			<owl:Thing rdf:about="Friend"/>
			<owl:Thing rdf:about="Family"/>
			<owl:Thing rdf:about="Enemy"/>
		</owl:oneOf>
	</owl:Class>
	
	<People rdf:ID="Tom">
		<Love rdf:resource="#Jerry">
			<hasRelationship rdf:resource="#Enemy"/>
		</Love>
	</People>
	
	<People rdf:ID="Jerry"/>

</rdf:RDF>

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  
Received on Monday, 15 December 2003 20:58:28 GMT

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