<?xml version="1.0"?>
<?xml-stylesheet href="http://www.w3.org/2002/06/rdfs2html.xsl" type="application/xml"?>
<!DOCTYPE rdf:RDF [
   <!ENTITY cobra "http://daml.umbc.edu/ontologies/cobra/0.4/">
   <!ENTITY rdf  "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
   <!ENTITY xsd  "http://www.w3.org/2001/XMLSchema#"> 
   <!ENTITY owl  "http://www.w3.org/2002/07/owl#"> 
   <!ENTITY cal  "http://daml.umbc.edu/ontologies/cobra/0.4/calendarclock#">
   <!ENTITY tme  "http://daml.umbc.edu/ontologies/cobra/0.4/time-basic#">
   ]>
<!--
    Author: Harry Chen (mailto:harry.chen@umbc.edu)
            http://umbc.edu/~hchen4/

    Copyright 2003 Harry Chen, All Rights Reserved. 
 
    This work is licensed under the Creative Commons Attribution
    License. To view a copy of this license, visit 
    http://creativecommons.org/licenses/by/1.0/ or send a letter to
    Creative Commons, 559 Nathan Abbott Way, Stanford, California
    94305, USA.  
   
    CoBrA Web Site: 
      http://cobra.umbc.edu

    This version: 
      http://daml.umbc.edu/ontologies/cobra/0.4/time-basic

    Lastest version:
      http://daml.umbc.edu/ontologies/cobra/

    CVS Version: $Revision: 1.7 $, $Date: 2003/11/08 22:10:32 $
-->

<rdf:RDF  
   xmlns:rdf  = "&rdf;"
   xmlns:rdfs = "&rdfs;"
   xmlns:owl  = "&owl;"
   xmlns:xsd  = "&xsd;"
   xmlns:cal  = "&cal;"
   xmlns      = "&tme;"
   xml:base   = "http://daml.umbc.edu/ontologies/cobra/0.4/time-basic">
  
  <owl:Ontology rdf:about="&cobra;time-basic">
    <owl:versionInfo>0.4</owl:versionInfo>
    <rdfs:label>COBRA-ONT Time Ontology</rdfs:label>
    <owl:imports rdf:resource="&cobra;calendarclock"/>
    <rdfs:comment>
      This ontology defines concepts for describing time. The basic
      constructs are time instant and time interval. Both time
      instant and time interval are type of temporal entity, which
      can be described using the calendar/clock ontology.

      Parts of this ontology are adopted from the time-entry
      ontology (developed by Feng Pan and Jerry R. Hobbs (USC/ISI))
      and the DAML-Time ontology.
    </rdfs:comment>
  </owl:Ontology>
    
  <owl:Class rdf:ID="TemporalThing">
    <rdfs:label>TemporalThing</rdfs:label>
    <owl:unionOf rdf:parseType="Collection">
      <owl:Class rdf:about="#InstantThing"/>
      <owl:Class rdf:about="#IntervalThing"/>
    </owl:unionOf>
  </owl:Class>

  <owl:Class rdf:ID="InstantThing">
    <rdfs:label>InstantThing</rdfs:label>
    <rdfs:subClassOf rdf:resource="#TemporalThing"/>
    <owl:disjointWith rdf:resource="#IntervalThing"/>
  </owl:Class>

  <owl:Class rdf:ID="IntervalThing">
    <rdfs:label>IntervalThing</rdfs:label>
    <rdfs:subClassOf rdf:resource="#TemporalThing"/>
    <owl:disjointWith rdf:resource="#InstantThing"/>
  </owl:Class>

  <owl:Class rdf:ID="ProperIntervalThing">
    <rdfs:label>ProperIntervalThing</rdfs:label>
    <rdfs:subClassOf rdf:resource="#IntervalThing"/>
  </owl:Class>

  <owl:Class rdf:ID="TemporalEntity">
    <rdfs:label>TemporalEntity</rdfs:label>
    <owl:unionOf rdf:parseType="Collection">
      <owl:Class rdf:about="#Instant"/>
      <owl:Class rdf:about="#Interval"/>
    </owl:unionOf>
  </owl:Class>

  <owl:Class rdf:ID="Instant">
    <rdfs:label>Instant</rdfs:label>
    <rdfs:subClassOf rdf:resource="#TemporalEntity"/>
    <rdfs:subClassOf rdf:resource="#InstantThing"/>
    <owl:disjointWith rdf:resource="#Interval"/>
  </owl:Class>

  <owl:Class rdf:ID="Interval">
    <rdfs:label>Interval</rdfs:label>
    <rdfs:subClassOf rdf:resource="#TemporalEntity"/>
    <rdfs:subClassOf rdf:resource="#IntervalThing"/>
    <owl:disjointWith rdf:resource="#Instant"/>
  </owl:Class>

  <owl:Class rdf:ID="ProperInterval">
    <rdfs:label>ProperInterval</rdfs:label>
    <rdfs:subClassOf rdf:resource="#Interval"/>
  </owl:Class>
  
  <owl:Class rdf:ID="Event">
    <rdfs:label>Event</rdfs:label>    
  </owl:Class>

  <owl:Class rdf:ID="TemporalEvent">
    <rdfs:label>TemporalEvent</rdfs:label>
    <owl:unionOf rdf:parseType="Collection">
      <owl:Class rdf:about="#InstantEvent"/>
      <owl:Class rdf:about="#IntervalEvent"/>
    </owl:unionOf>
  </owl:Class>

  <owl:Class rdf:ID="InstantEvent">
    <rdfs:label>InstantEvent</rdfs:label>    
    <rdfs:subClassOf rdf:resource="#Event"/>
    <rdfs:subClassOf rdf:resource="#InstantThing"/>
    <owl:disjointWith rdf:resource="#IntervalEvent"/>
  </owl:Class>

  <owl:Class rdf:ID="IntervalEvent">
    <rdfs:label>IntervalEvent</rdfs:label>    
    <rdfs:subClassOf rdf:resource="#Event"/>
    <rdfs:subClassOf rdf:resource="#IntervalThing"/>
    <owl:disjointWith rdf:resource="#InstantEvent"/>
  </owl:Class>

  <owl:Class rdf:ID="ProperIntervalEvent">
    <rdfs:label>IntervalEvent</rdfs:label>    
    <rdfs:subClassOf rdf:resource="#IntervalEvent"/>
    <rdfs:subClassOf rdf:resource="#ProperIntervalThing"/>
  </owl:Class>

  <!-- Topological Temporal Relations -->

  <owl:ObjectProperty rdf:ID="before">
    <rdfs:label>before</rdfs:label>
    <rdf:type rdf:resource="&owl;TransitiveProperty" />
    <rdfs:domain rdf:resource="#TemporalThing" />
    <rdfs:range  rdf:resource="#TemporalThing" />
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="after">
    <rdfs:label>after</rdfs:label>
    <owl:inverseOf rdf:resource="#before" />
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="begins">
    <rdfs:label>begins</rdfs:label>
    <rdf:type rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain rdf:resource="#TemporalThing" />
    <rdfs:range  rdf:resource="#InstantThing" />
  </owl:ObjectProperty>
  
  <owl:ObjectProperty rdf:ID="ends">
    <rdfs:label>begins</rdfs:label>
    <rdf:type rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain rdf:resource="#TemporalThing" />
    <rdfs:range  rdf:resource="#InstantThing" />
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="inside">
    <rdfs:label>begins</rdfs:label>
    <rdfs:domain rdf:resource="#IntervalThing" />
    <rdfs:range  rdf:resource="#InstantThing" />
  </owl:ObjectProperty>

  <!-- 
       Define time instant and interval using descriptions of calendar
       and clock. 
    -->
  
  <!-- For defining a time instant using XML datatypes -->
  <owl:DatatypeProperty rdf:ID="hasInstantDatatypeDescription">
    <rdfs:label>hasInstantDatatypeDescription</rdfs:label>
    <rdfs:comment>
      Defines a datatype representation of a time instant.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#InstantThing"/>
    <rdfs:range rdf:resource="&xsd;dateTime"/>
  </owl:DatatypeProperty>

  <!-- For defining a time interval using XML datatypes -->
  <owl:ObjectProperty rdf:ID="hasIntervalDatatypeDescription">
    <rdfs:label>hasIntervalDatatypeDescription</rdfs:label>
    <rdfs:comment>
      Defines a datatype representation of a time interval.
    </rdfs:comment>
    <rdfs:domain rdf:resource="#IntervalThing"/>
    <rdfs:range rdf:resource="#IntervalDatatypeDescription"/>
  </owl:ObjectProperty>

  <owl:Class rdf:ID="IntervalDatatypeDescription">
    <rdfs:label>IntervalDatatypeDescription</rdfs:label>
    <rdfs:comment>
      When a time interval is described by using XML datatypes, the
      beginning of the time interval is defined by the datatype
      property "beginningTime", and the end of the time interval is
      calculated by adding the duration specification (i.e., the
      value that is defined by the property "duration") to the value
      that is defined by "beginningTime".             
    </rdfs:comment>

    <rdfs:subClassOf>
      <owl:Restriction>
	<owl:onProperty rdf:resource="#duration"/>
	<owl:cardinality>1</owl:cardinality>
      </owl:Restriction>
    </rdfs:subClassOf>

    <rdfs:subClassOf>
      <owl:Restriction>
	<owl:onProperty rdf:resource="#beginningTime"/>
	<owl:cardinality>1</owl:cardinality>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>
  
  <owl:DatatypeProperty rdf:ID="duration">
    <rdfs:label>duration</rdfs:label>
    <rdfs:domain rdf:resource="#IntervalDatatypeDescription"/>
    <rdfs:range rdf:resource="&xsd;duration"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="beginningTime">
    <rdfs:label>beginningTime</rdfs:label>
    <rdfs:domain rdf:resource="#IntervalDatatypeDescription"/>
    <rdfs:range rdf:resource="&xsd;dateTime"/>
  </owl:DatatypeProperty>

  <owl:ObjectProperty rdf:ID="hasInstantDescription">
    <rdfs:label>hasInstantDescription</rdfs:label>
    <rdfs:domain rdf:resource="#InstantThing"/>
    <rdfs:range rdf:resource="#InstantDescription"/>
  </owl:ObjectProperty>

  <owl:Class rdf:ID="InstantDescription">
    <rdfs:label>InstantDescription</rdfs:label>
    
    <rdfs:subClassOf>
      <owl:Restriction>
	<owl:onProperty rdf:resource="#definedByCalendar"/>
	<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">
	  1
	</owl:cardinality>
      </owl:Restriction>
    </rdfs:subClassOf>

    <rdfs:subClassOf>
      <owl:Restriction>
	<owl:onProperty rdf:resource="#definedByClock"/>
	<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">
	  1
	</owl:cardinality>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>

  <owl:ObjectProperty rdf:ID="definedByCalendar">
    <rdfs:label>definedByCalendar</rdfs:label>
    <rdfs:domain rdf:resource="#InstantDescription"/>
    <rdfs:range rdf:resource="&cal;CalendarDescription"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="definedByClock">
    <rdfs:label>definedByClock</rdfs:label>
    <rdfs:domain rdf:resource="#InstantDescription"/>
    <rdfs:range rdf:resource="&cal;ClockDescription"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="hasIntervalDescription">
    <rdfs:label>hasIntervalDescription</rdfs:label>
    <rdfs:domain rdf:resource="#IntervalThing"/>
    <rdfs:range rdf:resource="#IntervalDescription"/>
  </owl:ObjectProperty>

  <owl:Class rdf:ID="IntervalDescription">
    <rdfs:label>IntervalDescription</rdfs:label>
    
    <rdfs:subClassOf>
      <owl:Restriction>
	<owl:onProperty rdf:resource="#firstInstantDescription"/>
	<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">
	  1
	</owl:cardinality>
      </owl:Restriction>
    </rdfs:subClassOf>

    <rdfs:subClassOf>
      <owl:Restriction>
	<owl:onProperty rdf:resource="#secondInstantDescription"/>
	<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">
	  1
	</owl:cardinality>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>
     
  <owl:ObjectProperty rdf:ID="firstInstantDescription">
    <rdfs:label>firstInstantDescription</rdfs:label>
    
    <rdfs:domain rdf:resource="#IntervalDescription"/>
    <rdfs:range rdf:resource="#InstantDescription"/>    
  </owl:ObjectProperty>
  
  <owl:ObjectProperty rdf:ID="secondInstantDescription">
    <rdfs:label>secondInstantDescription</rdfs:label>
    
    <rdfs:domain rdf:resource="#IntervalDescription"/>
    <rdfs:range rdf:resource="#InstantDescription"/>    
  </owl:ObjectProperty>

</rdf:RDF>
