Re: What is it that's wrong with rdf:List

Le 17/06/2010 23:19, Norman Gray a écrit :
>
> Greetings.
>
> [4] refers to an OWLList ontology (and a broken link to a rationale).  I follow how that ontology works, but don't get the significance of the apparently minor ways in which it's different from rdf:List.

As already pointed out, you cannot use rdf:List as a class in OWL DL, so 
you need to make your own List class.
The ontology you refer to ([4]) is quite expressive because it tries to 
model as accurately as possible the notion of empty list. But in many 
applications a simple definition would be enough, e.g.,


my:List a owl:Class .
my:nil a my:List .
my:first a owl:ObjectProperty ;
    rdfs:domain my:List .
my:next a owl:ObjectProperty ;
    rdfs:domain my:List ;
    rdfs:range my:List .


An application that generates lists will normally respect the 
constraints of lists (i.e., a list has at most one next list and at most 
one first element, an empty list has no first and no next) so usually, 
this modelling is sufficient.

Then, you can make more specific lists by subclassing my:List, e.g.,


my:ListOfPersons a owl:Class ;
    rdfs:subClassOf my:List ;
    rdfs:subClassOf [
       a owl:Restriction ;
       owl:onProperty my:first ;
       owl:allValuesFrom foaf:Person ]
    rdfs:subClassOf [
       a owl:Restriction ;
       owl:onProperty my:next ;
       owl:allValuesFrom my:ListOfPerson ] .


and here you go:


my:Publication a owl:Class .
my:hasAuthors a owl:ObjectProperty ;
    rdfs:domain my:Publication ;
    rdfs:range a my:ListOfPersons .


then, an example of data:


ex:tsw a my:Publication ;
    rdfs:label "The Semantic Web" ;
    my:hasAuthors [
       a my:ListOfPersons ;
       my:first tim:bernerslee ;
       my:next [
          a my:ListOfPersons ;
          my:first jim:hendler ;
          my:next [
             a my:ListOfPersons ;
             my:first ora:lassila ;
             my:next my:nil
          ]
       ]
    ]


This is obviously very cumbersome but it's valid OWL DL and it should 
not be written by humans.


AZ.

> [4] http://www.co-ode.org/ontologies/lists/2008/09/11/
>

Received on Friday, 18 June 2010 19:54:08 UTC