SpeciesTMPlugin

From Gcube Wiki
Revision as of 11:59, 9 April 2013 by Leonardo.candela (Talk | contribs) (Tree model)

Jump to: navigation, search

Species TM Plugin is a plugin of the Tree Manager service that defines and maintains tree views of biodiversity data sources exposed by the Species Manager services. Species TM Plugin provides an uniform model to access and storage data from SPD Service. Each Taxon generated via SPD Service is trasformed in a edge-labelled tree by Species TM Plugin.

Tree model

A tree generated by SpeciesTMPlugin has three subtrees:

  • DwC: each data from SPD Service is mapped to Darwin Core concepts. A detailed description of the Darwin Core fields is listed here;
  • Properties: additional data elements from SPD Service are stored in this subtree.
  • Provenance: information about provenance (wasDerivedFrom, wasGeneratedBy).

Generic model

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="DwC">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element type="xs:string" name="nameAccordingTo"/>
        <xs:element type="xs:string" name="scientificNameAuthorship" minOccurs="0"/>
        <xs:element type="xs:string" name="taxonRank"/>
        <xs:element type="xs:string" name="parentNameUsageID" minOccurs="0"/>
        <xs:element type="xs:string" name="scientificName"/>
        <xs:element type="xs:string" name="acceptedNameUsageID" minOccurs="0"/>
        <xs:element type="xs:string" name="taxonomicStatus"/>
        <xs:element type="xs:string" name="taxonRemarks" minOccurs="0"/>
        <xs:element type="xs:string" name="bibliographicCitation"/>
        <xs:element type="xs:string" name="scientificNameID"/>
        <xs:element type="xs:string" name="modified" minOccurs="0"/>
        <xs:element type="xs:string" name="kingdom" minOccurs="0"/>
        <xs:element type="xs:string" name="phylum" minOccurs="0"/>
        <xs:element type="xs:string" name="class" minOccurs="0"/>
        <xs:element type="xs:string" name="order" minOccurs="0"/>
        <xs:element type="xs:string" name="family" minOccurs="0"/>
        <xs:element type="xs:string" name="genus" minOccurs="0"/>
        <xs:element type="xs:string" name="subgenus" minOccurs="0"/>
        <xs:element type="xs:string" name="specificEpithet" minOccurs="0"/>
        <xs:element type="xs:string" name="infraspecificEpithet" minOccurs="0"/>
        <xs:element type="xs:string" name="verbatimTaxonRank" minOccurs="0"/>
        <xs:element name="vernacularNames" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element type="xs:string" name="language"/>
              <xs:element type="xs:string" name="locality" minOccurs="0"/>
              <xs:element type="xs:string" name="vernacularName"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute ref="tre:id" xmlns:tre="http://gcube-system.org/namespaces/data/trees"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="Properties">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="property" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element type="xs:string" name="key"/>
              <xs:element type="xs:string" name="value"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="provenance">
    <xs:complexType>
      <xs:sequence>
        <xs:element type="xs:string" name="wasDerivedFrom"/>
        <xs:element type="xs:string" name="wasGeneratedBy"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Example

A tree generated by Species TM Plugin looks like this:

<?xml version="1.0" ?>
<t:root xmlns:t="http://gcube-system.org/namespaces/data/trees" SpeciesServiceId="ITIS:710252" storeId="17416" t:id="ITIS:710252" t:source="68baa5c8-d19a-4cae-8abb-adde64a6d331">
 
    <Properties t:id="17417">
    </Properties>
 
    <DwC t:id="17418">
        <taxonRemarks t:id="17422">valid</taxonRemarks>
        <scientificName t:id="17427">Murrayon   </scientificName>
        <class t:id="17432">Eutardigrada</class>
        <scientificNameAuthorship t:id="17419">Bertolani and Pilato, 1989</scientificNameAuthorship>
        <nameAccordingTo t:id="17428">Accessed through: ITIS at http://www.itis.gov on 03-15-2013</nameAccordingTo>
        <genus t:id="17435">Murrayon   </genus>
        <taxonomicStatus t:id="17421">VALID</taxonomicStatus>
        <modified t:id="17425"></modified>
        <acceptedNameUsageID t:id="17420"></acceptedNameUsageID>
        <phylum t:id="17431">Tardigrada</phylum>
        <vernacularNames t:id="17436"></vernacularNames>
        <order t:id="17433">Parachela</order>
        <kingdom t:id="17430">Animalia</kingdom>
        <family t:id="17434">Macrobiotidae   </family>
        <parentNameUsageID t:id="17429">ITIS:710196</parentNameUsageID>
        <bibliographicCitation t:id="17423">This information object has been generated via the Species Product Discovery service on 03-15-2013 by interfacing with ITIS, the Integrated Taxonomic Information System (http://www.itis.gov/)
        </bibliographicCitation>
        <scientificNameID t:id="17424">urn:lsid:itis.gov:itis_tsn:710252</scientificNameID>
        <taxonRank t:id="17426">Genus</taxonRank>
    </DwC>
 
    <provenance t:id="17437">
        <wasDerivedFrom t:id="17438">Accessed through: the Integrated Taxonomic Information System (ITIS) at http://www.itis.gov on 03-15-2013</wasDerivedFrom>
        <wasGeneratedBy t:id="17439">This information object has been generated via the Species Product Discovery service on 03-15-2013 by interfacing with ITIS, the Integrated Taxonomic Information System (http://www.itis.gov/)</wasGeneratedBy>
    </provenance>
 
</t:root>

Bind request

An Activation Record allows the creation of collections. Using an Activation Record the user selects scientific names and data sources to create the collection.

A request has this form:

        List<ScientificName> as ScientificName in List<DataSource> return Taxon

If List<DataSource> is empty, Species TM Plugin will retrieve data from all Data Sources.


Examples:

        'Carcharodon carcharias' , 'Rosa' in ITIS, CatalogueOfLife return Taxon
        'Carcharodon carcharias' , 'Rosa' return Taxon
        'Carcharodon carcharias' return Taxon

Maven coordinates

The Maven coordinates of species-tree-plugin of its development versions are:

<groupId>org.gcube.data.access</groupId>
<artifactId>species-tree-plugin</artifactId>
<version>1.1.0</version>

The request classes are separated from the species-tree-plugin, in a component upon which plugin depends. This component is species-tree-requests.

The Maven coordinates of species-tree-requests of its development versions are:

<groupId>org.gcube.data.access</groupId>
<artifactId>species-tree-requests</artifactId>
<version>1.0.0-SNAPSHOT</version>