Difference between revisions of "SpeciesTMPlugin"

From Gcube Wiki
Jump to: navigation, search
(Maven coordinates)
(Maven coordinates)
Line 160: Line 160:
  
 
The request classes are separated from the species-tree-plugin, in a component upon which plugin depends. This component is species-tree-requests.
 
The request classes are separated from the species-tree-plugin, in a component upon which plugin depends. This component is species-tree-requests.
 
<source lang="xml">
 
 
<dependency>
 
  <groupId>org.gcube.data.access</groupId>
 
  <artifactId>species-tree-requests</artifactId>
 
  <version>[1.0.0-SNAPSHOT,)</version>
 
</dependency>
 
 
</source>
 
 
  
 
The Maven coordinates of species-tree-requests of its development versions are:  
 
The Maven coordinates of species-tree-requests of its development versions are:  

Revision as of 18:46, 7 February 2013

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: https://gcube.wiki.gcube-system.org/gcube/index.php/Checklist_DwC.
  • 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:689612" t:id="ITIS:689612">
 
    <DwC t:id="237">
 
        <nameAccordingTo t:id="233">Accessed through: the Integrated Taxonomic Information System (ITIS) at http://www.itis.gov on 02-07-2013</nameAccordingTo>
        <scientificNameAuthorship t:id="234">(Smith, 1934)</scientificNameAuthorship>
        <taxonRank t:id="235">Species</taxonRank>
        <parentNameUsageID t:id="236">ITIS:687575</parentNameUsageID>
        <scientificName t:id="237">Parachela maculicauda</scientificName>
        <acceptedNameUsageID t:id="239">null</acceptedNameUsageID>
        <taxonomicStatus t:id="240">valid</taxonomicStatus>
        <taxonRemarks t:id="245">valid</taxonRemarks>
        <bibliographicCitation t:id="246">This information object has been generated via the Species Product Discovery service on 02-07-2013 by interfacing with ITIS</bibliographicCitation>
        <scientificNameID t:id="247">urn:lsid:itis.gov:itis_tsn:689612</scientificNameID>
        <modified t:id="248">null</modified>
 
        <kingdom t:id="249">Animalia</kingdom>
        <phylum t:id="252">Chordata</phylum>
        <family t:id="253">Cyprinidae</family>
        <genus t:id="254">Parachela</genus>
 
        <specificEpithet t:id="255">maculicauda</specificEpithet>
 
    </DwC>
 
    <Properties t:id="256">
        <property t:id="257">
            <key t:id="258">Source</key>
            <value t:id="259">Catalog of Fishes, 08-Apr-2005, website (version 05-Apr-05). Acquired: 2005-04-08.</value>
        </property>        
    <Properties>
 
    <provenance t:id="260">
        <wasDerivedFrom t:id="261">Accessed through: the Integrated Taxonomic Information System (ITIS) at http://www.itis.gov on 02-07-2013</wasDerivedFrom>
        <wasGeneratedBy t:id="262">This information object has been generated via the Species Product Discovery service on 02-07-2013 by interfacing with ITIS</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>