DAML: property cardinality

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