<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF [
  <!ENTITY owl "http://www.w3.org/2002/07/owl#">
  <!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#">
]>
<rdf:RDF xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#" xmlns:swrlb="http://www.w3.org/2003/11/swrlb#" xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:opm="http://openprovenance.org/ontology#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xml:base="http://openprovenance.org/ontology">

  <!-- Ontology designers/contributors:  Luc Moreau, Simon Miles, Paolo Missier, Paul Groth -->

  <owl:Ontology rdf:about=""/>

  <!-- OPM Root Concept -->

  <owl:Class rdf:ID="Entity"/>

  <!-- OPM Nodes -->

  <owl:Class rdf:ID="Node">
    <rdfs:subClassOf rdf:resource="#Entity"/>
  </owl:Class>
  
  <owl:Class rdf:ID="Process">
    <rdfs:subClassOf rdf:resource="#Node"/>
  </owl:Class>
  
  <owl:Class rdf:ID="Agent">
    <rdfs:subClassOf rdf:resource="#Node"/>
  </owl:Class>
  
  <owl:Class rdf:ID="Artifact">
    <rdfs:subClassOf rdf:resource="#Node"/>
  </owl:Class>

  <!-- OPM Edges -->

  <owl:Class rdf:ID="Edge">
    <rdfs:subClassOf rdf:resource="#Entity"/>
  </owl:Class>

  <owl:ObjectProperty rdf:ID="cause">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain rdf:resource="#Edge"/>
    <rdfs:range rdf:resource="#Node"/>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">the cause of an Edge</rdfs:comment>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="effect">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain rdf:resource="#Edge"/>
    <rdfs:range rdf:resource="#Node"/>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">the effect of an Edge</rdfs:comment>
  </owl:ObjectProperty>


  <owl:Class rdf:ID="WasControlledBy">
    <rdfs:subClassOf rdf:resource="#Edge"/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#cause"/>
        <owl:allValuesFrom rdf:resource="#Agent"/>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#effect"/>
        <owl:allValuesFrom rdf:resource="#Process"/>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>

  <owl:Class rdf:ID="Used">
    <rdfs:subClassOf rdf:resource="#Edge"/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#cause"/>
        <owl:allValuesFrom rdf:resource="#Artifact"/>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#effect"/>
        <owl:allValuesFrom rdf:resource="#Process"/>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>
  
  <owl:Class rdf:ID="WasGeneratedBy">
    <rdfs:subClassOf rdf:resource="#Edge"/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#cause"/>
        <owl:allValuesFrom rdf:resource="#Process"/>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#effect"/>
        <owl:allValuesFrom rdf:resource="#Artifact"/>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>

  <owl:Class rdf:ID="WasTriggeredBy">
    <rdfs:subClassOf rdf:resource="#Edge"/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#cause"/>
        <owl:allValuesFrom rdf:resource="#Process"/>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#effect"/>
        <owl:allValuesFrom rdf:resource="#Process"/>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>
  
  <owl:Class rdf:ID="WasDerivedFrom">
    <rdfs:subClassOf rdf:resource="#Edge"/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#cause"/>
        <owl:allValuesFrom rdf:resource="#Artifact"/>
      </owl:Restriction>
    </rdfs:subClassOf>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#effect"/>
        <owl:allValuesFrom rdf:resource="#Artifact"/>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>



  <!-- Accounts -->

  <owl:Class rdf:ID="Account">
    <rdfs:subClassOf rdf:resource="#Entity"/>
  </owl:Class>
  
  <owl:ObjectProperty rdf:ID="account">
    <rdfs:domain>
      <owl:Class>
        <owl:unionOf rdf:parseType="Collection">
          <owl:Class rdf:about="#Edge"/>
          <owl:Class rdf:about="#Node"/>
          <owl:Class rdf:about="#Annotation"/>
          <!-- add here other classes that have accounts -->
        </owl:unionOf>
      </owl:Class>
    </rdfs:domain>
    <rdfs:range rdf:resource="#Account"/>
  </owl:ObjectProperty>
  
  <!-- Roles -->
  
  <owl:Class rdf:ID="Role">
    <rdfs:subClassOf rdf:resource="#Entity"/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#value" />
        <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>
  
  <owl:ObjectProperty rdf:ID="role">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain>
      <owl:Class>
        <owl:unionOf rdf:parseType="Collection">
          <owl:Class rdf:about="#Used"/>
          <owl:Class rdf:about="#WasGeneratedBy"/>
          <owl:Class rdf:about="#WasControlledBy"/>
        </owl:unionOf>
      </owl:Class>
    </rdfs:domain>
    <rdfs:range rdf:resource="#Role"/>
  </owl:ObjectProperty>
  
  <!-- OPM Graph -->
  
  <owl:Class rdf:ID="OPMGraph">
    <rdfs:subClassOf rdf:resource="#Entity"/>
  </owl:Class>
  
  <!-- note the difference of meaning for OPMGraphs: this relation
       gives the accounts known by this graph, as opposed to denote account
       membership. -->
  
  <owl:ObjectProperty rdf:ID="hasAccount">
    <rdfs:domain>
      <owl:Class rdf:about="#OPMGraph"/>
    </rdfs:domain>
    <rdfs:range rdf:resource="#Account"/>
  </owl:ObjectProperty>
  
  
  <owl:ObjectProperty rdf:ID="hasDependency">
    <rdfs:domain rdf:resource="#OPMGraph"/>
    <rdfs:range rdf:resource="#Edge"/>
  </owl:ObjectProperty>
  
  <owl:ObjectProperty rdf:ID="hasArtifact">
    <rdfs:domain rdf:resource="#OPMGraph"/>
    <rdfs:range rdf:resource="#Artifact"/>
  </owl:ObjectProperty>
  
  <owl:ObjectProperty rdf:ID="hasAgent">
    <rdfs:domain rdf:resource="#OPMGraph"/>
    <rdfs:range rdf:resource="#Agent"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="hasProcess">
    <rdfs:domain rdf:resource="#OPMGraph"/>
    <rdfs:range rdf:resource="#Process"/>
  </owl:ObjectProperty>
  
  
  <!-- OPM Annotation -->
  
  <owl:Class rdf:ID="Annotation">
    <rdfs:subClassOf rdf:resource="#Entity"/>
  </owl:Class>
  
  <owl:Class rdf:ID="Property">
    <rdfs:subClassOf rdf:resource="#Entity"/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#value"/>
        <!-- <rdf:type    rdf:resource="&owl;FunctionalProperty" /> -->
        <owl:allValuesFrom rdf:resource="&owl;Thing"/>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>
  
  <owl:ObjectProperty rdf:ID="value">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain>
      <owl:Class>
        <owl:unionOf rdf:parseType="Collection">
          <owl:Class rdf:about="#Role"/>
          <owl:Class rdf:about="#Property"/>
        </owl:unionOf>
      </owl:Class>
    </rdfs:domain>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">the value of a role or a property</rdfs:comment>
  </owl:ObjectProperty>

 
<!-- Annotations -->

  <owl:Class rdf:ID="Annotable">
    <rdfs:subClassOf rdf:resource="#Entity"/>
    <owl:unionOf rdf:parseType="Collection">
      <owl:Class rdf:about="#Edge"/>
      <owl:Class rdf:about="#Node"/>
      <owl:Class rdf:about="#Annotation"/>
      <owl:Class rdf:about="#Role"/>
      <owl:Class rdf:about="#OPMGraph"/>
      <owl:Class rdf:about="#Account"/>
      <!-- add here other classes that can be annotated -->
    </owl:unionOf>
  </owl:Class>


  <owl:ObjectProperty rdf:ID="property">
    <rdfs:domain rdf:resource="#Annotation"/>
    <rdfs:range rdf:resource="#Property"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="uri">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain rdf:resource="#Property"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="annotation">
    <rdfs:domain rdf:resource="#Annotable"/>
    <rdfs:range rdf:resource="#Annotation"/>
  </owl:ObjectProperty>

<!-- opm-predefined annotations -->

  <owl:ObjectProperty rdf:ID="label">
    <rdfs:domain rdf:resource="#Annotable"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="profile">
    <rdfs:domain rdf:resource="#Annotable"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="type">
    <rdfs:domain rdf:resource="#Annotable"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="pname">
    <rdfs:domain rdf:resource="#Annotable"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
  </owl:ObjectProperty>

  <owl:ObjectProperty rdf:ID="avalue">
    <rdfs:domain rdf:resource="#Artifact"/>
    <rdfs:range rdf:resource="#AValue"/>
  </owl:ObjectProperty>

  <owl:Class rdf:ID="AValue">
    <rdfs:subClassOf rdf:resource="#Entity"/>
  </owl:Class>
  <owl:ObjectProperty rdf:ID="content">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain rdf:resource="#AValue"/>
    <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"/>
  </owl:ObjectProperty>
  <owl:ObjectProperty rdf:ID="encoding">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:domain rdf:resource="#AValue"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
  </owl:ObjectProperty>



  <!-- Time -->

  <owl:Class rdf:ID="OTime">
    <rdfs:subClassOf rdf:resource="#Entity"/>
  </owl:Class>

  <owl:DatatypeProperty rdf:ID="noLaterThan">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">the event occurred no later than this time</rdfs:comment>
    <rdfs:domain rdf:resource="#OTime"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="noEarlierThan">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">the event occurred no earlier than this time</rdfs:comment>
    <rdfs:domain rdf:resource="#OTime"/>
  </owl:DatatypeProperty>

  <owl:DatatypeProperty rdf:ID="exactlyAt">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">The event occurred exactly at this time. This is meant to be an abbreviation for an OTime where noEarlierThan and noLaterThan are identical. exactlyAt should be  disjoint from noLaterThan  U noEarlierThan. </rdfs:comment>
    <rdfs:domain rdf:resource="#OTime"/>
  </owl:DatatypeProperty>

  <owl:Class rdf:ID="EventEdge">
    <rdfs:subClassOf rdf:resource="#Entity"/>
    <owl:unionOf rdf:parseType="Collection">
      <owl:Class rdf:about="#Used"/>
      <owl:Class rdf:about="#WasGeneratedBy"/>
    </owl:unionOf>
  </owl:Class>


  <owl:ObjectProperty rdf:ID="time">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:range rdf:resource="#OTime"/>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">a piece of timing information associated with an event</rdfs:comment>
    <rdfs:domain rdf:resource="#EventEdge"/>
  </owl:ObjectProperty>



  <owl:ObjectProperty rdf:ID="startTime">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:subPropertyOf>
      <owl:ObjectProperty rdf:about="#time"/>
    </rdfs:subPropertyOf>
    <rdfs:domain rdf:resource="#WasControlledBy"/>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">the time at which the agent began controlling the process</rdfs:comment>
  </owl:ObjectProperty>


  <owl:ObjectProperty rdf:ID="endTime">
    <rdf:type    rdf:resource="&owl;FunctionalProperty" />
    <rdfs:subPropertyOf>
      <owl:ObjectProperty rdf:about="#time"/>
    </rdfs:subPropertyOf>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">the time at which the agent end controlling the process</rdfs:comment>
    <rdfs:domain rdf:resource="#WasControlledBy"/>
  </owl:ObjectProperty>
  
  <!--  Axioms -->
  
  <rdf:Description>
    <rdf:type rdf:resource="&owl;AllDisjointClasses"/>
    <owl:members rdf:parseType="Collection">
      <rdf:Description rdf:about="#Agent"/>
      <rdf:Description rdf:about="#Artifact"/>
      <rdf:Description rdf:about="#Process"/>
    </owl:members>
  </rdf:Description>
  
  <rdf:Description>
    <rdf:type rdf:resource="&owl;AllDisjointClasses"/>
    <owl:members rdf:parseType="Collection">
      <rdf:Description rdf:about="#Used"/>
      <rdf:Description rdf:about="#WasControlledBy"/>
      <rdf:Description rdf:about="#WasDerivedFrom"/>
      <rdf:Description rdf:about="#WasGeneratedBy"/>
      <rdf:Description rdf:about="#WasTriggeredBy"/>
    </owl:members>
  </rdf:Description>
  
  
</rdf:RDF>



