diff --git a/.classpath b/.classpath
index 65dc3be..3139190 100644
--- a/.classpath
+++ b/.classpath
@@ -1,6 +1,7 @@
-
+
+
@@ -30,6 +31,5 @@
-
-
+
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index d092213..33ed388 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -3,7 +3,7 @@
-
+
uses
diff --git a/.tern-project b/.tern-project
new file mode 100644
index 0000000..a185ba0
--- /dev/null
+++ b/.tern-project
@@ -0,0 +1 @@
+{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]}
\ No newline at end of file
diff --git a/distro/README b/distro/README
index 3289466..c6cc876 100644
--- a/distro/README
+++ b/distro/README
@@ -17,7 +17,7 @@ Authors
Version and Release Date
------------------------
-v. 3.7.2 April 2015
+v. 3.8.0 July 2015
Description
-----------
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 0a0ecf4..0f58c38 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,36 +1,37 @@
-
+ Upgraded to gwt 2.6.1
+
+ Integrated with Workspace Explorer
+
+
+
Changed dateformat at dd-MM-yyyy
-
Removed openlayers dependency from pom
-
Updated pom to support new portal configuration (gcube release
3.2)
-
Portlet updated to support service updating
-
Portlet updated to support GWT 2.5.1
Ticket 2224: was implemented
-
Enhancements on GUI of SPD portlet was realized (view last
query, new expand button are available)
@@ -40,45 +41,38 @@
with synonyms", "Unfold the taxa group by".
-
Bug Fixed: on species classification
-
Bug Fixed: #612 (SPD: Error when saving csv file in workspace)
-
Synch with SPD service changes
-
Ticket #1260: This component has been mavenized
-
Ticket #986: Species Occurrence jobs / Re-submit job and
"info"
Ticket #1002: SPD portlet persistence refactoring
-
Ticket #508: Implementation of requirements resulting from
ticket #508
-
Ticket #81: Implementation of requirements resulting from user
feedback
@@ -88,14 +82,12 @@
the GIS Viewer
-
Fixed 447: Map generation fails in Species Discovery Portlet
-
First release
diff --git a/pom.xml b/pom.xml
index df4450a..29b2c66 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
org.gcube.portlets.user
species-discovery
war
- 3.7.2-SNAPSHOT
+ 3.8.0-SNAPSHOT
gCube Species Discovery
gCube Species Discovery Portlet lets the users discovery species information from the Species Service.
@@ -31,11 +31,11 @@
- 2.5.1
+ 2.6.1
distro
- 1.6
- 1.6
+ 1.7
+ 1.7
${project.build.directory}/${project.build.finalName}
UTF-8
@@ -55,13 +55,14 @@
-
-
+
+
com.google.gwt
gwt-user
${gwtVersion}
provided
+
com.google.gwt
gwt-servlet
@@ -71,8 +72,8 @@
com.sencha.gxt
- gxt
- 2.2.5
+ gxt2.2.5-gwt2.X
+ 2.7.0
compile
@@ -141,6 +142,19 @@
compile
+
+ org.gcube.portlets.widgets
+ workspace-explorer
+ [0.0.1-SNAPSHOT, 1.0.0-SNAPSHOT)
+ compile
+
+
+ gwt-user
+ com.google.gwt
+
+
+
+
org.gcube.portlets.user
@@ -208,7 +222,7 @@
org.gcube.core
common-scope-maps
- provided
+ compile
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SearchController.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SearchController.java
index f42824f..56f0280 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SearchController.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SearchController.java
@@ -94,12 +94,9 @@ import org.gcube.portlets.user.speciesdiscovery.shared.SearchType;
import org.gcube.portlets.user.speciesdiscovery.shared.SpeciesCapability;
import org.gcube.portlets.user.speciesdiscovery.shared.filter.ResultFilter;
import org.gcube.portlets.user.speciesdiscovery.shared.util.SearchTermValidator;
-import org.gcube.portlets.widgets.lighttree.client.ItemType;
-import org.gcube.portlets.widgets.lighttree.client.event.DataLoadEvent;
-import org.gcube.portlets.widgets.lighttree.client.event.DataLoadHandler;
-import org.gcube.portlets.widgets.lighttree.client.event.PopupEvent;
-import org.gcube.portlets.widgets.lighttree.client.event.PopupHandler;
-import org.gcube.portlets.widgets.lighttree.client.save.WorkspaceLightTreeSavePopup;
+import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSaveNotification.WorskpaceExplorerSaveNotificationListener;
+import org.gcube.portlets.widgets.wsexplorer.client.save.WorkspaceExplorerSaveDialog;
+import org.gcube.portlets.widgets.wsexplorer.shared.Item;
import com.allen_sauer.gwt.log.client.Log;
import com.extjs.gxt.ui.client.data.BaseModelData;
@@ -279,6 +276,7 @@ public class SearchController {
@Override
public void onSearch(SearchEvent event) {
//Info.display("Event", event.toString());
+ GWT.log(event.toString());
Log.trace(event.toString());
lastSearchEvent = event;
@@ -852,6 +850,7 @@ public class SearchController {
@Override
public void onFailure(Throwable caught) {
new MessageBoxAlert("Error", caught.getMessage() + ". Please, try your request again later.", null);
+ GWT.log("loadDataSourceFromService error: "+caught.getMessage());
// Info.display("Error on loading", "An error occurred on loading Data Source, retry.");
// Log.error("Error on loading", "An error occurred on loading Data Source, retry. " +caught.getMessage());
// Log.error("Error on loading", "An error occurred on loading Data Source, retry. " +caught);
@@ -862,6 +861,7 @@ public class SearchController {
@Override
public void onSuccess(List result) {
+ GWT.log("LOADED "+result.size()+" plugin's");
if(result!=null && result.size()>0)
AdvancedSearchPanelManager.getInstance().loadDataSource(result);
@@ -929,7 +929,48 @@ public class SearchController {
case CSV: fileName += ".csv"; break;
case DARWIN_CORE: fileName += ".xml"; break;
}
+
+ final WorkspaceExplorerSaveDialog navigator = new WorkspaceExplorerSaveDialog("Select where to save the Occurrence points", fileName, true);
+
+ WorskpaceExplorerSaveNotificationListener listener = new WorskpaceExplorerSaveNotificationListener(){
+
+ @Override
+ public void onSaving(Item parent, final String fileName) {
+ GWT.log("onSaving parent: "+parent +", fileName" +fileName);
+ navigator.hide();
+
+ Info.display("Saving in progress", "...");
+
+ SpeciesDiscovery.taxonomySearchService.saveSelectedOccurrencePoints(parent.getId(), fileName, fileFormat, typeCSV, new AsyncCallback() {
+ @Override
+ public void onSuccess(Void result) {
+ Info.display("File saved", "The "+fileName+" file has been saved in the workspace.");
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ Info.display("Error saving the file", "An error occurred saving the file, retry.");
+ Log.error("Error saving the file", "An error occurred saving the file, retry." +caught.getMessage());
+ }
+ });
+ }
+
+ @Override
+ public void onAborted() {
+ GWT.log("onAborted");
+ }
+
+ @Override
+ public void onFailed(Throwable throwable) {
+ GWT.log("onFailed");
+ }
+ };
+
+ navigator.addWorkspaceExplorerSaveNotificationListener(listener);
+ navigator.show();
+
+ /*
WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the Occurrence points", true, fileName);
popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@@ -970,7 +1011,7 @@ public class SearchController {
});
popup.getElement().getStyle().setZIndex(10001);
popup.show();
-
+ */
}
@@ -1003,6 +1044,52 @@ public class SearchController {
private void saveTaxonomyJobErrorFile() {
+ final WorkspaceExplorerSaveDialog navigator = new WorkspaceExplorerSaveDialog("Select where to save the file with Job error", fileName, true);
+
+ WorskpaceExplorerSaveNotificationListener listener = new WorskpaceExplorerSaveNotificationListener(){
+
+ @Override
+ public void onSaving(Item parent, final String fileName) {
+ GWT.log("onSaving parent: "+parent +", fileName" +fileName);
+ navigator.hide();
+
+ Info.display("Saving in progress", "...");
+
+ SpeciesDiscovery.taxonomySearchService.saveTaxonomyJobError(jobTaxonomyModel.getIdentifier(), parent.getId(), fileName, scientificName, dataSourceName, new AsyncCallback() {
+
+ @Override
+ public void onSuccess(Boolean result) {
+
+ if(result){
+ Info.display("File saved", "The "+fileName+" file has been saved in the workspace.");
+
+ changeStatusJob(SearchResultType.TAXONOMY_ITEM, jobTaxonomyModel.getIdentifier(), DownloadState.SAVED);
+ }
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ Info.display("Error saving the file", "An error occurred saving the file, retry.");
+ Log.error("Error saving the file", "An error occurred saving the file, retry." +caught.getMessage());
+ }
+ });
+ }
+
+ @Override
+ public void onAborted() {
+ GWT.log("onAborted");
+ }
+
+ @Override
+ public void onFailed(Throwable throwable) {
+ GWT.log("onFailed");
+ }
+ };
+
+ navigator.addWorkspaceExplorerSaveNotificationListener(listener);
+ navigator.show();
+
+ /*
WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the file with Job error", true, fileName);
popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@@ -1047,7 +1134,7 @@ public class SearchController {
}
});
popup.show();
-
+ */
}
});
}
@@ -1057,10 +1144,54 @@ public class SearchController {
// IN THIS CASE THERE IS ONE DATASOURCE
final String dataSourceName = listDataSources.get(0)!=null?listDataSources.get(0).getName():"no datasource";
-
String fileName = jobTaxonomyModel.getName() +" from "+dataSourceName+" - DWCA.zip";
-// String fileName = "DWCA " +rank + " -"+scientificName +"- from "+dataSourceName+".zip";
+
+ final WorkspaceExplorerSaveDialog navigator = new WorkspaceExplorerSaveDialog("Select where to save the Job", fileName, true);
+ WorskpaceExplorerSaveNotificationListener listener = new WorskpaceExplorerSaveNotificationListener(){
+
+ @Override
+ public void onSaving(Item parent, final String fileName) {
+ GWT.log("onSaving parent: "+parent +", fileName" +fileName);
+ navigator.hide();
+
+ Info.display("Saving in progress", "...");
+
+ SpeciesDiscovery.taxonomySearchService.saveTaxonomyJob(jobTaxonomyModel.getIdentifier(), parent.getId(), fileName, scientificName, dataSourceName, new AsyncCallback() {
+
+ @Override
+ public void onSuccess(Boolean result) {
+
+ if(result){
+ Info.display("File saved", "The "+fileName+" file has been saved in the workspace.");
+
+ changeStatusJob(SearchResultType.TAXONOMY_ITEM, jobTaxonomyModel.getIdentifier(), DownloadState.SAVED);
+ }
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ Info.display("Error saving the file", "An error occurred saving the file, retry.");
+ Log.error("Error saving the file", "An error occurred saving the file, retry." +caught.getMessage());
+ }
+ });
+ }
+
+ @Override
+ public void onAborted() {
+ GWT.log("onAborted");
+ }
+
+ @Override
+ public void onFailed(Throwable throwable) {
+ GWT.log("onFailed");
+ }
+ };
+
+ navigator.addWorkspaceExplorerSaveNotificationListener(listener);
+ navigator.show();
+
+ /*
WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the Job", true, fileName);
popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@@ -1105,7 +1236,7 @@ public class SearchController {
}
});
popup.show();
-
+ */
}
@@ -1146,6 +1277,50 @@ public class SearchController {
private void saveOccurrenceJobError() {
+ final WorkspaceExplorerSaveDialog navigator = new WorkspaceExplorerSaveDialog("Select where to save the error file", fileName, true);
+
+ WorskpaceExplorerSaveNotificationListener listener = new WorskpaceExplorerSaveNotificationListener(){
+
+ @Override
+ public void onSaving(Item parent, final String fileName) {
+ GWT.log("onSaving parent: "+parent +", fileName" +fileName);
+ navigator.hide();
+
+ Info.display("Saving in progress", "...");
+
+ SpeciesDiscovery.taxonomySearchService.saveOccurrenceJobError(jobOccurrencesModel, parent.getId(), fileName, scientificName, dataSources, new AsyncCallback() {
+
+ @Override
+ public void onSuccess(Boolean result) {
+
+ if(result){
+ Info.display("File saved", "The "+fileName+" file has been saved in the workspace.");
+ changeStatusJob(SearchResultType.OCCURRENCE_POINT, jobOccurrencesModel.getJobIdentifier(), DownloadState.SAVED);
+ }
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ Info.display("Error saving the file", "An error occurred saving the file, retry.");
+ Log.error("Error saving the file", "An error occurred saving the file, retry." +caught.getMessage());
+ }
+ });
+ }
+
+ @Override
+ public void onAborted() {
+ GWT.log("onAborted");
+ }
+
+ @Override
+ public void onFailed(Throwable throwable) {
+ GWT.log("onFailed");
+ }
+ };
+
+ navigator.addWorkspaceExplorerSaveNotificationListener(listener);
+ navigator.show();
+ /*
WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the error file", true, fileName);
popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@@ -1191,7 +1366,7 @@ public class SearchController {
});
popup.show();
-
+ */
}
});
@@ -1226,7 +1401,50 @@ public class SearchController {
// String fileName = "Occurrences results of "+scientificName +"- from "+dataSourceName+" - "+suffix+"."+extension;
String fileName = jobOccurrencesModel.getJobName() +" from "+dataSourceName+" - "+suffix+"."+extension;
-
+ final String dataSources = dataSourceName;
+ final WorkspaceExplorerSaveDialog navigator = new WorkspaceExplorerSaveDialog("Select where to save the Occurrences", fileName, true);
+ WorskpaceExplorerSaveNotificationListener listener = new WorskpaceExplorerSaveNotificationListener(){
+
+ @Override
+ public void onSaving(Item parent, final String fileName) {
+ GWT.log("onSaving parent: "+parent +", fileName" +fileName);
+ navigator.hide();
+
+ Info.display("Saving in progress", "...");
+
+ SpeciesDiscovery.taxonomySearchService.saveOccurrenceJob(jobOccurrencesModel, parent.getId(), fileName, scientificName, dataSources, new AsyncCallback() {
+
+ @Override
+ public void onSuccess(Boolean result) {
+
+ if(result){
+ Info.display("File saved", "The "+fileName+" file has been saved in the workspace.");
+ changeStatusJob(SearchResultType.OCCURRENCE_POINT, jobOccurrencesModel.getJobIdentifier(), DownloadState.SAVED);
+ }
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ Info.display("Error saving the file", "An error occurred saving the file, retry.");
+ Log.error("Error saving the file", "An error occurred saving the file, retry." +caught.getMessage());
+ }
+ });
+ }
+
+ @Override
+ public void onAborted() {
+ GWT.log("onAborted");
+ }
+
+ @Override
+ public void onFailed(Throwable throwable) {
+ GWT.log("onFailed");
+ }
+ };
+
+ navigator.addWorkspaceExplorerSaveNotificationListener(listener);
+ navigator.show();
+ /*
WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the Occurrence points", true, fileName);
popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@@ -1273,7 +1491,7 @@ public class SearchController {
}
});
popup.show();
-
+ */
}
@@ -1323,6 +1541,45 @@ public class SearchController {
case DARWIN_CORE_ARCHIVE: fileName += ".zip"; break;
}
+ final WorkspaceExplorerSaveDialog navigator = new WorkspaceExplorerSaveDialog("Select where to save the Taxonomy", fileName, true);
+ WorskpaceExplorerSaveNotificationListener listener = new WorskpaceExplorerSaveNotificationListener(){
+
+ @Override
+ public void onSaving(Item parent, final String fileName) {
+ GWT.log("onSaving parent: "+parent +", fileName" +fileName);
+ navigator.hide();
+
+ Info.display("Saving in progress", "...");
+
+ SpeciesDiscovery.taxonomySearchService.saveSelectedTaxonomyPoints(parent.getId(), fileName, fileFormat, new AsyncCallback() {
+
+ @Override
+ public void onSuccess(Void result) {
+ Info.display("File saved", "The "+fileName+" file has been saved in the workspace.");
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ Info.display("Error saving the file", "An error occurred saving the file, retry.");
+ Log.error("Error saving the file", "An error occurred saving the file, retry." +caught.getMessage());
+ }
+ });
+ }
+
+ @Override
+ public void onAborted() {
+ GWT.log("onAborted");
+ }
+
+ @Override
+ public void onFailed(Throwable throwable) {
+ GWT.log("onFailed");
+ }
+ };
+
+ navigator.addWorkspaceExplorerSaveNotificationListener(listener);
+ navigator.show();
+ /*
WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the Taxonomy", true, fileName);
popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@@ -1363,7 +1620,7 @@ public class SearchController {
}
});
popup.show();
-
+ */
}
public void showOccurrencesMap()
@@ -1592,7 +1849,7 @@ public class SearchController {
protected void search(SearchType type, String searchTerm, Number upperBoundLongitude, Number upperBoundLatitude, Number lowerBoundLongitude, Number lowerBoundLatitude, Date fromDate, Date toDate, List listDataSources, String groupRank, SpeciesCapability resultType, List listDataSourcesForSynonyms, List listDataSourcesForUnfold)
{
-
+ GWT.log("IN SEARCH..............");
Log.trace("IN SEARCH..............");
AsyncCallback callback = initSearchCallback();
@@ -1611,9 +1868,11 @@ public class SearchController {
switch (type) {
case BY_SCIENTIFIC_NAME:
+ GWT.log("search BY_SCIENTIFIC_NAME");
SpeciesDiscovery.taxonomySearchService.searchByScientificName(searchTerm, filters, callback);
break;
case BY_COMMON_NAME:
+ GWT.log("search BY_COMMON_NAME");
SpeciesDiscovery.taxonomySearchService.searchByCommonName(searchTerm, filters, callback);
break;
}
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SpeciesDiscovery.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SpeciesDiscovery.java
index c467088..fa56694 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SpeciesDiscovery.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SpeciesDiscovery.java
@@ -5,10 +5,12 @@ import org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService
import com.allen_sauer.gwt.log.client.Log;
import com.extjs.gxt.ui.client.widget.ContentPanel;
+import com.github.gwtbootstrap.client.ui.resources.Resources;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
+import com.google.gwt.core.client.ScriptInjector;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.Window;
@@ -32,6 +34,16 @@ public class SpeciesDiscovery implements EntryPoint {
public void onModuleLoad() {
Log.setUncaughtExceptionHandler();
+
+ boolean jQueryLoaded = isjQueryLoaded();
+ GWT.log("jQueryLoaded: "+jQueryLoaded);
+// GWT.log("Injected : "+Resources.RESOURCES.jquery().getText());
+
+ if (!isjQueryLoaded()) {
+ ScriptInjector.fromString(Resources.RESOURCES.jquery().getText())
+ .setWindow(ScriptInjector.TOP_WINDOW)
+ .inject();
+ }
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@@ -51,6 +63,15 @@ public class SpeciesDiscovery implements EntryPoint {
}
});
}
+
+ /**
+ * Checks if is j query loaded.
+ *
+ * @return true, if is j query loaded
+ */
+ private native boolean isjQueryLoaded() /*-{
+ return (typeof $wnd['jQuery'] !== 'undefined');
+ }-*/;
public void onModuleLoad2() {
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SpeciesSearchFormPanel.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SpeciesSearchFormPanel.java
index 274deda..92b4781 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SpeciesSearchFormPanel.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/client/SpeciesSearchFormPanel.java
@@ -41,6 +41,7 @@ import com.extjs.gxt.ui.client.widget.form.SimpleComboValue;
import com.extjs.gxt.ui.client.widget.form.TextArea;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
+import com.google.gwt.core.shared.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
@@ -490,6 +491,7 @@ public class SpeciesSearchFormPanel extends ContentPanel {
String searchTerm = searchField.getValue();
if (buttSimpleSearch.isEnabled() && searchTerm!=null && searchTerm.length()!=0) {
+ GWT.log("search...");
// if(isActiveAdvanced){
search(searchTerm,
advSearchPanelsManager.getUpperBoundLatitudeField().getValue(),
@@ -512,9 +514,26 @@ public class SpeciesSearchFormPanel extends ContentPanel {
protected void search(String searchTerm, Number upperBoundLongitude, Number upperBoundLatitude, Number lowerBoundLongitude, Number lowerBoundLatitude, Date fromDate, Date toDate, List listDataSources, String groupRank, SpeciesCapability resultType, List listDataSourceForSynonyms, List listDataSourceForUnfold)
{
+ GWT.log("Searching...");
mask("Searching...");
//searchButton.setEnabled(false);
-
+
+ /*
+ GWT.log(searchTerm);
+ GWT.log(upperBoundLongitude!=null?upperBoundLongitude.toString():"upperBoundLongitude");
+ GWT.log(upperBoundLatitude!=null? upperBoundLatitude.toString():"upperBoundLatitude");
+ GWT.log(lowerBoundLongitude!=null? lowerBoundLongitude.toString():"lowerBoundLongitude");
+ GWT.log(lowerBoundLatitude!=null? lowerBoundLatitude.toString():"lowerBoundLatitude");
+ GWT.log(fromDate!=null? fromDate.toString():"fromDate");
+ GWT.log(toDate!=null? toDate.toString():"toDate");
+ for (DataSourceModel dataSourceModel : listDataSources) {
+ GWT.log(dataSourceModel.toString());
+ }
+ GWT.log(groupRank);
+ GWT.log(resultType.toString());
+ GWT.log(listDataSourceForSynonyms!=null?listDataSourceForSynonyms.toString():"");
+ GWT.log(listDataSourceForUnfold!=null?listDataSourceForUnfold.toString():"");
+ */
SearchType type = null;
if (ConstantsSpeciesDiscovery.SCIENTIFIC_NAME.equals(searchType.getSimpleValue())) type = SearchType.BY_SCIENTIFIC_NAME;
if (ConstantsSpeciesDiscovery.COMMON_NAME.equals(searchType.getSimpleValue())) type = SearchType.BY_COMMON_NAME;
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/TaxonomySearchServiceImpl.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/TaxonomySearchServiceImpl.java
index fdd5bef..1e44839 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/TaxonomySearchServiceImpl.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/server/TaxonomySearchServiceImpl.java
@@ -1184,8 +1184,6 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
logger.trace("loadDataSourceList... ");
// System.out.println("loadDataSourceList loadDataSourceList loadDataSourceList loadDataSourceList loadDataSourceList ");
List listDS = null;
-
-
try {
DaoSession.initSessionDaoObjects(getASLSession()); //FIXME temporary?
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSource.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSource.java
index 81f1ee7..455b35f 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSource.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSource.java
@@ -16,8 +16,11 @@ import javax.persistence.Id;
@Entity
public class DataSource implements Serializable{
- private static final long serialVersionUID = 1L;
-
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3373136869904925484L;
+
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
protected int internalId;
@@ -26,6 +29,8 @@ public class DataSource implements Serializable{
private String name;
private String description;
+ public DataSource() {}
+
/**
*
* @param id
@@ -44,7 +49,7 @@ public class DataSource implements Serializable{
setName(name);
}
- public DataSource() {}
+
public String getId() {
return id;
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceCapability.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceCapability.java
index cc35a08..fe8b1b7 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceCapability.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceCapability.java
@@ -10,15 +10,14 @@ import java.util.ArrayList;
*/
public class DataSourceCapability implements Serializable{
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
+ private static final long serialVersionUID = -9083819206898794333L;
+
private ArrayList listFilters;
private SpeciesCapability capability;
+ public DataSourceCapability() {}
+
public DataSourceCapability(SpeciesCapability capability, ArrayList listFilters) {
super();
this.capability = capability;
@@ -26,8 +25,6 @@ public class DataSourceCapability implements Serializable{
}
- public DataSourceCapability() {}
-
public ArrayList getListFilters() {
return listFilters;
}
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceModel.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceModel.java
index 83271a6..b32f5be 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceModel.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceModel.java
@@ -1,5 +1,6 @@
package org.gcube.portlets.user.speciesdiscovery.shared;
+import java.io.Serializable;
import java.util.ArrayList;
/**
@@ -8,12 +9,15 @@ import java.util.ArrayList;
*
*/
-public class DataSourceModel extends DataSource{
+public class DataSourceModel extends DataSource implements Serializable{
- private static final long serialVersionUID = 1L;
+
+ private static final long serialVersionUID = 7399231525793036218L;
private ArrayList listCapabilities;
private DataSourceRepositoryInfo dataSourceRepositoryInfo;
+
+ public DataSourceModel() {}
/**
*
* @param id
@@ -38,7 +42,7 @@ public class DataSourceModel extends DataSource{
super(id,name);
}
- public DataSourceModel() {}
+
public ArrayList getListCapabilities() {
return listCapabilities;
@@ -51,23 +55,4 @@ public class DataSourceModel extends DataSource{
public DataSourceRepositoryInfo getDataSourceRepositoryInfo() {
return dataSourceRepositoryInfo;
}
-
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
- builder.append("DataSourceModel [listCapabilities=");
- builder.append(listCapabilities);
- builder.append(", dataSourceRepositoryInfo=");
- builder.append(dataSourceRepositoryInfo);
- builder.append(", getId()=");
- builder.append(getId());
- builder.append(", getName()=");
- builder.append(getName());
- builder.append(", getDescription()=");
- builder.append(getDescription());
- builder.append("]");
- return builder.toString();
- }
-
-
}
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceRepositoryInfo.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceRepositoryInfo.java
index 5300cd9..db8b3ea 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceRepositoryInfo.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/DataSourceRepositoryInfo.java
@@ -15,22 +15,23 @@ public class DataSourceRepositoryInfo implements Serializable{
/**
*
*/
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = -4557351371954637191L;
private String logoUrl;
private String pageUrl;
private Map properties;
private String name;
private String description;
-
+
+ public DataSourceRepositoryInfo() {}
+
public DataSourceRepositoryInfo(String logoUrl, String pageUrl, Map properties, String description) {
this.logoUrl = logoUrl;
this.pageUrl = pageUrl;
this.properties = properties;
this.description = description;
}
- public DataSourceRepositoryInfo() {}
-
+
public String getLogoUrl() {
return logoUrl;
}
diff --git a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/SpeciesCapability.java b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/SpeciesCapability.java
index 2eb9bc7..2c9bc68 100644
--- a/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/SpeciesCapability.java
+++ b/src/main/java/org/gcube/portlets/user/speciesdiscovery/shared/SpeciesCapability.java
@@ -24,7 +24,7 @@ public enum SpeciesCapability {
private String id;
private String name;
- SpeciesCapability(){
+ private SpeciesCapability(){
}
@@ -42,7 +42,4 @@ public enum SpeciesCapability {
public String getName() {
return name;
}
-
-
-
}
diff --git a/src/main/resources/org/gcube/portlets/user/speciesdiscovery/SpeciesDiscovery.gwt.xml b/src/main/resources/org/gcube/portlets/user/speciesdiscovery/SpeciesDiscovery.gwt.xml
index 38b6f13..e6037ba 100644
--- a/src/main/resources/org/gcube/portlets/user/speciesdiscovery/SpeciesDiscovery.gwt.xml
+++ b/src/main/resources/org/gcube/portlets/user/speciesdiscovery/SpeciesDiscovery.gwt.xml
@@ -2,7 +2,8 @@
-
+
+
@@ -10,8 +11,7 @@
-
-
+
diff --git a/src/main/webapp/SpeciesDiscovery.html b/src/main/webapp/SpeciesDiscovery.html
index 6892e34..38678a1 100644
--- a/src/main/webapp/SpeciesDiscovery.html
+++ b/src/main/webapp/SpeciesDiscovery.html
@@ -7,24 +7,16 @@
-
+
+
+
-
-
-
-
Species Discovery
-
-
-
-
-
-
-
+
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 804c856..ba0336d 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -58,14 +58,24 @@
+
+
+
+
+
+
+
+
+
+
- WorkspaceLightService
- org.gcube.portlets.widgets.lighttree.server.WorkspaceServiceImpl
+ workspaceExplorer
+ org.gcube.portlets.widgets.wsexplorer.server.WorkspaceExplorerServiceImpl
- WorkspaceLightService
- /speciesdiscovery/WorkspaceLightService
+ workspaceExplorer
+ /speciesdiscovery/WorkspaceExplorerService