Re: When is it appropriate to use RDF Collections?

Hi, Chris!

Chris Richard wrote on Thu, 9 Nov 2006 17:10:15 -0800:

 >>From the primer, demonstrating the use of RDF Collections:
 >
 >   <rdf:Description rdf:about="http://example.org/courses/6.001">
 >      <s:students rdf:parseType="Collection">
 >            <rdf:Description rdf:about="http://example.org/students/Amy"/>
 >            <rdf:Description
 > rdf:about="http://example.org/students/Mohamed"/>
 >            <rdf:Description
 > rdf:about="http://example.org/students/Johann"/>
 >      </s:students>
 >   </rdf:Description>
 >
 > Why would I want to use this over:
 >
 >   <rdf:Description rdf:about="http://example.org/courses/6.001">
 >      <s:student rdf:resource="http://example.org/students/Amy"/>
 >      <s:student rdf:resource="http://example.org/students/Mohamed"/>
 >      <s:student rdf:resource="http://example.org/students/Johann"/>
 >   </rdf:Description>
 >
 > I do understand the different graph that gets created in the two 
different
 > cases but this hasn't helped me.

An example, where the "closeness" of an rdf:List (the RDF concept behind 
the RDF/XML construct 'rdf:parseType="Collection"') is used, is the 
'owl:intersectionOf' property for creating a definition for a class C in 
terms of other (already elsewhere defined) classes C1,...,Cn:

   :C owl:intersectionOf ( :C1 ... :Cn ) .

Here, C is /completely/ defined, meaning that it is /exactly/ the 
intersection of the other classes, and not some (real) subclass of it 
(compare with [1]).

But 'owl:intersectionOf' does not make use of the /ordering/ of 
rdf:List. An example where the ordering is of importance is given in 
[2], where the following statement is to be adequately modeled:

   "United Airlines flight 3177 visits the following airports:
   LAX, DFW, and JFK."

While the content of this statement could perhaps be understood as

   "The flight ...
   visits airport LAX, and it
   visits airport DFW, and it
   visits airport JFK
   (in some arbitrary order,
   and perhaps it visits other airports, too)."

which then could be modeled by the second method you mentioned in your 
post, the statement is more likely to be meant as:

   "The flight ...
   has a route                                      (1)
   consisting of exactly the following airports     (2)
   given in this precise order:                     (3)
   LAX, DFW, JFK."

So there are three aspects to be considered:

   (1) It is not those three airports, which are of direct interest,
       but the /route/ consisting of those airports.
       So we are effectively talking about some single resource
       (the route), which is assembled by other resources (the airports),
       rather then about the airport resources them self.

   (2) The given set of airports is meant to be /complete/.
       No other airport will be part of the given route. So we
       need some means to say that the set is "closed".

   (3) The three airports will be approached in exactly
       the given /order/. Therefore we need some sequencing facility.

So an adequate modeling of the above statement would be (in N3):

   :3177 rdf:type :Flight ;
         :hasRoute ( :LAX :DFW :JFK ) .


 > How do RDF Containers fit into this?

If you simply want to have some ordered set of resources, where 
closeness is /not/ of importance, than you could use rdf:Seq instead of 
rdf:List. If even the ordering is of no importance, than you can use 
rdf:Bag (again no closeness). With both, rdf:Seq and rdf:Bag, you have 
at least some means to talk about some assembled resource instead of its 
components. See section 4.1 and 4.2 of [3].


 > In the second case, if I want the list of students in the class I can 
run a
 > simple SPARQL query. I understand that using the collection allows one to
 > 'close' a list, but if I want to restrict other graphs from making
 > statements about the list of students, again I can use SPARQL constructs
 > (GRAPH keyword).

May be. But do you think it would be a good idea, to make the 
possibility of realizing basic modeling tasks like those given above 
(especially the definition of OWL constructs) dependent on some specific 
RDF query language like SPARQL?

Cheers,
Michael

[1] OWL Web Ontology Language
Guide, http://www.w3.org/TR/owl-guide/#owl_intersectionOf

[2] W3C Working Group Note 12 April 2006: Defining N-ary Relations on 
the Semantic Web, Pattern 2: Using lists for arguments in a relation, 
http://www.w3.org/TR/swbp-n-aryRelations/#pattern2

[3] RDF Primer, http://www.w3.org/TR/rdf-primer

Received on Sunday, 12 November 2006 18:18:44 UTC