W3C home > Mailing lists > Public > www-rdf-logic@w3.org > November 2001

DAML: property cardinality

From: <Joachim.Peer@unisg.ch>
Date: Tue, 27 Nov 2001 21:07:27 +0100
To: www-rdf-logic@w3.org
Message-ID: <OF625D7098.0B3752A7-ONC1256B11.006E0C29@unisg.ch>
hellol DAML researchers!

my question is: how can i enforce that a property (lets say "age") of a
Class (lets say "Person") occurs n time in an instanciation of that class?

in other words, i would like to declare something like that:

*) illegal:
<Person/>

*) illegal:
<Person>
  <age>72</age>
  <age>73</age>
</Person>

*) legal:
<Person>
  <age>72</age>
</Person>


- - - from the examples i got the following possibility:

...
<daml:Class rdf:ID="Person">
  <rdfs:subClassOf>
    <daml:Restriction daml:cardinality="1">
      <daml:onProperty rdf:resource="age"/>
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>
...
<daml:DatatypeProperty rdf:ID="age">
   <rdf:type rdf:resource
="http://www.daml.org/2001/03/daml+oil#UniqueProperty"/>
   <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#integer"/>
</daml:DatatypeProperty>
...


my question is:
- is this correct?
- is there a shortcut for that?


thanks in advance,
joachim
Received on Tuesday, 27 November 2001 15:07:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:16:02 UTC