- From: Francesco Cannistrà <fracan@inwind.it>
- Date: Thu, 10 Apr 2003 22:44:56 +0200
- To: <www-rdf-interest@w3.org>, "Brian McBride" <bwm@hplb.hpl.hp.com>
Hello Brian, > Please do not crosspost replies to rdf-interest and rdf-comments. > Please pick a list and don't cross post. sorry, I'll do so :-) > Per your suggestion, what would happen if one had a graph containing a bag > of people and another bag of apples. I can define whatever kind of typed Bag I want, e.g: <rdf:Description rdf:ID="BagOfPerson"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class" /> <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag" /> </rdf:Description> <rdf:Description rdf:ID="BagOfApples"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class" /> <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag" /> </rdf:Description> and in order to assert that a property has range to a typed bag I use with these assertions in the schema: a) for Person typed bags: <rdf:Description rdf:ID="setOfPersons"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" /> <rdfs:domain rdf:resource="#setOfPersonsDomain" /> <rdfs:range rdf:resource="#BagOfPerson" /> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/2000/01/rdf-schema#member"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" /> <rdfs:domain rdf:resource="#BagOfPerson" /> <rdfs:range rdf:resource="#Person" /> </rdf:Description> b) for Apple typed bags: <rdf:Description rdf:ID="setOfApples"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" /> <rdfs:domain rdf:resource="#setOfApplesDomain" /> <rdfs:range rdf:resource="#BagOfPerson" /> </rdf:Description> <rdf:Description rdf:about="http://www.w3.org/2000/01/rdf-schema#member"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" /> <rdfs:domain rdf:resource="#setOfApples" /> <rdfs:range rdf:resource="#Person" /> </rdf:Description> Then I can instance these properties in a RDF model for resources of proper type and semantics of the shema applies: <rdf:Desription rdf:about="#aResource"> <rdf:type rdf:resource="http://theVocabularyNamespace#setOPersonsDomain"/> <voc:setOfPersons> <rdf:Bag> <rdf:_1> <voc:Person rdf:about="#1-st_Person">...</voc:Person> </rdf:_1> <rdf:_2> <voc:Person rdf:about="#2-nd_Person">...</voc:Person> </rdf:_1> </rdf:Bag> </voc:setOfPersons> </rdf:Desription> <rdf:Desription rdf:about="#anotherResource"> <rdf:type rdf:resource="http://theVocabularyNamespace#setOfApplesDomain"/> <voc:setOfApples> <rdf:Bag> <rdf:_1> <voc:Person rdf:about="#1-st_Person">...</voc:Apple> </rdf:_1> <rdf:_2> <voc:Person rdf:about="#2-nd_Person">...</voc:Apple> </rdf:_1> </rdf:Bag> </voc:setOfApples> </rdf:Desription> Is it reasonable ??? Francesco
Received on Thursday, 10 April 2003 16:45:01 UTC