<?xml version="1.0" encoding="iso-8859-1"?>
<rdf:RDF
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:cmeta="http://www.cellml.org/metadata/1.0#"
        xmlns:bqs="http://www.cellml.org/bqs/1.0#"
        xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:dcterms="http://purl.org/dc/terms/"
        xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#"
        xmlns:cs="http://www.cellml.org/metadata/simulation/1.0#"
        xmlns:cg="http://www.cellml.org/metadata/graphs/1.0#">
  
  <!-- defining the metadata author for later reference can help can down on
       the amount of repeated text in the XML document -->
  <rdf:Description rdf:ID="andre">
    <vCard:N rdf:parseType="Resource">
      <vCard:Family>Nickerson</vCard:Family>
      <vCard:Given>David</vCard:Given>
    </vCard:N>
    <vCard:EMAIL rdf:parseType="Resource">
      <rdf:value>david.nickerson@nus.edu.sg</rdf:value>
      <rdf:type rdf:resource="http://imc.org/vCard/3.0#internet"/>
    </vCard:EMAIL>
    <vCard:ORG rdf:parseType="Resource">
      <vCard:Orgname>National University of Singapore</vCard:Orgname>
      <vCard:Orgunit>Division of Bioengineering</vCard:Orgunit>
    </vCard:ORG>
  </rdf:Description>
  
  <!-- This first bit of metadata simply states the author and creation date of
       this documents (as indicated by the empty about attribute). -->
  <rdf:Description rdf:about="">
    <!-- refer to the "andre" resource defined previously rather than explicitly
         state all the data again -->
    <dc:creator rdf:resource="#andre"/>
    <dcterms:created rdf:parseType="Resource">
      <dcterms:W3CDTF>2007-11-27</dcterms:W3CDTF>
    </dcterms:created>
    <dc:publisher>
      Division of Bioengineering, National University of Singapore
    </dc:publisher>
  </rdf:Description>
  
  <!-- Now we define a "graph" showing the I-V plot for the three membrane ionic
       currents in the model -->
  <rdf:Description>
    <cg:graph>
      <rdf:Description rdf:ID="current-voltage-plot">
        <!-- label the graph and each axis -->
        <cg:title>Current-Voltage plot</cg:title>
        <cg:x-label>Membrane potential</cg:x-label>
        <cg:y-label>Current</cg:y-label>
        <!-- set the background colour for the graph (white) -->
        <cg:background-colour>#ffffff</cg:background-colour>
        <!-- and define each trace to be included in the graph -->
        <cg:traces rdf:parseType="Collection">
          <!-- first the sodium current -->
          <rdf:Description>
            <cg:label>INa</cg:label>
            <!-- we want line graphs -->
            <cg:type rdf:resource="http://www.cellml.org/metadata/graphs/1.0#line"/>
            <!-- the colour for this trace (red) -->
            <cg:colour>#ff0000</cg:colour>
            <!-- this property provides an indication of how to draw the line,
                 will probably be dropped in favour of predefined types similar
                 tp the cg:type -->
            <cg:line-type rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</cg:line-type>
            <!-- define the variable in the model to define the x-axis of the
                 graph for this trace - the membrane potential variable from the
                 simulation defined within this document -->
            <cg:x-variable rdf:parseType="Resource">
              <cs:simulation rdf:resource="#simulation"/>
              <cg:variable rdf:resource="HH-in-SBML.xml#metaid_0000010"/>
            </cg:x-variable>
            <!-- and the y-axis variable for this trace - the sodium current -->
            <cg:y-variable rdf:parseType="Resource">
              <cs:simulation rdf:resource="#simulation"/>
              <cg:variable rdf:resource="HH-in-SBML.xml#metaid_0000012"/>
            </cg:y-variable>
          </rdf:Description>
          <!-- now the potassium current -->
          <rdf:Description>
            <cg:label>IK</cg:label>
            <cg:type rdf:resource="http://www.cellml.org/metadata/graphs/1.0#line"/>
            <!-- draw this trace in blue -->
            <cg:colour>#0000ff</cg:colour>
            <cg:line-type rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</cg:line-type>
            <!-- again use the membrane potential for the x-axis -->
            <cg:x-variable rdf:parseType="Resource">
              <cs:simulation rdf:resource="#simulation"/>
              <cg:variable rdf:resource="HH-in-SBML.xml#metaid_0000010"/>
            </cg:x-variable>
            <!-- and the y-axis variable for this trace - the potassium
                 current -->
            <cg:y-variable rdf:parseType="Resource">
              <cs:simulation rdf:resource="#simulation"/>
              <cg:variable rdf:resource="HH-in-SBML.xml#metaid_0000013"/>
            </cg:y-variable>
          </rdf:Description>
          <!-- and finally the leakage current -->
          <rdf:Description>
            <cg:label>IL</cg:label>
            <cg:type rdf:resource="http://www.cellml.org/metadata/graphs/1.0#line"/>
            <!-- draw this trace in green -->
            <cg:colour>#00ff00</cg:colour>
            <cg:line-type rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</cg:line-type>
            <!-- again use the membrane potential for the x-axis -->
            <cg:x-variable rdf:parseType="Resource">
              <cs:simulation rdf:resource="#simulation"/>
              <cg:variable rdf:resource="HH-in-SBML.xml#metaid_0000010"/>
            </cg:x-variable>
            <!-- and the y-axis variable for this trace - the leakage current -->
            <cg:y-variable rdf:parseType="Resource">
              <cs:simulation rdf:resource="#simulation"/>
              <cg:variable rdf:resource="HH-in-SBML.xml#metaid_0000014"/>
            </cg:y-variable>
          </rdf:Description>
        </cg:traces>
      </rdf:Description>
    </cg:graph>
  </rdf:Description>
  
  <!-- Now define the numerical simulation we use in the graphs above. -->
  <rdf:Description about="HH-in-SBML.xml#metaid_0000002">
    <cs:simulation>
      <rdf:Description rdf:ID="simulation">
        <cs:simulationName>Hodgkin &amp; Huxley (1952) action potential simulation</cs:simulationName>
        <!-- the linear multistep method to use for time integration, in this
             case use Adam's method -->
        <cs:multistepMethod>adams</cs:multistepMethod>
        <!-- and the iteration method - using functional iteration with Adams as
             the model is not particularly stiff -->
        <cs:iterationMethod>functional</cs:iterationMethod>
        <!-- now we define the interval over which we wish to integrate the
             model -->
        <cs:boundIntervals rdf:parseType="Collection">
          <rdf:Description>
            <!-- link to the variable of integration - which is not explicitly
                 defined in the SBML HH model we are using here, so we go with
                 the unitDefinition for "time" instead. This is something
                 that needs to be addressed. -->
            <cs:boundVariable>
              <rdf:Description rdf:about="HH-in-SBML.xml#metaid_0000003"/>
            </cs:boundVariable>
            <!-- set the maximum step size to be used in the numerical
                 integration -->
            <cs:maximumStepSize
                                rdf:datatype="http://www.w3.org/2001/XMLSchema#double">
              1.0
            </cs:maximumStepSize>
            <!-- and the intervals at which we want to access the integration
                 results -->
            <cs:tabulationStepSize
                                  rdf:datatype="http://www.w3.org/2001/XMLSchema#double">
              1.0
            </cs:tabulationStepSize>
            <!-- the starting value in this simulation for "time" -->
            <cs:startingValue
                             rdf:datatype="http://www.w3.org/2001/XMLSchema#double">
              0.0
            </cs:startingValue>
            <!-- and the end of the integration interval -->
            <cs:endingValue
                           rdf:datatype="http://www.w3.org/2001/XMLSchema#double">
              120.0
            </cs:endingValue>
          </rdf:Description>
        </cs:boundIntervals>
      </rdf:Description>
      </cs:simulation>
  </rdf:Description>
</rdf:RDF>
