Re: typed containers in RDFS: suggestions about the "long range" problem

sorry to reply to myself and repost the same message, but the fever I have makes me do banal errors.

obviosly in the cut-past I have made confusion.
the correct code is the following

<rdf:Description rdf:ID="BagOfPersons">
        <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>

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="#BagOfPersons" />
</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="#BagOfPersons" />
         <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="#BagOfApples" />
</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="#BagOfApples" />
         <rdfs:range rdf:resource="#Apple" />
</rdf:Description>

Then I can instance these properties in a RDF model for resources of proper
type and semantics of the shema applies:

<rdf:Description 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:_2>
                   </rdf:Bag>
            </voc:setOfPersons>
</rdf:Description>
<rdf:Desription rdf:about="#anotherResource">
            <rdf:type rdf:resource="http://theVocabularyNamespace#setOfApplesDomain"/>
            <voc:setOfApples>
                   <rdf:Bag>
                        <rdf:_1>
                            <voc:Apple rdf:about="#1-st_Apple">...</voc:Apple>
                        </rdf:_1>
                        <rdf:_2>
                            <voc:Apple rdf:about="#2-nd_Apple">...</voc:Apple>
                        </rdf:_2>
                   </rdf:Bag>
            </voc:setOfApples>
 </rdf:Desription>

Is it reasonable ???

Francesco

Received on Thursday, 10 April 2003 17:17:17 UTC