W3C home > Mailing lists > Public > public-data-shapes-wg@w3.org > January 2015

Interlinked shapes (was: Shapes vs Classes (in LDOM))

From: Holger Knublauch <holger@topquadrant.com>
Date: Sat, 24 Jan 2015 18:52:11 +1000
Message-ID: <54C35D3B.2060600@topquadrant.com>
To: RDF Data Shapes Working Group <public-data-shapes-wg@w3.org>
Thanks for your examples. I will create separate email sub-threads for 
the specific problems that you desribe.

On 1/24/15, 3:53 PM, Jose Emilio Labra Gayo wrote:
> 1.- It is not clear to me if you can represent inter-linked shapes? As 
> an example, you could define "Course" and "Student" where a Course 
> shape contains a property :student whose values must have the Shape 
> Student, and a Student could contain a property :course whose nodes 
> have the shape of Course. I think this is similar to Peter's example 
> of recursive shapes.

Why can't you just make them classes?

ex:Course
     a rdfs:Class ;
     rdfs:subClassOf rdfs:Resource ;
     ldom:property [
         ldom:predicate ex:student ;
         ldom:valueType ex:Student ;
     ] .

ex:Student
     a rdfs:Class ;
     rdfs:subClassOf rdfs:Resource ;
     ldom:property [
         ldom:predicate ex:course ;
         ldom:valueType ex:Course ;
     ] .

I must be missing something...

Perhaps you meant that there is an inverse property relationship here? 
Then, it could become

ex:Student
     a rdfs:Class ;
     rdfs:subClassOf rdfs:Resource ;
     ldom:inverseProperty [
         ldom:predicate ex:student ;
         ldom:valueType ex:Course ;
         rdfs:label "course" ;
     ] .

Holger
Received on Saturday, 24 January 2015 08:52:43 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 24 January 2015 08:52:44 UTC