Difference between revisions of "SpeciesTMPlugin"

From Gcube Wiki
Jump to: navigation, search
(Example)
(Example)
Line 86: Line 86:
  
 
<source lang="xml">
 
<source lang="xml">
 +
 +
 +
<?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: the Integrated Taxonomic Information System (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>
 +
 +
 +
 +
 
<?xml version="1.0" ?>
 
<?xml version="1.0" ?>
 
<t:root xmlns:t="http://gcube-system.org/namespaces/data/trees" SpeciesServiceId="ITIS:689612" t:id="ITIS:689612">
 
<t:root xmlns:t="http://gcube-system.org/namespaces/data/trees" SpeciesServiceId="ITIS:689612" t:id="ITIS:689612">

Revision as of 18:11, 15 March 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: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: the Integrated Taxonomic Information System (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>
 
 
 
 
<?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>