SpeciesTMPlugin

From Gcube Wiki
Revision as of 15:17, 29 April 2013 by Valentina.marioli (Talk | contribs) (Generic model)

Jump to: navigation, search

Species TM Plugin is a plugin of the Tree Based Access Facilities 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:

Generic model

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" >
       <xs:element name="t:root" >
              <xs:complexType>
                     <xs:sequence>
                            <xs:element name="taxon" >
                                   <xs:complexType>
                                          <xs:sequence>
                                                 <xs:element name="taxonRemarks" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="scientificName" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="verbatimTaxonRank" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="class" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="scientificNameAuthorship" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="nameAccordingTo" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="genus" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="taxonomicStatus" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="infraspecificEpithet" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="modified" type="xs:date" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="acceptedNameUsageID" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="phylum" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="vernacularNames" maxOccurs="unbounded" minOccurs="0">
                                                        <xs:complexType>
                                                               <xs:sequence>
                                                                      <xs:element name="language" type="xs:string" >
                                                                             <xs:complexType>
                                                                                    <xs:attribute name="t:id" type="xs:int" />
                                                                                </xs:complexType>
                                                                         </xs:element>
                                                                      <xs:element name="locality" type="xs:string" >
                                                                             <xs:complexType>
                                                                                    <xs:attribute name="t:id" type="xs:int" />
                                                                                </xs:complexType>
                                                                         </xs:element>
                                                                      <xs:element name="vernacularName" type="xs:string" >
                                                                             <xs:complexType>
                                                                                    <xs:attribute name="t:id" type="xs:int" />
                                                                                </xs:complexType>
                                                                         </xs:element>
                                                                  </xs:sequence>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="order" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="kingdom" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="family" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="parentNameUsageID" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="rightsHolder" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="subgenus" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="scientificNameID" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="specificEpithet" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="taxonRank" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                             </xs:sequence>
                                          <xs:attribute name="t:id" type="xs:int" />
                                      </xs:complexType>
                               </xs:element>
                            <xs:element name="properties" >
                                   <xs:complexType>
                                          <xs:sequence>
                                                 <xs:element name="property" maxOccurs="unbounded" >
                                                        <xs:complexType>
                                                               <xs:sequence>
                                                                      <xs:element name="key" type="xs:string" >
                                                                             <xs:complexType>
                                                                                    <xs:attribute name="t:id" type="xs:int" />
                                                                                </xs:complexType>
                                                                         </xs:element>
                                                                      <xs:element name="value" type="xs:string" >
                                                                             <xs:complexType>
                                                                                    <xs:attribute name="t:id" type="xs:int" />
                                                                                </xs:complexType>
                                                                         </xs:element>
                                                                  </xs:sequence>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                             </xs:sequence>
                                          <xs:attribute name="t:id" type="xs:int" />
                                      </xs:complexType>
                               </xs:element>
                            <xs:element name="provenance" >
                                   <xs:complexType>
                                          <xs:sequence>
                                                 <xs:element name="wasDerivedFrom" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                                 <xs:element name="wasGeneratedBy" type="xs:string" >
                                                        <xs:complexType>
                                                               <xs:attribute name="t:id" type="xs:int" />
                                                           </xs:complexType>
                                                    </xs:element>
                                             </xs:sequence>
                                          <xs:attribute name="t:id" type="xs:int" />
                                      </xs:complexType>
                               </xs:element>
                        </xs:sequence>
                     <xs:attribute name="xmlns:t" type="xs:string" />
                     <xs:attribute name="SpeciesServiceId" type="xs:string" />
                     <xs:attribute name="storeId" type="xs:int" />
                     <xs:attribute name="t:id" type="xs:string" />
                     <xs:attribute name="t:source" type="xs:string" />
                 </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:159903" storeId="1" t:id="ITIS:159903"
	t:source="6153d4d5-f872-46f2-9ab1-2a056042030e">
 
	<dwc t:id="12">
		<taxonRemarks t:id="16">valid</taxonRemarks>
		<scientificName t:id="21">Carcharodon carcharias</scientificName>
		<verbatimTaxonRank t:id="33"></verbatimTaxonRank>
		<class t:id="26">Chondrichthyes</class>
		<scientificNameAuthorship t:id="13">(Linnaeus,1758)</scientificNameAuthorship>
		<nameAccordingTo t:id="22">Accessed through: the Integrated
			Taxonomic Information System (ITIS) at http://www.itis.gov on
			04-29-2013</nameAccordingTo>
		<genus t:id="29">Carcharodon</genus>
		<taxonomicStatus t:id="15">VALID</taxonomicStatus>
		<infraspecificEpithet t:id="32"></infraspecificEpithet>
		<modified t:id="19"></modified>
		<acceptedNameUsageID t:id="14"></acceptedNameUsageID>
		<phylum t:id="25">Chordata</phylum>
 
		<vernacularNames t:id="34">
			<language t:id="35">English</language>
			<locality t:id="36"></locality>
			<vernacularName t:id="37">great white shark</vernacularName>
		</vernacularNames>
 
		<vernacularNames t:id="38">
			<language t:id="39">Spanish</language>
			<locality t:id="40"></locality>
			<vernacularName t:id="41">jaquetón de ley</vernacularName>
		</vernacularNames>
 
		<vernacularNames t:id="42">
			<language t:id="43">French</language>
			<locality t:id="44"></locality>
			<vernacularName t:id="45">requin blanc</vernacularName>
		</vernacularNames>
 
		<vernacularNames t:id="46">
			<language t:id="47">Spanish</language>
			<locality t:id="48"></locality>
			<vernacularName t:id="49">tiburón blanco</vernacularName>
		</vernacularNames>
 
		<vernacularNames t:id="50">
			<language t:id="51">English</language>
			<locality t:id="52"></locality>
			<vernacularName t:id="53">white shark</vernacularName>
		</vernacularNames>
 
		<order t:id="27">Lamniformes</order>
		<kingdom t:id="24">Animalia</kingdom>
		<family t:id="28">Lamnidae</family>
		<parentNameUsageID t:id="23">ITIS:159902</parentNameUsageID>
		<rightsHolder t:id="17">This information
			object has been generated via the Species Product Discovery service
			on 04-29-2013 by interfacing with ITIS, the Integrated Taxonomic
			Information System (http://www.itis.gov/)</rightsHolder>
		<subgenus t:id="30"></subgenus>
		<scientificNameID t:id="18">urn:lsid:itis.gov:itis_tsn:159903</scientificNameID>
		<specificEpithet t:id="31">carcharias</specificEpithet>
		<taxonRank t:id="20">Species</taxonRank>
	</dwc>
 
	<properties t:id="2">
		<property t:id="3">
			<key t:id="4">Source</key>
			<value t:id="5">NODC Taxonomic Code, database (version 8.0).Acquired: 1996-07-29.</value>
		</property>
		<property t:id="6">
			<key t:id="7">Source</key>
			<value t:id="8">F. A. O., database (version 1). Acquired:1996-07-29.</value>
		</property>
		<property t:id="9">
			<key t:id="10">Source</key>
			<value t:id="11">Catalog of Fishes, 17-Mar-2003, website (version
				13-Mar-03). Acquired: 2003-03-17.</value>
		</property>
	</properties>
 
	<provenance t:id="54">
		<wasDerivedFrom t:id="55">Accessed through: the Integrated
			Taxonomic Information System (ITIS) at http://www.itis.gov on
			04-29-2013</wasDerivedFrom>
		<wasGeneratedBy t:id="56">This information object has been
			generated via the Species Product Discovery service on 04-29-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>