File:  [Public] / daml-2000-10 / daml-ex.daml
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Oct 12 15:52:48 2000 UTC (23 years, 8 months ago) by connolly
Branches: w3c_web, MAIN
CVS tags: move_to_dev, HEAD
in order to facilitate collaboration... e.g. keep the
copy on www.daml.org up to date, I'm moving development
from the internal CVS repository to our public repository.

Oh for integrated access control into CVS...


<rdf:RDF
  xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns     ="http://www.daml.org/2000/10/daml-ont#"
  xmlns:daml="http://www.daml.org/2000/10/daml-ont#"
  >

<Ontology about="">
  <versionInfo>$Id: daml-ex.daml,v 1.2 2000/10/07 03:21:17 connolly Exp $</versionInfo>
  <comment>An example ontology</comment>
  <imports resource="http://www.daml.org/2000/10/daml-ont"/>
</Ontology>

<Class ID="Animal">
  <label>Animal</label>
  <comment>This class of animals is illustrative of a number of
	ontological idioms.</comment>
</Class>

<Class ID="Male">
  <subClassOf resource="#Animal"/>
</Class>

<Class ID="Female">
  <subClassOf resource="#Animal"/>
  <disjointFrom resource="#Male"/>
</Class>

<Property ID="parent">
  <domain resource="#Animal"/>
  <cardinality>2</cardinality>
</Property>

<Class ID="Person">
  <subClassOf resource="#Animal"/>
  <restrictedBy>
    <Restriction>
      <onProperty resource="#parent"/>
      <toClass resource="#Person"/>
    </Restriction>
  </restrictedBy>
</Class>

<Property ID="father">
  <subProperty resource="#parent"/>
  <range resource="#Man"/>
  <cardinality>1</cardinality>
</Property>

<UniqueProperty ID="mother">
  <subProperty resource="#parent"/>
  <range resource="#Woman"/>
</UniqueProperty>

<!-- need an example for UnambiguousProperty -->

<Property ID="child">
  <inverseOf resource="#parent"/>
</Property>

<TransitiveProperty ID="ancestor">
  <label>ancestor</label>
</TransitiveProperty>

<TransitiveProperty ID="descendant"/>

<Property ID="mom">
  <equivalentTo resource="#mother"/>
</Property>

<Property ID="occupation">
  <maxCardinality>1</maxCardinality>
</Property>

<Class ID="Car">
  <comment>no car is a person</comment>
  <subClassOf>
    <Class>
      <complementOf resource="#Person"/>
    </Class>
  </subClassOf>
</Class>

<Class ID="Man">
  <subClassOf resource="#Person"/>
  <subClassOf resource="#Male"/>
</Class>

<Class ID="Woman">
  <subClassOf resource="#Person"/>
  <subClassOf resource="#Female"/>
</Class>

<!-- @@CAVEAT: daml:collection is an extension of RDF 1.0 syntax;
     don't expect existing tools to support it.
     @@TODO: specify how it works, implement it. -->

<Class about="#Person">
  <comment>every person is a man or a woman</comment>
  <disjointUnionOf parseType="daml:collection">
    <Class about="#Man"/>
    <Class about="#Woman"/>
  </disjointUnionOf>
</Class>

<Person ID="Adam">
  <label>Adam</label>
  <comment>Adam is a person.</comment>
</Person>

<Property ID="height">
  <domain resource="#Person"/>
  <range resource="#Height"/>
</Property>

<Class ID="Height">
  <oneOf parseType="daml:collection">
    <Height ID="short"/>
    <Height ID="medium"/>
    <Height ID="tall"/>
  </oneOf>
</Class>

<Class ID="TallThing">
  <restrictedBy>
    <Restriction>
      <onProperty resource="#height"/>
      <toValue resource="#tall"/>
    </Restriction>
  </restrictedBy>
</Class>

<!-- @@ need example of hasValue qualification -->

<!-- @@ lack Disjoint example -->

<Class ID="TallMan">
  <intersectionOf parseType="daml:collection">
    <Class about="#TallThing"/>
    <Class about="#Man"/>
  </intersectionOf>
</Class>

<!-- @@ example of subProperty, label, comment, etc. from RDF/RDFS -->

</rdf:RDF>


Webmaster