W3C home > Mailing lists > Public > www-rdf-interest@w3.org > August 2001

Re: Container in RDF Schema

From: François <francoisleygues@yahoo.com>
Date: Fri, 10 Aug 2001 09:43:59 -0400
Message-Id: <200108101345.JAA14911@tux.w3.org>
To: www-rdf-interest@w3.org
[freed from spam trap.  This is the message to which
http://lists.w3.org/Archives/Public/www-rdf-interest/2001Aug/0020.html
was replying.  -rrs]

 Message-ID: <20010805201119.74894.qmail@web11805.mail.yahoo.com>
 Old-Date: Sun, 5 Aug 2001 13:11:19 -0700 (PDT)
 From: "François" Leygues <francoisleygues@yahoo.com>
 To: www-rdf-interest@w3.org
 Cc: andrei@derpi.tuwien.ac.at

Aaron Swartz wrote:
> 
> On Friday, July 27, 2001, at 05:46  AM, Andrei S.
Lopatenko wrote:
> 
> > But how to say that it is a Bag of person-project?
> 
> This is a known issue:
> 
>
http://www.w3.org/2000/03/rdf-tracking/#rdfs-constraining-containers

A) Yes it is but now things have been vastly improved.
It is now possible to
use rdf:li with any resource, which allows containers
to be subclassed (BRAVO!!!)

This recent decision
(http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Jun/0520.html)
is already implemented in the new RDF parser from HP
(http://www-uk.hpl.hp.com/people/jjc/arp/index.html). 

B) However, there is no generally accepted way to
cleanly constrain containers. 
I have already suggested to use a "metaclass" based
solution, which 
could be described by : 
   * a class ConstrainedContainer
   * a property containerConstraint

@prefix : <#>.

:ConstrainedContainer a rdfs:Class; 
	rdfs:subClassOf rdfs:Class. 
:containerConstraint a rdf:Property; 
	rdfs:domain :ConstrainedContainer;
	rdfs:range rdfs:Class.

Let's define a constrained container :

:LiteralSeq a :ConstrainedContainer;
	rdfs:subClassOf rdfs:Seq;
	:containerConstraint rdfs:Literal

Lets use it: 

:MySeq a :LiteralSeq;
	rdf:li "this";
	rdf:li "is";
	rdf:li "a sequence".

Why not define cardinality constraints ? 

We could add additional properties :
 
@prefix xsd: <http://www.w3.org/2000/10/XMLSchema#>

(containerCardinality containerMaxCardinality
containerMinCardinality )
	a rdf:Property;
	rdfs:domain :ConstrainedContainer;
	rds:range xsd:nonNegativeInteger.
	
:LiteralSeq would be protected agains emptyness by : 

:LiteralSeq :containerMinCardinality 1.

C) This approach is similar to DAML: 

@prefix daml: <http://www.daml.org/2001/03/daml+oil#>
@prefix xsd: <http://www.w3.org/2000/10/XMLSchema#>

daml:Class a rdfs:Class; 
	rdfs:subClassOf rdfs:Class

Which is precisely a metaclass...


daml:Restriction a rdfs:Class;
	rdfs:subClassOf daml:Class.

which is another metaclass, and  with: 

onProperty a rdf:Property; 
	rdfs:domain daml:Restriction;
	rdfs:range rdf:Property. 

it is possible to define a whole set of cardinality
constraints :

daml:cardinality a rdf:Property; 
	rdfs:domain daml:Restriction;
	rdfs:range xsd:nonNegativeInteger.

daml:maxCardinality a rdf:Property; 
	rdfs:domain daml:Restriction;
	rdfs:range xsd:nonNegativeInteger.

daml:minCardinality a rdf:Property; 
	rdfs:domain daml:Restriction;
	rdfs:range xsd:nonNegativeInteger.

This is used in a rather complex way: 

:Person a daml:Class ; 
	rdfs:subClassOf [ 
		a daml:Restriction; 
		daml:cardinality "1";
		daml:onProperty ":hasFather";
	].
with: 

:hasFather a rdf:Property ; 
	rdfs:domain :Person;
	rdfs:range :Person.
	
This express a nice, but complex, restriction in the
usage of a property WHEN it is used on a given class. 

Note that the cardinality constraints in daml applies
only to specific properties, not on containers... 
Of course, there are the daml collections but...  

D) there is a suggestion (
http://lists.w3.org/Archives/Public/www-rdf-interest/2001Jul/0094.html
) to kill the container notion. I dont like it,
because it changes RDF too much... 


E) In conclusion, several queries : 

1) what is the exact status of DAML according to RDF
Schema ? 
-should we adopt daml and use it , including the
daml:collection parseType? 
-is it reasonable or foolish  to reinvent other
conventions ? 
-are RDF containers deprecated ? 

2) Why not completing RDF Schema with the minimum
necessary to :
- constrain containers member types? 
- constrain containers cardinalities ? 

3) Please, continue to save RDF containers ! 


Bye.



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
Received on Friday, 10 August 2001 09:45:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:51 GMT