<?xml version="1.0"?>

<!--
      This is an initial definition of an ontology for resources, for the
      purposes of DAML-S. The schemata here are written in a way that allows
      this file reside anywhere (i.e., it does not have to be fetched from its
      "real" URI).

      Author: Ora Lassila

      Copyright 2001 Nokia Research Center.
      All Rights Reserved.

      Subject to the Nokia Open Source (NOKOS) license:
        http://www.opensource.org/licenses/nokia.html
-->


<!DOCTYPE uridef [
  <!ENTITY rdf  "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
  <!ENTITY daml "http://www.daml.org/2001/03/daml+oil#">
  <!ENTITY r    "http://www.daml.org/services/schemata/resources#">
]>

<rdf:RDF xmlns:rdf="&rdf;"
         xmlns:rdfs="&rdfs;"
         xmlns:daml="&daml;"
         xmlns:r="&r;">

<daml:Ontology rdf:about="&r;">
  <daml:versionInfo>no version number yet...</daml:versionInfo>
  <rdfs:comment>Resource Ontology for DAML-S</rdfs:comment>
  <daml:imports rdf:resource="http://www.daml.org/2001/03/daml+oil"/>
</daml:Ontology>


<!--
        BASE CLASS FOR ALL RESOURCES
        
        Resources have "capacity", but this notion can also be used to
        represent various kinds of variables (which could act as pre-
        conditions for allocation): location, access rights, etc.
-->

<daml:Class rdf:about="&r;Resource"
   rdfs:label="Resource"/>

<daml:ObjectProperty rdf:about="&r;allocationType"
   rdfs:label="allocation type">
  <rdfs:domain rdf:resource="&r;Resource"/>
  <rdfs:range rdf:resource="&r;AllocationType"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:about="&r;capacityType"
   rdfs:label="capacity type">
  <rdfs:domain rdf:resource="&r;Resource"/>
  <rdfs:range rdf:resource="&r;CapacityType"/>
</daml:ObjectProperty>

<rdf:Property rdf:about="&r;capacityGranularity"
   rdfs:label="capacity granularity">
  <rdfs:domain rdf:resource="&r;Resource"/>
</rdf:Property>


<!--
        ALLOCATION TYPES
        
        Address essentially what happens after the resource is released:
        
          consumable    (gone after it is allocated)
          reusable      (available after released)
-->

<daml:Class rdf:about="&r;AllocationType"
   rdfs:label="Allocation Type"/>

<r:AllocationType rdf:about="&r;ConsumableAllocation"/>
<r:AllocationType rdf:about="&r;ReusableAllocation"/>


<!--
        CAPACITY TYPES
        
        Address "measures" of allocation:
        
          discrete      (resource has notion of granularity)
          continuous    (allocate any amount)
-->

<daml:Class rdf:about="&r;CapacityType"
   rdfs:label="Capacity Type"/>

<r:CapacityType rdf:about="&r;DiscreteCapacity"/>
<r:CapacityType rdf:about="&r;ContinuousCapacity"/>


<!--
        RESOURCE SUBCLASSES
        
        These mostly address issues of resource composition:

          atomic
            unit-capacity       (on/off)
            batch-capacity      (multiple activities, time-synchronized, can allocate)
          aggregate             (has "sub-resources")
            conjunctive         (must allocate all)
            disjunctive         (can allocate a subset)
-->

<daml:Class rdf:about="&r;AtomicResource"
   rdfs:label="Atomic Resource">
  <rdfs:subClassOf rdf:resource="&r;Resource"/>
</daml:Class>

<daml:Class rdf:about="&r;UnitCapacityResource"
   rdfs:label="Unit-capacity Resource">
  <rdfs:subClassOf rdf:resource="&r;AtomicResource"/>
</daml:Class>

<daml:Class rdf:about="&r;BatchCapacityResource"
   rdfs:label="Batch-capacity Resource">
  <rdfs:subClassOf rdf:resource="&r;AtomicResource"/>
</daml:Class>

<daml:Class rdf:about="&r;AggregateResource"
   rdfs:label="Aggregate Resource">
  <rdfs:subClassOf rdf:resource="&r;Resource"/>
</daml:Class>

<daml:Class rdf:about="&r;ConjunctiveAggregateResource"
   rdfs:label="Conjunctive Aggregate Resource">
  <rdfs:subClassOf rdf:resource="&r;AggregateResource"/>
</daml:Class>

<daml:Class rdf:about="&r;DisjunctiveAggregateResource"
   rdfs:label="Disjunctive Aggregate Resource">
  <rdfs:subClassOf rdf:resource="&r;AggregateResource"/>
</daml:Class>


</rdf:RDF>


