Changeset 3916

Nov 6, 2007, 1:03:23 PM (16 years ago)
Nicklas Nordborg

References #746: Transfer existing UML diagrams to latest MagicDraw?

  • Finished parameters section
  • Added biomaterials sections
1 added
2 edited


  • trunk/doc/src/docbook/developerdoc/api_overview.xml

    r3904 r3916  
    12331233      </sect3>
     1235      <sect3 id="data_api.parameters.description">
     1236        <title>Parameters</title>
     1238        <para>
     1239          The parameter system is a generic system that can store almost
     1240          any kind of simple values (string, numbers, dates, etc.) and
     1241          also links to other items. The <classname>ParameterValueData</classname>
     1242          class is an abstract base class that can hold multiple values (all must be of the
     1243          same type). Unless only a specific type of values should be stored, this is
     1244          the class that should be used when creating references for storing parameter
     1245          values. It makes it possible for a single relaltion to use any kind of
     1246          values or for a collection reference to mix multiple types of values.
     1247          A typical use case maps a <classname>Map</classname> with the
     1248          parameter name as the key:
     1249        </para>
     1251        <programlisting language="java">
     1252private Map&lt;String, ParameterValueData&lt;?&gt;&gt; configurationValues;
     1254   Link parameter name with it's values.
     1255 table="`PluginConfigurationValues`" lazy="true" cascade="all"
     1256   @hibernate.collection-key column="`pluginconfiguration_id`"
     1257   @hibernate.collection-index column="`name`" type="string" length="255"
     1258   @hibernate.collection-many-to-many column="`value_id`"
     1259      class=""
     1261public Map&lt;String, ParameterValueData&lt;?&gt;&gt; getConfigurationValues()
     1263   return configurationValues;
     1265void setConfigurationValues(Map&lt;String, ParameterValueData&lt;?&gt;&gt; configurationValues)
     1267   this.configurationValues = configurationValues;
    12351271      <para>
    1236       TODO
     1272      Now it is possible for the collection to store all types of values:
    12371273      </para>
     1275      <programlisting language="java">
     1276Map&lt;String, ParameterValueData&lt;?&gt;&gt; config = ...
     1277config.put("names", new StringParameterValueData("A", "B", "C"));
     1278config.put("sizes", new IntegerParameterValueData(10, 20, 30));
     1280// When you later load those values again you have to cast
     1281// them to the correct class.
     1282List&lt;String&gt; names = (List&lt;String&gt;)config.get("names").getValues();
     1283List&lt;Integer&gt; sizes = (List&lt;Integer&gt;)config.get("sizes").getValues();
     1286      </sect3>
    12391288    </sect2>
    16231672    <sect2 id="data_api.biomaterials">
    16241673      <title>Biomaterials</title>
     1675      <sect3 id="data_api.biomaterials.uml">
     1676        <title>UML diagram</title>
     1678        <figure id="data_api.figures.biomaterials">
     1679          <title>Biomaterials</title>
     1680          <screenshot>
     1681            <mediaobject>
     1682              <imageobject>
     1683                <imagedata
     1684                  fileref="figures/uml/datalayer.biomaterials.png" format="PNG" />
     1685              </imageobject>
     1686            </mediaobject>
     1687          </screenshot>
     1688        </figure>
     1689      </sect3>
     1691      <sect3 id="data_api.biomaterials.description">
     1692        <title>Biomaterials</title>
     1694        <para>
     1695          There are four types of biomaterials: <classname>BioSourceData</classname>,
     1696          <classname>SampleData</classname>, <classname>ExtractData</classname> and
     1697          <classname>LabeledExtractData</classname>.
     1698          All four types of are derived from the base class <classname>BioMaterialData</classname>.
     1699          The reason for this is that they all share common functionality such as pooling
     1700          and events. By using a common base class we do not have to create duplicate
     1701          classes for keeping track of events and parents.
     1702        </para>
     1704        <para>
     1705          The <classname>BioSourceData</classname> is the simplest of the biomaterials.
     1706          It cannot have parents and can't participate in events. It's only used as a
     1707          (non-required) parent for samples.
     1708        </para>
     1710        <para>
     1711          The <classname>MeasuredBioMaterialData</classname> class is used as a base
     1712          class for the other three biomaterial types. It introduces quantity
     1713          measurements and can store original and remaining quantities. They are
     1714          both optional. If an original quantity has been specified the core
     1715          automatically calculates the remaining quantity based on the events a
     1716          biomaterial participates in.
     1717        </para>
     1719        <para>
     1720          All measured biomaterial have at least one event associated with them,
     1721          the creation event, which holds information about the creation of the
     1722          biomaterial. A measured biomaterial can be created in three ways:
     1723        </para>
     1725        <itemizedlist>
     1726        <listitem>
     1727          <para>
     1728          From a single item of the parent type. Biosource is the parent type of
     1729          samples, sample is the parent type of extracts, and extract is the
     1730          parent type of labeled extracts. In this case the
     1731          <property>pooled</property> property is <constant>false</constant>
     1732          and the parent is specified in the <property>parent</property> property.
     1733          If the parent is not a <classname>BioSourceData</classname> this information
     1734          is duplicated, with the addition of an optional used quantity value, in the
     1735          <property>sources</property> collection of the <classname>BioMaterialEventData</classname>
     1736          object representing the creation event. It is the responsibility of the
     1737          core to make sure that everything is properly synchronized and that
     1738          remaining quantities are calculated.
     1739          </para>
     1740        </listitem>
     1742        <listitem>
     1743          <para>
     1744          From one or more items of the same type, i.e pooling.
     1745          In this case the <property>pooled</property> property is <constant>true</constant>
     1746          and the <property>parent</property> property is null. All source
     1747          biomaterials are contained in the <property>sources</property> collection.
     1748          The core is still responsible for keeping everything synchronized and to
     1749          update remaining quantities.
     1750          </para>
     1751        </listitem>
     1753        <listitem>
     1754          <para>
     1755          As a standalone biomaterial without parents.
     1756          </para>
     1757        </listitem>
     1758        </itemizedlist>
     1760      </sect3>
     1762      <sect3 id="">
     1763        <title>Biomaterial events</title>
     1765        <para>
     1766          An event represents something that happened to one or more biomaterials, for example
     1767          the creation of another biomaterial. The <classname>BioMaterialEventData</classname>
     1768          holds information about entry and event dates, protocols used, the user who is
     1769          responsible, etc. There are three types of events represented by the <property>eventType</property>
     1770          property.
     1771        </para>
     1773        <orderedlist>
     1774        <listitem>
     1775          <para>
     1776          <emphasis>Creation event</emphasis>: This event represents the creation of a (measured)
     1777          biomaterial. The <property>sources</property> collection contains
     1778          information about the biomaterials that were used to create the new
     1779          biomaterial. If the biomaterial is a pooled biomaterial all sources must
     1780          be of the same type. Otherwise there can only be one source of the parent
     1781          type. These rules are maintained by the core.
     1782          </para>
     1783        </listitem>
     1785        <listitem>
     1786          <para>
     1787          <emphasis>Hybridization event</emphasis>: This event represents the creation
     1788          of a hybridization. This event type is needed because we want to keep track
     1789          of quantities for labeled extracts. This event has a hybridization as a
     1790          product instead of a biomaterial. The sources collection can only contain
     1791          labeled extracts.
     1792          </para>
     1793        </listitem>
     1795        <listitem>
     1796          <para>
     1797          <emphasis>Other event</emphasis>: This event represents some other important
     1798          information about a single biomaterial that affected the remaining quantity.
     1799          This event type doesn't have any sources.
     1800          </para>
     1801        </listitem>
     1802        </orderedlist>
     1803      </sect3>
    16251805    </sect2>
Note: See TracChangeset for help on using the changeset viewer.