<?xml version="1.0" ?>
<!DOCTYPE uridef[
  <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns">
  <!ENTITY daml "http://www.daml.org/2001/03/daml+oil">
  <!ENTITY num "http://www.daml.org/2000/10/daml-num.daml">
  <!ENTITY DEFAULT "http://www.daml.org/2001/03/daml+oil">
  <!ENTITY THIS "http://www.daml.ri.cmu.edu/ont/homework/atlas-date.daml">
]>

<!--
This document uses entity types as a shorthand for URIs.
Download the source for a version with unexpanded entities.
  -->

<rdf:RDF
  xmlns:rdf=    "&rdf;#"
  xmlns:daml=   "&daml;#"
  xmlns:num=	"&num;#"
  xmlns=        "&DEFAULT;#">

<Ontology about="&THIS;">
  <versionInfo>$Id: &THIS;,v 0.1 2000/10/25 14:37:00 TerryPayne v Exp $</versionInfo>
  <comment>Date description used by Atlas Web pages</comment>
  <imports resource="&daml;"/>
</Ontology>

<!--
  Note on naming convention:
  	class ids start with an upper case character
	properties start with a lower case character
-->

<!-- CLASS: Date -->

<Class ID="Date">
  <label>Date</label>
  <comment>A generic description of a date (i.e. time) </comment>
</Class>

<Property ID="year">
  <domain resource="#Date"/>
  <range resource="&num;#Integer"/>
</Property>

<Property ID="month">
  <domain resource="#Date"/>
  <range resource="#Month"/>
</Property>

<Property ID="day">
  <domain resource="#Date"/>
  <range resource="&num;#Integer"/>
  <num:min>1</num:min>
  <num:max>31</num:max>
</Property>

<Property ID="hour">
  <domain resource="#Date"/>
  <range resource="#Hour"/>
</Property>

<Property ID="minute">
  <domain resource="#Date"/>
  <range resource="&num;#Integer"/>
  <num:min>0</num:min>
  <num:max>59</num:max>
</Property>

<Property ID="second">
  <domain resource="#Date"/>
  <range resource="&num;#Integer"/>
  <num:min>0</num:min>
  <num:max>59</num:max>
</Property>

<!-- CLASS: Month -->

<Class ID="Month">
  <label>Month</label>
  <oneOf parseType="daml:collection">
    <Month ID="January"/>
    <Month ID="February"/>
    <Month ID="March"/>
    <Month ID="April"/>
    <Month ID="May"/>
    <Month ID="June"/>
    <Month ID="July"/>
    <Month ID="August"/>
    <Month ID="September"/>
    <Month ID="October"/>
    <Month ID="November"/>
    <Month ID="December"/>
  </oneOf>
</Class>

<!-- CLASS: AmPm -->

<Class ID="AmPm">
  <label>AmPm</label>
  <comment>Am or Pm - specified with 12 hour times only</comment>
  <oneOf parseType="daml:collection">
    <AmPm ID="am"/>
    <AmPm ID="pm"/>
  </oneOf>
  <restrictedBy>
    <Restriction>
      <onProperty resource="#hour"/>
      <toValue resource="#12hour"/>
    </Restriction>
  </restrictedBy>
</Class>

<!-- CLASS: Hour -->

<Class ID="Hour">
  <label>Hour</label>
  <comment>Hours can be represented in 12 or 24 hour time</comment>
  <disjointUnionof parseType="daml:collection">
    <Class about="#24hour"/>
    <Class about="#12hour"/>
  </disjointUnionof>
  <!-- * How can mathematical relationships be defined?
  	 One should be able to derive a 24hour definition from a 12hour
	 specification, and vice versa.
	 -->
</Class>

<!-- CLASS: 24Hour -->

<Class ID="24hour">
  <label>24hour</label>
  <comment>
    Definition of a 24 hour clock, from 00:00 hours to 23:00 hours
  </comment>
  <domain resource="#Date"/>
  <range resource="&num;#Integer"/>
  <num:min>0</num:min>
  <num:max>23</num:max>
</Class>

<!-- CLASS: 12Hour -->

<Class ID="12hour">
  <label>12hour</label>
  <comment>
    Definition of a 12 hour clock, from 1 o'clock - 12 o'clock
  </comment>
  <domain resource="#Date"/>
  <range resource="&num;#Integer"/>
  <num:min>1</num:min>
  <num:max>12</num:max>
</Class>

<!-- CLASS: Duration -->

<Class ID="Duration">
  <range resource="&num;#Integer"/>
</Class>

</rdf:RDF>

