diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/resources/Resources.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/resources/Resources.java index 62b6a1b..b3b84d0 100644 --- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/resources/Resources.java +++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/resources/Resources.java @@ -160,5 +160,9 @@ public interface Resources extends ClientBundle { @Source("attention.png") ImageResource getAttention(); + + @Source("help.html") + TextResource help(); + } diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/resources/help.html b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/resources/help.html new file mode 100644 index 0000000..ab07352 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/resources/help.html @@ -0,0 +1,343 @@ +
+

Examples

+ +

Search all the products about the scientific name 'sarda sarda' in all available datasources.

+

SEARCH BY SN 'sarda sarda'

+ +

Search all the products about 'sarda sarda' and his synonyms in OBIS, in all available datasources.

+

SEARCH BY SN 'sarda sarda' EXPAND WITH OBIS

+ +

Search all the products about 'sarda sarda' and his synonyms found in OBIS, in ITIS datasource.

+

SEARCH BY SN 'sarda sarda' EXPAND WITH OBIS IN ITIS

+ +

Search all the Taxa about 'sarda sarda' and his synonyms found in OBIS, in ITIS datasource.

+

SEARCH BY SN 'sarda sarda' EXPAND WITH OBIS IN ITIS RETURN TAXON

+ +

Search all the products about the scientific names retrieved searching the common 'shark' in the datasource OBIS and mapping it into a scientific name using ITIS. Accept only the results with coordinate less or equals to (15.12, 16.12).

+

SEARCH BY CN 'shark' RESOLVE WITH OBIS EXPAND WITH ITIS WHERE coordinate <= 15.12, 16.12 RETURN Product

+ +

Search all the occurrence points about the scientific names 'sarda sarda' and 'Carcharodon carcharias' expanded with synonyms from datasource OBIS, found in ITIS and with an event date between 2000 and 2005.

+

SEARCH BY SN 'sarda sarda', 'Carcharodon carcharias' EXPAND WITH OBIS IN ITIS WHERE eventDate >= '2000' AND eventDate <= '2005' RETURN Occurrence

+ +

Search all the products about the scientific names retrieved searching the common 'shark' in the datasource OBIS and mapping it into a scientific name using ITIS. Accept only the results with coordinate less or equals to (15.12, 16.12). Results are post filtered using the xpath expression "//product[type='TAXON' and counter>0]".

+

SEARCH BY CN 'shark' RESOLVE WITH OBIS EXPAND WITH ITIS WHERE coordinate <= 15.12, 16.12 RETURN Product HAVING xpath("//product[type='TAXON' and counter>0]")

+ + +

Synopsis

+ + +
SEARCH BY term [, ...]
+      [ IN datasource [, ...] ]
+      [ WHERE condition [AND condition] ]
+      [ RETURN {PRODUCT | OCCURRENCE | TAXON} ]
+      [ HAVING having expression ]
+
+

+

Where term can be one of:

+ + +
CN common name [, ...] RESOLVE [ WITH datasource [, ...] ] [EXPAND [ WITH datasource [, ...] ] ]
+SN scientific name [, ...] [EXPAND [ WITH datasource [, ...] ] ]
+
+
+

+

Where condition can be one of:

+ +
coordinate {< | <= | == | => | >} LAT, LONG
+eventDate {< | <= | == | => | >} DATE
+
+
+

+

Where having condition is a boolean expression composed by those elements:

+ +
item expression : item property {< | <= | == | != | => | >} value
+function call: xpath(xpath expression) | exl(exl expression)
+
+
+

+

Description

+

The Search by query retrieves all the available elements from the species service. +The general processing of Search by is as follows: +

+

+
  1. All the term are elaborated depending on the specified type: +
    • CN case: +
      • all the specified common names are mapped into scientific names using the specified datasources or all the available datasources if no one as been specified +
      • if the EXPAND clause is specified the scientific names are expanded using the synonyms provided by the specified datasources or using all the available datasources if no one as been specified +
      +
    • SN case: +
      • if the EXPAND clause is specified all the specified scientific names are expanded using the synonyms provided by the specified datasources or using all the available datasources if no one as been specified +
      +
    +
  2. The scientific names retrieved from the term elaboration are used for the retrieving of the specified elements in the RETURN clause (if no element is specified PRODUCT are returned). +
  3. If the WHERE clause is specified, all the elements that do not satisfy the condition are eliminated from the output (filtering made inside the Datasource). +
  4. If the HAVING clause is specified, all the elements that do not satisfy the having expression are eliminated from the output (the filtering is made outside the Datasource). +
+

+

Date format

+

Accepted DATE formats are:

+ +

+

Item properties

+

Based on query returns type the post-filtering expression can access single item properties. +

+
Taxon
+ + + + + + + + + + + + + + + + + + + +
Property name Value Type +
author String +
citation String +
credits String +
id String +
lsid String +
parent Taxon
rank String +
scientificName String +
+

+
Occurrence
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Property name Value Type +
author String +
basisOfRecord enumeration {PreservedSpecimen, FossilSpecimen, LivingSpecimen, HumanObservation, MachineObservation} +
catalogueNumber String +
citation String +
collectionCode String +
coordinateUncertaintyInMeters String +
country String +
credits String +
dataSet DataSet
decimalLatitude double +
decimalLongitude double +
eventDate Calendar +
family String +
id String +
institutionCode String +
kingdom String +
locality String +
maxDepth double +
minDepth double +
modified Calendar +
properties List +
provider String +
recordedBy String +
scientificName String +
+

+
DataSet
+ + + + + + + + + + +
Property name Value Type +
citation String +
dataProvider DataProvider
id String +
name String +
+

+
DataProvider
+ + + + + + + +
Property name Value Type +
id String +
name String +
+


+

+

+
Product
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Property name Value Type +
author String +
citation String +
commonNames List of CommonName
credits String
dataSet DataSet
id String +
lsid String +
parent Taxon
products List of Product
properties List of ElementProperty
provider String +
rank String +
scientificName String +
+

+
CommonName
+ + + + + + + + + +
Property name Value Type +
language String +
locality String +
name String +
+

+
Product
+ + + + + + + + + +
Property name Value Type +
count int +
key String +
type enumeration {Classification, NamesMapping, Occurences, Synonims} +
+


+

+

+
ElementProperty
+ + + + + + + +
Property name Value Type +
name String +
value String +
+

+

Functions

+

Currently the supported functions are: +

+ +
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/window/HelpQueryWindow.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/window/HelpQueryWindow.java index 5c655d3..4fb171a 100644 --- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/window/HelpQueryWindow.java +++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/window/HelpQueryWindow.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import org.gcube.portlets.user.speciesdiscovery.client.model.QueryModel; +import org.gcube.portlets.user.speciesdiscovery.client.resources.Resources; import com.extjs.gxt.ui.client.Style.HorizontalAlignment; import com.extjs.gxt.ui.client.Style.Scroll; @@ -30,11 +31,11 @@ public class HelpQueryWindow extends Dialog { setModal(true); // setBodyBorder(true); setBodyStyle("padding: 9px; background: none"); - setWidth(530); + setWidth(830); setResizable(false); setButtons(Dialog.OK); - helpHtml.setHtml("All result items with scientfic name 'Mola mola' in the Obis and GBIF datasources:" + /*helpHtml.setHtml("All result items with scientfic name 'Mola mola' in the Obis and GBIF datasources:" + "'Mola mola', 'Abra alba' as ScientificName in Obis, GBIF return *"); ListStore employeeList = new ListStore(); @@ -43,15 +44,17 @@ public class HelpQueryWindow extends Dialog { ListView lView = new ListView(); // getTemplate() returns the desired template lView.setTemplate(getTemplate()); - lView.setStore(employeeList); + lView.setStore(employeeList);*/ + + helpHtml.setHtml(Resources.INSTANCE.help().getText()); ContentPanel cp = new ContentPanel(); cp.setBodyBorder(false); cp.setHeaderVisible(false); cp.setButtonAlign(HorizontalAlignment.CENTER); cp.setLayout(new FitLayout()); - cp.setSize(500, 420); - cp.add(lView); + cp.setSize(800, 420); + cp.add(helpHtml); cp.setScrollMode(Scroll.AUTOY); add(cp); diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/service/SpeciesService.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/service/SpeciesService.java index 5761423..f93a198 100644 --- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/service/SpeciesService.java +++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/service/SpeciesService.java @@ -186,6 +186,7 @@ public class SpeciesService { List listDsModel = new ArrayList(); ScopeProvider.instance.set(scope.toString()); + System.out.println("setting scope "+scope); List plugin = call.getPluginsDescription(); if(plugin!=null){ diff --git a/src/main/webapp/SpeciesDiscovery.css b/src/main/webapp/SpeciesDiscovery.css index 12edd96..1eb3c03 100644 --- a/src/main/webapp/SpeciesDiscovery.css +++ b/src/main/webapp/SpeciesDiscovery.css @@ -1,56 +1,67 @@ /** Add css rules here for your application. */ - #images-view .x-panel-body { - background: none repeat scroll 0 0 white; - font: 11px Arial,Helvetica,sans-serif; + background: none repeat scroll 0 0 white; + font: 11px Arial, Helvetica, sans-serif; } + #images-view .thumb { - background: none repeat scroll 0 0 #DDDDDD; - padding: 3px; + background: none repeat scroll 0 0 #DDDDDD; + padding: 3px; } + #images-view .thumb img { - height: 60px; - width: 80px; + height: 60px; + width: 80px; } + #images-view .thumb-wrap { - border: 1px solid white; - float: left; - margin: 4px 0 4px 4px; - padding: 5px; + border: 1px solid white; + float: left; + margin: 4px 0 4px 4px; + padding: 5px; } + .x-theme-access #images-view .thumb-wrap { - border: 1px solid #232D38; + border: 1px solid #232D38; } + #images-view .thumb-wrap span { - display: block; - overflow: hidden; - text-align: center; + display: block; + overflow: hidden; + text-align: center; } + #images-view .x-view-over { - background: url("../gxt/images/default/grid/row-over.gif") repeat-x scroll left top #EFEFEF; - border: 1px solid #DDDDDD; - padding: 4px; + background: url("../gxt/images/default/grid/row-over.gif") repeat-x + scroll left top #EFEFEF; + border: 1px solid #DDDDDD; + padding: 4px; } + #images-view .x-view-selected { - background: none no-repeat scroll right bottom #EFF5FB; - border: 1px solid #99BBE8; - padding: 4px; + background: none no-repeat scroll right bottom #EFF5FB; + border: 1px solid #99BBE8; + padding: 4px; } + #images-view .x-view-selected .thumb { - background: none repeat scroll 0 0 transparent; + background: none repeat scroll 0 0 transparent; } + #images-view .loading-indicator { - background-image: url("../gxt/resources/images/default/grid/loading.gif"); - background-position: left center; - background-repeat: no-repeat; - font-size: 11px; - margin: 10px; - padding-left: 20px; + background-image: + url("../gxt/resources/images/default/grid/loading.gif"); + background-position: left center; + background-repeat: no-repeat; + font-size: 11px; + margin: 10px; + padding-left: 20px; } /**FIX for portal css interference**/ -table { clear: none !important; } - +table { + clear: none !important; +} .button-hyperlink .x-btn-text { cursor: pointer !important; @@ -64,26 +75,19 @@ table { clear: none !important; } color: #4784C3 !important; /*color: #000 !important;*/ font-size: 10px; - /*font-family: Serif, "Times New Roman", Georgia;*/ - /*color: black;*/ /*font-weight: bold;*/ + /*font-family: Serif, "Times New Roman", Georgia;*/ /*color: black;*/ + /*font-weight: bold;*/ text-decoration: underline !important; } /* remove images */ .button-hyperlink .x-btn-tl,.button-hyperlink.x-btn-tr,.button-hyperlink .x-btn-tc,.button-hyperlink .x-btn-ml,.button-hyperlink .x-btn-mr,.button-hyperlink .x-btn-mc,.button-hyperlink .x-btn-bl,.button-hyperlink .x-btn-br,.button-hyperlink .x-btn-bc -{ + { background-image: none !important; background: none !important; } -.button-hyperlink .x-btn-small .x-btn-mr, -.button-hyperlink .x-btn-small .x-btn-ml, -.button-hyperlink .x-btn-small .x-btn-mc, -.button-hyperlink .x-btn-small .x-btn-br, -.button-hyperlink .x-btn-small .x-btn-bl, -.button-hyperlink .x-btn-small .x-btn-bc, -.button-hyperlink .x-btn-small .x-btn-tc, -.button-hyperlink .x-btn-small .x-btn-tr, -.button-hyperlink .x-btn-small .x-btn-tl -{ + +.button-hyperlink .x-btn-small .x-btn-mr,.button-hyperlink .x-btn-small .x-btn-ml,.button-hyperlink .x-btn-small .x-btn-mc,.button-hyperlink .x-btn-small .x-btn-br,.button-hyperlink .x-btn-small .x-btn-bl,.button-hyperlink .x-btn-small .x-btn-bc,.button-hyperlink .x-btn-small .x-btn-tc,.button-hyperlink .x-btn-small .x-btn-tr,.button-hyperlink .x-btn-small .x-btn-tl + { background-image: none !important; background: none !important; } @@ -92,9 +96,10 @@ table { clear: none !important; } { font-size: 0px; } + table.imagetable { - font-family: verdana,arial,sans-serif; - font-size:10px; + font-family: verdana, arial, sans-serif; + font-size: 10px; /*color:#333333; border-width: 1px; border-color: #999999; @@ -103,16 +108,17 @@ table.imagetable { border-spacing: 0px; border: 1px solid #e3e3e3; background-color: #f2f2f2; - width: 100%; - margin-bottom: 20px; + width: 100%; + margin-bottom: 20px; /*border-radius: 6px; -webkit-border-radius: 6px; -moz-border-radius: 6px; */ } + table.imagetable .title { /*background:#b5cfd2 url('images/cell-blue.jpg');*/ - background-color:#D3E1F1; + background-color: #D3E1F1; border-width: 1px; width: 30%; padding: 5px; @@ -120,9 +126,10 @@ table.imagetable .title { border-style: solid; border-color: #999999; } + table.imagetable td { /*background:#dcddc0 url('images/cell-grey.jpg');*/ - background-color:#FFF; + background-color: #FFF; border-width: 1px; border-style: solid; border-color: #999999; @@ -141,10 +148,6 @@ table.imagetable th { border-spacing: 0px; } - - - - table.simpletable { table-layout: fixed; text-align: center; @@ -170,7 +173,7 @@ table.simpletable th { table.simpletable td { text-align: center; /*background:#FFD340;*/ - background-color:#FFF; + background-color: #FFF; border-collapse: collapse; border-spacing: 0px; border: 1px solid #024e68; @@ -180,13 +183,10 @@ table.simpletable .commonname { text-align: center; width: 30%; height: 22px; - background:#b5cfd2; + background: #b5cfd2; /*background:#b5cfd2;*/ } - - - .wizardButton { height: 22px !important; -moz-border-radius: 3px; @@ -223,11 +223,11 @@ table.simpletable .commonname { .wizardButton:active { /*background: #e3e8f3 url(images/white-grad.png) repeat-x scroll left top;*/ + } - .toolbar-filter { - background-image: none !important; + background-image: none !important; border-width: 1px; /*border-style: inset;*/ border-bottom-style: solid; @@ -236,7 +236,6 @@ table.simpletable .commonname { /*font-family: tahoma,arial,verdana,sans-serif;*/ } - .button-noimage .x-btn-text { cursor: pointer !important; cursor: hand !important; @@ -251,47 +250,24 @@ table.simpletable .commonname { /*font-family: Serif, "Times New Roman", Georgia;*/ } /* remove images */ -.button-noimage .x-btn-tl, -.button-noimage-btn-tr, -.button-noimage .x-btn-tc, -.button-noimage .x-btn-ml, -.button-noimage .x-btn-mr, -.button-noimage .x-btn-mc, -.button-noimage .x-btn-bl, -.button-noimage .x-btn-br, -.button-noimage .x-btn-bc -{ +.button-noimage .x-btn-tl,.button-noimage-btn-tr,.button-noimage .x-btn-tc,.button-noimage .x-btn-ml,.button-noimage .x-btn-mr,.button-noimage .x-btn-mc,.button-noimage .x-btn-bl,.button-noimage .x-btn-br,.button-noimage .x-btn-bc + { background-image: none !important; background: none !important; } -.button-noimage .x-btn-small .x-btn-mr, -.button-noimage .x-btn-small .x-btn-ml, -.button-noimage .x-btn-small .x-btn-mc, -.button-noimage .x-btn-small .x-btn-br, -.button-noimage .x-btn-small .x-btn-bl, -.button-noimage .x-btn-small .x-btn-bc, -.button-noimage .x-btn-small .x-btn-tc, -.button-noimage .x-btn-small .x-btn-tr, -.button-noimage .x-btn-small .x-btn-tl -{ + +.button-noimage .x-btn-small .x-btn-mr,.button-noimage .x-btn-small .x-btn-ml,.button-noimage .x-btn-small .x-btn-mc,.button-noimage .x-btn-small .x-btn-br,.button-noimage .x-btn-small .x-btn-bl,.button-noimage .x-btn-small .x-btn-bc,.button-noimage .x-btn-small .x-btn-tc,.button-noimage .x-btn-small .x-btn-tr,.button-noimage .x-btn-small .x-btn-tl + { background-image: none !important; background: none !important; } /* remove little dots in FF */ -.button-noimage .x-btn-tl i, -.button-noimage .x-btn-tr i, -.button-noimage .x-btn-tc i, -.button-noimage .x-btn-ml i, -.button-noimage .x-btn-mr i, -.button-noimage .x-btn-mc i, -.button-noimage .x-btn-bl i, -.button-noimage .x-btn-br i, -.button-noimage .x-btn-bc i +.button-noimage .x-btn-tl i,.button-noimage .x-btn-tr i,.button-noimage .x-btn-tc i,.button-noimage .x-btn-ml i,.button-noimage .x-btn-mr i,.button-noimage .x-btn-mc i,.button-noimage .x-btn-bl i,.button-noimage .x-btn-br i,.button-noimage .x-btn-bc i { font-size: 0px; } -.labelCredits{ +.labelCredits { font-size: 11px; font-style: italic; font-weight: bold; @@ -300,46 +276,78 @@ table.simpletable .commonname { margin-left: 30px; } -.labelParameters{ +.labelParameters { font-size: 11px; color: black; font-weight: bold; } -.logoDataSource{ +.logoDataSource { margin: 15px; } -.valueParameters{ +.valueParameters { font-size: 11px; color: black; margin-left: 20px; } table.parameters { - font-family: verdana,arial,sans-serif; - font-size:10px; + font-family: verdana, arial, sans-serif; + font-size: 10px; border-spacing: 0px; border: none; padding: 1px; width: 99%; } -table.parameters .title{ +table.parameters .title { font-weight: bold; } -.status-of{ +.status-of { margin-right: 20px; } -.image-load-synonyms{ +.image-load-synonyms { cursor: pointer !important; cursor: hand !important; border: none !important; margin-top: 3px; } -.margin-occurrence-link{ +.margin-occurrence-link { margin-right: 5px; -} \ No newline at end of file +} + +.info-title { + color: #1C3C78; + font-weight: bold; + padding-bottom: 5px; + padding-top: 7px; +} + +.info-query-description { + color: black; + padding-bottom: 3px; +} + +.info-query-text { + color: gray; + font-weight: bold; + padding-bottom: 5px; +} + +.info-padding { + padding-bottom: 5px; +} + +/* gxt 2 css interference*/ +ul { + list-style: square !important; + padding-left:10px !important; + margin-left: 10px !important; +} + + +