Upgraded to GWT 2.6.1

Integrated with Workspace Explorer

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/speciesdiscovery@117124 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-07-09 13:46:05 +00:00
parent a5303d355b
commit b19ac37fcb
18 changed files with 413 additions and 122 deletions

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/species-discovery-3.7.2-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="lib" path="/home/francesco-mangiacrapa/libraries/asm-5.0.3/lib/asm-5.0.3.jar"/>
<classpathentry kind="src" output="target/species-discovery-3.7.3-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -30,6 +31,5 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER/gwt-2.5.1"/> <classpathentry kind="output" path="target/species-discovery-3.7.3-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/species-discovery-3.7.2-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -3,7 +3,7 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<dependent-module archiveName="gis-viewer-3.6.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gis-viewer-TRUNK/gis-viewer-TRUNK"> <dependent-module archiveName="workspace-light-tree-2.14.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-light-tree-TRUNK/workspace-light-tree-TRUNK">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/> <property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>

1
.tern-project Normal file
View File

@ -0,0 +1 @@
{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]}

View File

@ -17,7 +17,7 @@ Authors
Version and Release Date Version and Release Date
------------------------ ------------------------
v. 3.7.2 April 2015 v. 3.8.0 July 2015
Description Description
----------- -----------

View File

@ -1,36 +1,37 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-8-0"
component="org.gcube.portlets-user.species-discovery.3-7-2" date="15-05-2015">
<Change>Upgraded to gwt 2.6.1
</Change>
<Change>Integrated with Workspace Explorer
</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.species-discovery.3-7-2"
date="15-05-2015"> date="15-05-2015">
<Change>Changed dateformat at dd-MM-yyyy <Change>Changed dateformat at dd-MM-yyyy
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-7-1"
component="org.gcube.portlets-user.species-discovery.3-7-1"
date="09-12-2014"> date="09-12-2014">
<Change>Removed openlayers dependency from pom <Change>Removed openlayers dependency from pom
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-7-0"
component="org.gcube.portlets-user.species-discovery.3-7-0"
date="04-06-2014"> date="04-06-2014">
<Change>Updated pom to support new portal configuration (gcube release <Change>Updated pom to support new portal configuration (gcube release
3.2) 3.2)
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-6-0"
component="org.gcube.portlets-user.species-discovery.3-6-0"
date="23-04-2014"> date="23-04-2014">
<Change>Portlet updated to support service updating</Change> <Change>Portlet updated to support service updating</Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-5-0"
component="org.gcube.portlets-user.species-discovery.3-5-0"
date="24-10-2013"> date="24-10-2013">
<Change>Portlet updated to support GWT 2.5.1</Change> <Change>Portlet updated to support GWT 2.5.1</Change>
<Change>Ticket 2224: was implemented</Change> <Change>Ticket 2224: was implemented</Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-4-0"
component="org.gcube.portlets-user.species-discovery.3-4-0"
date="06-09-2013"> date="06-09-2013">
<Change>Enhancements on GUI of SPD portlet was realized (view last <Change>Enhancements on GUI of SPD portlet was realized (view last
query, new expand button are available) query, new expand button are available)
@ -40,45 +41,38 @@
with synonyms", "Unfold the taxa group by". with synonyms", "Unfold the taxa group by".
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-3-0"
component="org.gcube.portlets-user.species-discovery.3-3-0"
date="09-07-2013"> date="09-07-2013">
<Change>Bug Fixed: on species classification <Change>Bug Fixed: on species classification
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-2-0"
component="org.gcube.portlets-user.species-discovery.3-2-0"
date="29-05-2013"> date="29-05-2013">
<Change>Bug Fixed: #612 (SPD: Error when saving csv file in workspace) <Change>Bug Fixed: #612 (SPD: Error when saving csv file in workspace)
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-1-0"
component="org.gcube.portlets-user.species-discovery.3-1-0"
date="14-04-2013"> date="14-04-2013">
<Change>Synch with SPD service changes</Change> <Change>Synch with SPD service changes</Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.3-0-0"
component="org.gcube.portlets-user.species-discovery.3-0-0"
date="05-03-2013"> date="05-03-2013">
<Change>Ticket #1260: This component has been mavenized</Change> <Change>Ticket #1260: This component has been mavenized</Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.2-3-0"
component="org.gcube.portlets-user.species-discovery.2-3-0"
date="17-01-2013"> date="17-01-2013">
<Change>Ticket #986: Species Occurrence jobs / Re-submit job and <Change>Ticket #986: Species Occurrence jobs / Re-submit job and
"info" "info"
</Change> </Change>
<Change>Ticket #1002: SPD portlet persistence refactoring</Change> <Change>Ticket #1002: SPD portlet persistence refactoring</Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.2-2-0"
component="org.gcube.portlets-user.species-discovery.2-2-0"
date="30-11-2012"> date="30-11-2012">
<Change>Ticket #508: Implementation of requirements resulting from <Change>Ticket #508: Implementation of requirements resulting from
ticket #508 ticket #508
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.2-0-0"
component="org.gcube.portlets-user.species-discovery.2-0-0"
date="13-09-2012"> date="13-09-2012">
<Change>Ticket #81: Implementation of requirements resulting from user <Change>Ticket #81: Implementation of requirements resulting from user
feedback feedback
@ -88,14 +82,12 @@
the GIS Viewer the GIS Viewer
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.1-0-1"
component="org.gcube.portlets-user.species-discovery.1-0-1"
date="23-07-2012"> date="23-07-2012">
<Change>Fixed 447: Map generation fails in Species Discovery Portlet <Change>Fixed 447: Map generation fails in Species Discovery Portlet
</Change> </Change>
</Changeset> </Changeset>
<Changeset <Changeset component="org.gcube.portlets-user.species-discovery.1-0-0"
component="org.gcube.portlets-user.species-discovery.1-0-0"
date="04-05-2012"> date="04-05-2012">
<Change>First release</Change> <Change>First release</Change>
</Changeset> </Changeset>

32
pom.xml
View File

@ -19,7 +19,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>species-discovery</artifactId> <artifactId>species-discovery</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>3.7.2-SNAPSHOT</version> <version>3.8.0-SNAPSHOT</version>
<name>gCube Species Discovery</name> <name>gCube Species Discovery</name>
<description> <description>
gCube Species Discovery Portlet lets the users discovery species information from the Species Service. gCube Species Discovery Portlet lets the users discovery species information from the Species Service.
@ -31,11 +31,11 @@
</scm> </scm>
<properties> <properties>
<!-- Convenience property to set the GWT version --> <!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion> <gwtVersion>2.6.1</gwtVersion>
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
<!-- GWT needs at least java 1.6 --> <!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target> <maven.compiler.target>1.7</maven.compiler.target>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory> <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -55,13 +55,14 @@
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId> <artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version> <version>${gwtVersion}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId> <artifactId>gwt-servlet</artifactId>
@ -71,8 +72,8 @@
<dependency> <dependency>
<groupId>com.sencha.gxt</groupId> <groupId>com.sencha.gxt</groupId>
<artifactId>gxt</artifactId> <artifactId>gxt2.2.5-gwt2.X</artifactId>
<version>2.2.5</version> <version>2.7.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
@ -141,6 +142,19 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>workspace-explorer</artifactId>
<version>[0.0.1-SNAPSHOT, 1.0.0-SNAPSHOT)</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>gwt-user</artifactId>
<groupId>com.google.gwt</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- GisViewer dependecies --> <!-- GisViewer dependecies -->
<dependency> <dependency>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
@ -208,7 +222,7 @@
<dependency> <dependency>
<groupId>org.gcube.core</groupId> <groupId>org.gcube.core</groupId>
<artifactId>common-scope-maps</artifactId> <artifactId>common-scope-maps</artifactId>
<scope>provided</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- END FWS --> <!-- END FWS -->

View File

@ -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.SpeciesCapability;
import org.gcube.portlets.user.speciesdiscovery.shared.filter.ResultFilter; import org.gcube.portlets.user.speciesdiscovery.shared.filter.ResultFilter;
import org.gcube.portlets.user.speciesdiscovery.shared.util.SearchTermValidator; import org.gcube.portlets.user.speciesdiscovery.shared.util.SearchTermValidator;
import org.gcube.portlets.widgets.lighttree.client.ItemType; import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSaveNotification.WorskpaceExplorerSaveNotificationListener;
import org.gcube.portlets.widgets.lighttree.client.event.DataLoadEvent; import org.gcube.portlets.widgets.wsexplorer.client.save.WorkspaceExplorerSaveDialog;
import org.gcube.portlets.widgets.lighttree.client.event.DataLoadHandler; import org.gcube.portlets.widgets.wsexplorer.shared.Item;
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 com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.extjs.gxt.ui.client.data.BaseModelData; import com.extjs.gxt.ui.client.data.BaseModelData;
@ -279,6 +276,7 @@ public class SearchController {
@Override @Override
public void onSearch(SearchEvent event) { public void onSearch(SearchEvent event) {
//Info.display("Event", event.toString()); //Info.display("Event", event.toString());
GWT.log(event.toString());
Log.trace(event.toString()); Log.trace(event.toString());
lastSearchEvent = event; lastSearchEvent = event;
@ -852,6 +850,7 @@ public class SearchController {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
new MessageBoxAlert("Error", caught.getMessage() + ". Please, try your request again later.", null); 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."); // 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.getMessage());
// Log.error("Error on loading", "An error occurred on loading Data Source, retry. " +caught); // Log.error("Error on loading", "An error occurred on loading Data Source, retry. " +caught);
@ -862,6 +861,7 @@ public class SearchController {
@Override @Override
public void onSuccess(List<DataSourceModel> result) { public void onSuccess(List<DataSourceModel> result) {
GWT.log("LOADED "+result.size()+" plugin's");
if(result!=null && result.size()>0) if(result!=null && result.size()>0)
AdvancedSearchPanelManager.getInstance().loadDataSource(result); AdvancedSearchPanelManager.getInstance().loadDataSource(result);
@ -929,7 +929,48 @@ public class SearchController {
case CSV: fileName += ".csv"; break; case CSV: fileName += ".csv"; break;
case DARWIN_CORE: fileName += ".xml"; 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<Void>() {
@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); WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the Occurrence points", true, fileName);
popup.setModal(false); popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT); popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@ -970,7 +1011,7 @@ public class SearchController {
}); });
popup.getElement().getStyle().setZIndex(10001); popup.getElement().getStyle().setZIndex(10001);
popup.show(); popup.show();
*/
} }
@ -1003,6 +1044,52 @@ public class SearchController {
private void saveTaxonomyJobErrorFile() { 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<Boolean>() {
@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); WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the file with Job error", true, fileName);
popup.setModal(false); popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT); popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@ -1047,7 +1134,7 @@ public class SearchController {
} }
}); });
popup.show(); popup.show();
*/
} }
}); });
} }
@ -1057,10 +1144,54 @@ public class SearchController {
// IN THIS CASE THERE IS ONE DATASOURCE // IN THIS CASE THERE IS ONE DATASOURCE
final String dataSourceName = listDataSources.get(0)!=null?listDataSources.get(0).getName():"no datasource"; final String dataSourceName = listDataSources.get(0)!=null?listDataSources.get(0).getName():"no datasource";
String fileName = jobTaxonomyModel.getName() +" from "+dataSourceName+" - DWCA.zip"; 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<Boolean>() {
@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); WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the Job", true, fileName);
popup.setModal(false); popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT); popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@ -1105,7 +1236,7 @@ public class SearchController {
} }
}); });
popup.show(); popup.show();
*/
} }
@ -1146,6 +1277,50 @@ public class SearchController {
private void saveOccurrenceJobError() { 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<Boolean>() {
@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); WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the error file", true, fileName);
popup.setModal(false); popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT); popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@ -1191,7 +1366,7 @@ public class SearchController {
}); });
popup.show(); popup.show();
*/
} }
}); });
@ -1226,7 +1401,50 @@ public class SearchController {
// String fileName = "Occurrences results of "+scientificName +"- from "+dataSourceName+" - "+suffix+"."+extension; // String fileName = "Occurrences results of "+scientificName +"- from "+dataSourceName+" - "+suffix+"."+extension;
String fileName = jobOccurrencesModel.getJobName() +" 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<Boolean>() {
@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); WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the Occurrence points", true, fileName);
popup.setModal(false); popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT); popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@ -1273,7 +1491,7 @@ public class SearchController {
} }
}); });
popup.show(); popup.show();
*/
} }
@ -1323,6 +1541,45 @@ public class SearchController {
case DARWIN_CORE_ARCHIVE: fileName += ".zip"; break; 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<Void>() {
@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); WorkspaceLightTreeSavePopup popup = new WorkspaceLightTreeSavePopup("Select where to save the Taxonomy", true, fileName);
popup.setModal(false); popup.setModal(false);
popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT); popup.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
@ -1363,7 +1620,7 @@ public class SearchController {
} }
}); });
popup.show(); popup.show();
*/
} }
public void showOccurrencesMap() 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<DataSourceModel> listDataSources, String groupRank, SpeciesCapability resultType, List<DataSourceModel> listDataSourcesForSynonyms, List<DataSourceModel> listDataSourcesForUnfold) protected void search(SearchType type, String searchTerm, Number upperBoundLongitude, Number upperBoundLatitude, Number lowerBoundLongitude, Number lowerBoundLatitude, Date fromDate, Date toDate, List<DataSourceModel> listDataSources, String groupRank, SpeciesCapability resultType, List<DataSourceModel> listDataSourcesForSynonyms, List<DataSourceModel> listDataSourcesForUnfold)
{ {
GWT.log("IN SEARCH..............");
Log.trace("IN SEARCH.............."); Log.trace("IN SEARCH..............");
AsyncCallback<Void> callback = initSearchCallback(); AsyncCallback<Void> callback = initSearchCallback();
@ -1611,9 +1868,11 @@ public class SearchController {
switch (type) { switch (type) {
case BY_SCIENTIFIC_NAME: case BY_SCIENTIFIC_NAME:
GWT.log("search BY_SCIENTIFIC_NAME");
SpeciesDiscovery.taxonomySearchService.searchByScientificName(searchTerm, filters, callback); SpeciesDiscovery.taxonomySearchService.searchByScientificName(searchTerm, filters, callback);
break; break;
case BY_COMMON_NAME: case BY_COMMON_NAME:
GWT.log("search BY_COMMON_NAME");
SpeciesDiscovery.taxonomySearchService.searchByCommonName(searchTerm, filters, callback); SpeciesDiscovery.taxonomySearchService.searchByCommonName(searchTerm, filters, callback);
break; break;
} }

View File

@ -5,10 +5,12 @@ import org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService
import com.allen_sauer.gwt.log.client.Log; import com.allen_sauer.gwt.log.client.Log;
import com.extjs.gxt.ui.client.widget.ContentPanel; 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.EntryPoint;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand; 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.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window;
@ -32,6 +34,16 @@ public class SpeciesDiscovery implements EntryPoint {
public void onModuleLoad() { public void onModuleLoad() {
Log.setUncaughtExceptionHandler(); 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() { 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() { public void onModuleLoad2() {

View File

@ -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.TextArea;
import com.extjs.gxt.ui.client.widget.form.TextField; import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout; 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.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.dom.client.KeyCodes;
@ -490,6 +491,7 @@ public class SpeciesSearchFormPanel extends ContentPanel {
String searchTerm = searchField.getValue(); String searchTerm = searchField.getValue();
if (buttSimpleSearch.isEnabled() && searchTerm!=null && searchTerm.length()!=0) { if (buttSimpleSearch.isEnabled() && searchTerm!=null && searchTerm.length()!=0) {
GWT.log("search...");
// if(isActiveAdvanced){ // if(isActiveAdvanced){
search(searchTerm, search(searchTerm,
advSearchPanelsManager.getUpperBoundLatitudeField().getValue(), 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<DataSourceModel> listDataSources, String groupRank, SpeciesCapability resultType, List<DataSourceModel> listDataSourceForSynonyms, List<DataSourceModel> listDataSourceForUnfold) protected void search(String searchTerm, Number upperBoundLongitude, Number upperBoundLatitude, Number lowerBoundLongitude, Number lowerBoundLatitude, Date fromDate, Date toDate, List<DataSourceModel> listDataSources, String groupRank, SpeciesCapability resultType, List<DataSourceModel> listDataSourceForSynonyms, List<DataSourceModel> listDataSourceForUnfold)
{ {
GWT.log("Searching...");
mask("Searching..."); mask("Searching...");
//searchButton.setEnabled(false); //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; SearchType type = null;
if (ConstantsSpeciesDiscovery.SCIENTIFIC_NAME.equals(searchType.getSimpleValue())) type = SearchType.BY_SCIENTIFIC_NAME; if (ConstantsSpeciesDiscovery.SCIENTIFIC_NAME.equals(searchType.getSimpleValue())) type = SearchType.BY_SCIENTIFIC_NAME;
if (ConstantsSpeciesDiscovery.COMMON_NAME.equals(searchType.getSimpleValue())) type = SearchType.BY_COMMON_NAME; if (ConstantsSpeciesDiscovery.COMMON_NAME.equals(searchType.getSimpleValue())) type = SearchType.BY_COMMON_NAME;

View File

@ -1184,8 +1184,6 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
logger.trace("loadDataSourceList... "); logger.trace("loadDataSourceList... ");
// System.out.println("loadDataSourceList loadDataSourceList loadDataSourceList loadDataSourceList loadDataSourceList "); // System.out.println("loadDataSourceList loadDataSourceList loadDataSourceList loadDataSourceList loadDataSourceList ");
List<DataSourceModel> listDS = null; List<DataSourceModel> listDS = null;
try { try {
DaoSession.initSessionDaoObjects(getASLSession()); //FIXME temporary? DaoSession.initSessionDaoObjects(getASLSession()); //FIXME temporary?

View File

@ -16,8 +16,11 @@ import javax.persistence.Id;
@Entity @Entity
public class DataSource implements Serializable{ public class DataSource implements Serializable{
private static final long serialVersionUID = 1L; /**
*
*/
private static final long serialVersionUID = 3373136869904925484L;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
protected int internalId; protected int internalId;
@ -26,6 +29,8 @@ public class DataSource implements Serializable{
private String name; private String name;
private String description; private String description;
public DataSource() {}
/** /**
* *
* @param id * @param id
@ -44,7 +49,7 @@ public class DataSource implements Serializable{
setName(name); setName(name);
} }
public DataSource() {}
public String getId() { public String getId() {
return id; return id;

View File

@ -10,15 +10,14 @@ import java.util.ArrayList;
*/ */
public class DataSourceCapability implements Serializable{ public class DataSourceCapability implements Serializable{
/** private static final long serialVersionUID = -9083819206898794333L;
*
*/
private static final long serialVersionUID = 1L;
private ArrayList<SpeciesCapability> listFilters; private ArrayList<SpeciesCapability> listFilters;
private SpeciesCapability capability; private SpeciesCapability capability;
public DataSourceCapability() {}
public DataSourceCapability(SpeciesCapability capability, ArrayList<SpeciesCapability> listFilters) { public DataSourceCapability(SpeciesCapability capability, ArrayList<SpeciesCapability> listFilters) {
super(); super();
this.capability = capability; this.capability = capability;
@ -26,8 +25,6 @@ public class DataSourceCapability implements Serializable{
} }
public DataSourceCapability() {}
public ArrayList<SpeciesCapability> getListFilters() { public ArrayList<SpeciesCapability> getListFilters() {
return listFilters; return listFilters;
} }

View File

@ -1,5 +1,6 @@
package org.gcube.portlets.user.speciesdiscovery.shared; package org.gcube.portlets.user.speciesdiscovery.shared;
import java.io.Serializable;
import java.util.ArrayList; 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<DataSourceCapability> listCapabilities; private ArrayList<DataSourceCapability> listCapabilities;
private DataSourceRepositoryInfo dataSourceRepositoryInfo; private DataSourceRepositoryInfo dataSourceRepositoryInfo;
public DataSourceModel() {}
/** /**
* *
* @param id * @param id
@ -38,7 +42,7 @@ public class DataSourceModel extends DataSource{
super(id,name); super(id,name);
} }
public DataSourceModel() {}
public ArrayList<DataSourceCapability> getListCapabilities() { public ArrayList<DataSourceCapability> getListCapabilities() {
return listCapabilities; return listCapabilities;
@ -51,23 +55,4 @@ public class DataSourceModel extends DataSource{
public DataSourceRepositoryInfo getDataSourceRepositoryInfo() { public DataSourceRepositoryInfo getDataSourceRepositoryInfo() {
return dataSourceRepositoryInfo; 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();
}
} }

View File

@ -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 logoUrl;
private String pageUrl; private String pageUrl;
private Map<String, String> properties; private Map<String, String> properties;
private String name; private String name;
private String description; private String description;
public DataSourceRepositoryInfo() {}
public DataSourceRepositoryInfo(String logoUrl, String pageUrl, Map<String,String> properties, String description) { public DataSourceRepositoryInfo(String logoUrl, String pageUrl, Map<String,String> properties, String description) {
this.logoUrl = logoUrl; this.logoUrl = logoUrl;
this.pageUrl = pageUrl; this.pageUrl = pageUrl;
this.properties = properties; this.properties = properties;
this.description = description; this.description = description;
} }
public DataSourceRepositoryInfo() {}
public String getLogoUrl() { public String getLogoUrl() {
return logoUrl; return logoUrl;
} }

View File

@ -24,7 +24,7 @@ public enum SpeciesCapability {
private String id; private String id;
private String name; private String name;
SpeciesCapability(){ private SpeciesCapability(){
} }
@ -42,7 +42,4 @@ public enum SpeciesCapability {
public String getName() { public String getName() {
return name; return name;
} }
} }

View File

@ -2,7 +2,8 @@
<module rename-to='speciesdiscovery'> <module rename-to='speciesdiscovery'>
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
<!-- Other module inherits --> <!-- Other module inherits -->
<inherits name="com.extjs.gxt.ui.GXT" /> <inherits name="com.extjs.gxt.ui.GXT" />
<inherits name="org.gcube.portlets.user.gcubegisviewer.GCubeGisViewer" /> <inherits name="org.gcube.portlets.user.gcubegisviewer.GCubeGisViewer" />
@ -10,8 +11,7 @@
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" /> <inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
<set-property name="log_DivLogger" value="DISABLED" /> <set-property name="log_DivLogger" value="DISABLED" />
<inherits name='org.gcube.portlets.widgets.lighttree.WorkspacePortletLightTree' /> <!-- <inherits name='org.gcube.portlets.widgets.lighttree.WorkspacePortletLightTree' /> -->
<!-- <inherits name='com.google.gwt.query.Query'/> --> <!-- <inherits name='com.google.gwt.query.Query'/> -->
<!-- Specify the app entry point class. --> <!-- Specify the app entry point class. -->

View File

@ -7,24 +7,16 @@
<html> <html>
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="speciesdiscovery/js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="speciesdiscovery/js/bootstrap.min.js"></script>
<!-- --> <!-- -->
<!-- Consider inlining CSS to reduce the number of requested files --> <!-- Consider inlining CSS to reduce the number of requested files -->
<!-- --> <!-- -->
<link type="text/css" rel="stylesheet" href="SpeciesDiscovery.css"> <link type="text/css" rel="stylesheet" href="SpeciesDiscovery.css">
<link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css"> <link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css">
<!-- -->
<!-- Any title is fine -->
<!-- -->
<title>Species Discovery</title> <title>Species Discovery</title>
<script type="text/javascript" language="javascript" src="speciesdiscovery/speciesdiscovery.nocache.js"></script>
<!-- -->
<!-- This script loads your compiled module. -->
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
<script type="text/javascript" language="javascript" src="speciesdiscovery/speciesdiscovery.nocache.js"></script>
</head> </head>
<!-- --> <!-- -->

View File

@ -58,14 +58,24 @@
</servlet-mapping> </servlet-mapping>
<!-- Workspace Light Tree servlet --> <!-- Workspace Light Tree servlet -->
<!-- <servlet> -->
<!-- <servlet-name>WorkspaceLightService</servlet-name> -->
<!-- <servlet-class>org.gcube.portlets.widgets.lighttree.server.WorkspaceServiceImpl</servlet-class> -->
<!-- </servlet> -->
<!-- <servlet-mapping> -->
<!-- <servlet-name>WorkspaceLightService</servlet-name> -->
<!-- <url-pattern>/speciesdiscovery/WorkspaceLightService</url-pattern> -->
<!-- </servlet-mapping> -->
<servlet> <servlet>
<servlet-name>WorkspaceLightService</servlet-name> <servlet-name>workspaceExplorer</servlet-name>
<servlet-class>org.gcube.portlets.widgets.lighttree.server.WorkspaceServiceImpl</servlet-class> <servlet-class>org.gcube.portlets.widgets.wsexplorer.server.WorkspaceExplorerServiceImpl</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>WorkspaceLightService</servlet-name> <servlet-name>workspaceExplorer</servlet-name>
<url-pattern>/speciesdiscovery/WorkspaceLightService</url-pattern> <url-pattern>/speciesdiscovery/WorkspaceExplorerService</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>