Added facility to stop loading of search results

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/speciesdiscovery@142637 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2017-02-16 16:15:45 +00:00
parent 7dea8a1424
commit 9f81b978ed
14 changed files with 785 additions and 308 deletions

View File

@ -10,8 +10,6 @@ import java.util.List;
import java.util.Set;
import org.gcube.portlets.user.speciesdiscovery.client.advancedsearch.AdvancedSearchPanelManager;
import org.gcube.portlets.user.speciesdiscovery.client.event.ActiveButtonCheckAllRowEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.ActiveButtonCheckAllRowEventHandler;
import org.gcube.portlets.user.speciesdiscovery.client.event.ActiveFilterOnResultEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.ActiveFilterOnResultEventHandler;
import org.gcube.portlets.user.speciesdiscovery.client.event.ActiveMaskLoadingGrid;
@ -53,6 +51,11 @@ import org.gcube.portlets.user.speciesdiscovery.client.event.ShowOccurrencesEven
import org.gcube.portlets.user.speciesdiscovery.client.event.ShowOccurrencesEventHandler;
import org.gcube.portlets.user.speciesdiscovery.client.event.ShowOnlySelectedRowEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.ShowOnlySelectedRowEventHandler;
import org.gcube.portlets.user.speciesdiscovery.client.event.StopCurrentSearchEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.StopCurrentSearchEventHandler;
import org.gcube.portlets.user.speciesdiscovery.client.event.StreamCompletedEventEventHandler;
import org.gcube.portlets.user.speciesdiscovery.client.event.StreamEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.StreamEvent.Event;
import org.gcube.portlets.user.speciesdiscovery.client.event.UpdateAllRowSelectionEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.UpdateAllRowSelectionEventHandler;
import org.gcube.portlets.user.speciesdiscovery.client.event.UpdateFilterOnResultEvent;
@ -183,15 +186,21 @@ public class SearchController {
}
});
eventBus.addHandler(ActiveButtonCheckAllRowEvent.TYPE, new ActiveButtonCheckAllRowEventHandler() {
eventBus.addHandler(StreamEvent.TYPE, new StreamCompletedEventEventHandler() {
@Override
public void onActiveCkeckAllRow(ActiveButtonCheckAllRowEvent activeFilterCheckAllRowEvent) {
public void onStreamCompleteEvent(StreamEvent streamEvent) {
//ACTIVE SELECT ALL ROW
if(lastSearchEvent.getResultType().equals(SpeciesCapability.RESULTITEM))
searchBorderLayoutPanel.getSpeciesCenterPanel().getResultRowPanel().activeCheckAllRows(activeFilterCheckAllRowEvent.isActiveFilter());
searchBorderLayoutPanel.getSpeciesCenterPanel().getResultRowPanel().activeCheckAllRows(streamEvent.isActiveFilter());
else if(lastSearchEvent.getResultType().equals(SpeciesCapability.TAXONOMYITEM))
searchBorderLayoutPanel.getSpeciesCenterPanel().getTaxonomyRowPanel().activeCheckAllRows(activeFilterCheckAllRowEvent.isActiveFilter());
searchBorderLayoutPanel.getSpeciesCenterPanel().getTaxonomyRowPanel().activeCheckAllRows(streamEvent.isActiveFilter());
if(streamEvent.getEvent().equals(Event.COMPLETED))
searchBorderLayoutPanel.getSpeciesNorthPanel().visibleButtonStopSearch(false);
}
});
@ -321,16 +330,11 @@ public class SearchController {
@Override
public void onSearch(SearchEvent event) {
//Info.display("Event", event.toString());
GWT.log(event.toString());
Log.trace(event.toString());
lastSearchEvent = event;
doActiveMaskLoadingGridAndButtonSearch(true);
// ResultFilterPanelManager.getInstance().setGroupByRank(event.getGroupByRank());
searchBorderLayoutPanel.getSpeciesNorthPanel().visibleButtonStopSearch(true);
if(event.getType().equals(SearchType.BY_COMMON_NAME) || event.getType().equals(SearchType.BY_SCIENTIFIC_NAME)){
search(event.getType(), event.getSearchTerm().trim(), event.getUpperBoundLongitude(), event.getUpperBoundLatitude(), event.getLowerBoundLongitude(), event.getLowerBoundLatitude(), event.getFromDate(), event.getToDate(), event.getLstDataSources(), event.getGroupByRank(), event.getResultType(), event.getListDataSourcesForSynonyms(), event.getListDataSourcesForUnfold());
}
@ -342,6 +346,30 @@ public class SearchController {
});
eventBus.addHandler(StopCurrentSearchEvent.TYPE, new StopCurrentSearchEventHandler() {
@Override
public void onAbortCurrentSearch(StopCurrentSearchEvent abortCurrentSearchEvent) {
SpeciesDiscovery.taxonomySearchService.userStopSearch(new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(Void result) {
// TODO Auto-generated method stub
}
});
}
});
eventBus.addHandler(CreateOccurrenceJobEvent.TYPE, new CreateOccurrenceJobEventHandler() {
@Override
@ -855,12 +883,9 @@ public class SearchController {
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);
// Log.error("Error on loading", "An error occurred on loading Data Source, retry. " +caught.getCause());
searchBorderLayoutPanel.getSpeciesNorthPanel().unmask();
searchBorderLayoutPanel.getSpeciesNorthPanel().activeButtonSearch(false);
searchBorderLayoutPanel.getSpeciesNorthPanel().visibleButtonStopSearch(false);
}
@Override
@ -1546,7 +1571,6 @@ public class SearchController {
lastSearchEvent.setResultType(capability);
lastSearchEvent.setMapTermsSearched(queryParameters.getTerms());
System.out.println("queryParameters.getTerms() "+queryParameters.getTerms());
if(queryParameters.getTerms()!=null){

View File

@ -25,11 +25,11 @@ import com.google.gwt.user.client.ui.RootPanel;
public class SpeciesDiscovery implements EntryPoint {
public static final String SPECIES_DISCOVERY_DIV = "SpeciesDiscovery";
public static TaxonomySearchServiceAsync taxonomySearchService = GWT.create(TaxonomySearchService.class);
public static TaxonomySearchServiceAsync taxonomySearchService = GWT.create(TaxonomySearchService.class);
public static GISInfoServiceAsync gisInfoService=GWT.create(GISInfoService.class);
protected ContentPanel mainPanel;
/**
@ -38,11 +38,11 @@ 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)
@ -54,7 +54,7 @@ public class SpeciesDiscovery implements EntryPoint {
@Override
public void execute() {
onModuleLoad2();
Window.addResizeHandler(new ResizeHandler() {
@Override
@ -63,11 +63,11 @@ public class SpeciesDiscovery implements EntryPoint {
}
});
}
});
}
/**
* Checks if is j query loaded.
*
@ -94,7 +94,7 @@ public class SpeciesDiscovery implements EntryPoint {
// mainPanel.setWidth(930);
RootPanel.get().add(mainPanel);
}
}

View File

@ -13,6 +13,7 @@ import org.gcube.portlets.user.speciesdiscovery.client.event.SearchEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.SearchStartedEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.SearchStartedEventHandler;
import org.gcube.portlets.user.speciesdiscovery.client.event.SearchTypeSelectedEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.StopCurrentSearchEvent;
import org.gcube.portlets.user.speciesdiscovery.client.filterresult.ResultFilterPanelManager;
import org.gcube.portlets.user.speciesdiscovery.client.resources.Resources;
import org.gcube.portlets.user.speciesdiscovery.client.window.HelpQueryWindow;
@ -20,6 +21,7 @@ import org.gcube.portlets.user.speciesdiscovery.shared.DataSourceModel;
import org.gcube.portlets.user.speciesdiscovery.shared.SearchType;
import org.gcube.portlets.user.speciesdiscovery.shared.SpeciesCapability;
import com.allen_sauer.gwt.log.client.Log;
import com.extjs.gxt.ui.client.Style.VerticalAlignment;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.ComponentEvent;
@ -50,14 +52,18 @@ import com.google.gwt.user.client.ui.Button;
/**
* The Class SpeciesSearchFormPanel.
*
* @author "Federico De Faveri defaveri@isti.cnr.it" - Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class SpeciesSearchFormPanel extends ContentPanel {
protected static final String EXSEARCH = "e.g. sarda sarda, solea solea";
protected Button buttSimpleSearch;
protected Button buttQuerySearch;
protected Button buttQueryExample;
private Button buttQueryStopSearch;
protected Button buttSimpleExample;
protected Button buttSimpleStopSearch;
protected SimpleComboBox<String> searchType;
protected SimpleComboBox<String> searchTypeResults;
protected EventBus eventBus;
@ -71,6 +77,12 @@ public class SpeciesSearchFormPanel extends ContentPanel {
private AdvancedSearchPanelManager advSearchPanelsManager = AdvancedSearchPanelManager.getInstance();
private final int DEFAULTLINKPANELTHEIGHT = 22;
/**
* The Enum SEARCHTYPE.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Feb 16, 2017
*/
public static enum SEARCHTYPE {SIMPLE, FULLTEXT};
public TextArea textArea = new TextArea();
@ -82,11 +94,16 @@ public class SpeciesSearchFormPanel extends ContentPanel {
private HorizontalPanel simpleSearchPanel = new HorizontalPanel();
private HorizontalPanel querySeachPanel = new HorizontalPanel();
protected Button buttQuerySearch;
protected Button buttQueryExample;
protected CheckBox checkValidateOccurrences = new CheckBox();
/**
* Instantiates a new species search form panel.
*
* @param eventBus the event bus
*/
public SpeciesSearchFormPanel(EventBus eventBus) {
this.eventBus = eventBus;
@ -109,13 +126,15 @@ public class SpeciesSearchFormPanel extends ContentPanel {
initComboSearchTypeResult();
init();
visibleButtonStopSearch(false); //abort must be hidden on init
switchSearchType(SEARCHTYPE.SIMPLE);
add(advSearchPanelsManager.getPanel());
}
/**
* Inits the combo search type.
*/
private void initComboSearchType(){
searchType = new SimpleComboBox<String>();
@ -124,7 +143,6 @@ public class SpeciesSearchFormPanel extends ContentPanel {
searchType.setTriggerAction(TriggerAction.ALL);
searchType.setSimpleValue(ConstantsSpeciesDiscovery.SCIENTIFIC_NAME);
searchType.addSelectionChangedListener(new SelectionChangedListener<SimpleComboValue<String>>() {
@Override
@ -136,6 +154,9 @@ public class SpeciesSearchFormPanel extends ContentPanel {
}
/**
* Inits the combo search type result.
*/
private void initComboSearchTypeResult(){
searchTypeResults = new SimpleComboBox<String>();
@ -156,10 +177,21 @@ public class SpeciesSearchFormPanel extends ContentPanel {
}
//RETURN RESULT ITEM OR TAXOMONY ITEM
/**
* Gets the selected capability.
*
* @return the selected capability
*/
public SpeciesCapability getSelectedCapability(){
return getCapability(searchTypeResults.getValue().getValue());
}
/**
* Gets the capability.
*
* @param value the value
* @return the capability
*/
private SpeciesCapability getCapability(String value){
if(value.compareTo(SpeciesCapability.TAXONOMYITEM.getName())==0)
return SpeciesCapability.TAXONOMYITEM;
@ -175,6 +207,12 @@ public class SpeciesSearchFormPanel extends ContentPanel {
return SpeciesCapability.UNKNOWN;
}
/**
* Gets the search type.
*
* @param value the value
* @return the search type
*/
private SearchType getSearchType(String value){
if(value.compareTo(ConstantsSpeciesDiscovery.SCIENTIFIC_NAME)==0)
@ -187,6 +225,11 @@ public class SpeciesSearchFormPanel extends ContentPanel {
}
/**
* Switch search type.
*
* @param searchType the search type
*/
public void switchSearchType(SEARCHTYPE searchType){
currentSearchType = searchType;
@ -206,6 +249,9 @@ public class SpeciesSearchFormPanel extends ContentPanel {
}
/**
* Inits the.
*/
protected void init()
{
horizontalQueryPanel.setBorders(false);
@ -237,8 +283,12 @@ public class SpeciesSearchFormPanel extends ContentPanel {
add(horizontalQueryPanel);
add(hpAdvancedSearchLinks);
}
/**
* Inits the query search panel.
*/
private void initQuerySearchPanel() {
querySeachPanel.setSpacing(5);
@ -285,13 +335,29 @@ public class SpeciesSearchFormPanel extends ContentPanel {
querySeachPanel.add(buttQueryInfo);
buttQueryStopSearch = new Button("Stop Search...");
buttQueryStopSearch.setTitle("Stops loading of the search results");
buttQueryStopSearch.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
eventBus.fireEvent(new StopCurrentSearchEvent());
}
});
buttQueryStopSearch.setStyleName("wizardButton");
querySeachPanel.add(buttQuerySearch);
querySeachPanel.add(buttQueryExample);
querySeachPanel.add(buttQueryStopSearch);
}
/**
* Inits the simple search panel.
*/
private void initSimpleSearchPanel() {
simpleSearchPanel.setSpacing(5);
@ -336,14 +402,11 @@ public class SpeciesSearchFormPanel extends ContentPanel {
hpPanel.add(searchField);
checkValidateOccurrences.setBoxLabel("validate occurrences");
checkValidateOccurrences.setValueAttribute("validate occurrences");
checkValidateOccurrences.setStyleAttribute("margin-right", "10px");
buttSimpleSearch = new Button("Search");
buttSimpleSearch.addClickHandler(new ClickHandler() {
@Override
@ -368,6 +431,19 @@ public class SpeciesSearchFormPanel extends ContentPanel {
buttSimpleExample.setStyleName("wizardButton");
hpPanel.add(buttSimpleExample);
buttSimpleStopSearch = new Button("Stop Search...");
buttSimpleStopSearch.setTitle("Stops loading of the search results");
buttSimpleStopSearch.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
eventBus.fireEvent(new StopCurrentSearchEvent());
}
});
buttSimpleStopSearch.setStyleName("wizardButton");
hpPanel.add(buttSimpleStopSearch);
HorizontalPanel hpPanelExpand = new HorizontalPanel();
hpPanelExpand.setVerticalAlign(VerticalAlignment.MIDDLE);
@ -377,28 +453,63 @@ public class SpeciesSearchFormPanel extends ContentPanel {
textExpand.setStyleAttribute("margin-right", "5px");
vtPanel.add(hpPanel);
simpleSearchPanel.add(vtPanel);
}
/**
* Gets the value check validate occcurrences.
*
* @return the value check validate occcurrences
*/
public boolean getValueCheckValidateOcccurrences(){
return this.checkValidateOccurrences.getValue();
}
/**
* Sets the value check validate occcurrences.
*
* @param bool the new value check validate occcurrences
*/
public void setValueCheckValidateOcccurrences(boolean bool){
this.checkValidateOccurrences.setValue(bool);
}
/**
* Sets the visible check validate occcurrences.
*
* @param bool the new visible check validate occcurrences
*/
public void setVisibleCheckValidateOcccurrences(boolean bool){
this.checkValidateOccurrences.setVisible(bool);
}
/**
* Active button search.
*
* @param bool the bool
*/
public void activeButtonSearch(boolean bool){
buttSimpleSearch.setEnabled(bool);
}
/**
* Visible button stop search.
*
* @param bool the bool
*/
public void visibleButtonStopSearch(boolean bool){
Log.warn("Stop Search visible? "+bool);
buttSimpleStopSearch.setVisible(bool);
buttQueryStopSearch.setVisible(bool);
}
/**
* Creates the advanced seach links.
*/
private void createAdvancedSeachLinks() {
hpAdvancedSearchLinks.setVerticalAlign(VerticalAlignment.MIDDLE);
@ -456,15 +567,16 @@ public class SpeciesSearchFormPanel extends ContentPanel {
}
});
hpAdvancedSearchLinks.add(butt);
}
}
/**
* Active advanced search.
*
* @param bool the bool
*/
private void activeAdvancedSearch(boolean bool){
if(bool){
@ -477,6 +589,9 @@ public class SpeciesSearchFormPanel extends ContentPanel {
}
}
/**
* Search.
*/
protected void search()
{
@ -503,6 +618,22 @@ public class SpeciesSearchFormPanel extends ContentPanel {
}
/**
* Search.
*
* @param searchTerm the search term
* @param upperBoundLongitude the upper bound longitude
* @param upperBoundLatitude the upper bound latitude
* @param lowerBoundLongitude the lower bound longitude
* @param lowerBoundLatitude the lower bound latitude
* @param fromDate the from date
* @param toDate the to date
* @param listDataSources the list data sources
* @param groupRank the group rank
* @param resultType the result type
* @param listDataSourceForSynonyms the list data source for synonyms
* @param listDataSourceForUnfold the list data source for unfold
*/
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)
{
mask("Searching...");
@ -517,6 +648,11 @@ public class SpeciesSearchFormPanel extends ContentPanel {
}
/**
* Search by query.
*
* @param query the query
*/
protected void searchByQuery(String query)
{
if (query!=null && query.length()!=0) {
@ -527,6 +663,9 @@ public class SpeciesSearchFormPanel extends ContentPanel {
Info.display("No query specified", "There is not query specified");
}
/**
* Bind.
*/
protected void bind()
{
eventBus.addHandler(SearchStartedEvent.TYPE, new SearchStartedEventHandler() {
@ -545,11 +684,17 @@ public class SpeciesSearchFormPanel extends ContentPanel {
});
}
/**
* Enable search.
*/
protected void enableSearch()
{
buttSimpleSearch.setEnabled(true);
}
/**
* Disable search.
*/
protected void disableSearch()
{
buttSimpleSearch.setEnabled(false);

View File

@ -30,19 +30,19 @@ import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
/**
*
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class TabItemForTaxonomyRow {
private TabPanel tabPanel;
private AbstractImagePrototype imageLoading = AbstractImagePrototype.create(Resources.INSTANCE.loadingBalls());
private EventBus eventBus;
// private List<TaxonomyRow> parents = null;
private TablesForTaxonomyRow tablesForTaxonomyRow;
private LightTaxonomyRow currentTaxonomy;
public void setCurrentTaxonomy(LightTaxonomyRow taxonomy){
@ -58,31 +58,31 @@ public class TabItemForTaxonomyRow {
/**
*
*
* @param taxonomy
* @param isNewTab - set true if has been clicked a classification link, or false otherwise
* @return
*/
public VerticalPanel getPanelClassificationForTaxonomy(LightTaxonomyRow taxonomy, String dataSource, boolean isNewTab){
VerticalPanel vpClassification = new VerticalPanel();
vpClassification.setSpacing(5);
if(taxonomy!=null){
//CREATE CLASSIFICATION FOR PARENT ITEM
int parentsSize = taxonomy.getParents().size();
for(int i=parentsSize-1; i>=0; i--){
createPanelForParentTaxonomy(taxonomy.getParents().get(i), vpClassification, taxonomy.getServiceId(), isNewTab, dataSource, i+1);
}
//CREATE CLASSIFICATION FOR ITEM
createPanelForParentTaxonomy(taxonomy, vpClassification, taxonomy.getServiceId(), isNewTab, dataSource, 0);
}
return vpClassification;
}
/**
@ -90,22 +90,22 @@ public class TabItemForTaxonomyRow {
* @param taxon
* @param vpClassification
* @param taxonomyServiceId
* @param isNewTab
* @param isNewTab
* @param parentIndex
*/
public void createPanelForParentTaxonomy(LightTaxonomyRow taxon, VerticalPanel vpClassification, String taxonomyServiceId, boolean isNewTab, String dataSource, int parentIndex){
if(taxon==null)
return;
// createPanelForParentTaxonomy(taxon.getParents(), vpClassification, taxonomyServiceId, isNewTab, dataSource);
HorizontalPanel hp = new HorizontalPanel();
Text labelRank;
if(!NormalizeString.isUndefined(taxon.getRank()))
labelRank = new Text(taxon.getRank()+":");
labelRank = new Text(taxon.getRank()+":");
else
labelRank = new Text("Rank not found"+":");
labelRank = new Text("Rank not found"+":");
// labelRank.setStyleAttribute("margin-right", "10px");
hp.add(labelRank);
hp.setCellWidth(labelRank, "120px");
@ -119,72 +119,72 @@ public class TabItemForTaxonomyRow {
// System.out.println("taxon.getName()" +taxon.getName() + " serviceid : "+taxon.getServiceId() + " taxonomyServiceId "+taxonomyServiceId);
// System.out.println("taxon.getServiceId().compareTo(taxonomyServiceId)==0 "+ taxon.getServiceId().compareTo(taxonomyServiceId));
// System.out.println("isNewTab"+ isNewTab);
if((taxon.getServiceId().compareTo(taxonomyServiceId)==0) && isNewTab){
if(taxon.getServiceId().compareTo(taxonomyServiceId)==0 && isNewTab){
loadChildrenListOfItem(vpClassification, taxon, dataSource, taxon.getName(), -1); //parentIndex == -1 means that parent is currentTaxonomy
}
}
}
private void loadChildrenListOfItem(final VerticalPanel vpClassification, final LightTaxonomyRow taxonomyItem, final String dataSource, final String parentName, final int parentIndex){
final ContentPanel cp = new ContentPanel();
cp.setId("cp" + taxonomyItem.getId());
cp.setHeaderVisible(false);
cp.setBodyBorder(false);
cp.add(imageLoading.createImage());
vpClassification.add(cp);
//FOR DEBUG
// TaxonomyRow printParent = taxonomyItem;
// System.out.println("Load child of item name: " + parentName + " parent id: " + taxonomyItem.getServiceId());
// while(printParent!=null){
//
//
// System.out.println("Parent Name: " + printParent.getName() + " parent id: " +printParent.getServiceId());
// printParent = printParent.getParent();
// }
SpeciesDiscovery.taxonomySearchService.loadListChildrenByParentId(taxonomyItem.getServiceId(), new AsyncCallback<ArrayList<LightTaxonomyRow>>() {
@Override
public void onSuccess(ArrayList<LightTaxonomyRow> result) {
Log.trace("Children returned in client: " + result.size() + " for parentName " +parentName);
LayoutContainer lc = new LayoutContainer();
lc.setLayout(new ColumnLayout());
vpClassification.remove(cp);
HorizontalPanel hp = new HorizontalPanel();
Text labelRank = new Text("Rank not found:");
hp.add(labelRank);
hp.setCellWidth(labelRank, "120px");
boolean setRank = false;
if(result.size()>0){
for (int i=0; i<result.size()-1; i++) {
LightTaxonomyRow taxonomy = result.get(i);
// //FOR DEBUG
// System.out.println("child "+taxonomy);
//SET PARENTS
taxonomy.setParent(Arrays.asList(taxonomyItem));
//SET RANK IF IS NOT EMPTY
if(!setRank)
setRank = replaceLabelRank(hp, labelRank, taxonomy.getRank());
Text comma = new Text(",");
comma.setStyleAttribute("margin-right", "5px");
lc.add(getAnchorByTaxonomy(taxonomy, dataSource, parentIndex));
lc.add(comma);
}
LightTaxonomyRow taxonomy = result.get(result.size()-1);
if(!setRank)
setRank = replaceLabelRank(hp, labelRank, taxonomy.getRank());
// //FOR DEBUG
// System.out.println("last child "+taxonomy);
//SET PARENTS
@ -194,117 +194,117 @@ public class TabItemForTaxonomyRow {
else{
hp.remove(labelRank);
}
hp.add(lc);
hp.setCellHorizontalAlignment(lc, HorizontalPanel.ALIGN_LEFT);
vpClassification.add(hp);
vpClassification.layout();
}
@Override
public void onFailure(Throwable caught) {
Info.display("Error laoding child", "An error occurred in loading, retry.");
Log.error("Error laoding child", "An error occurred in loading, retry." +caught);
}
});
vpClassification.layout();
// hp.add(child)
}
/**
*
*
* @param hp
* @param oldLabelRank
* @param rank
* @return true if label is replaced
*/
private boolean replaceLabelRank(HorizontalPanel hp, Text oldLabelRank, String rank){
//SET NEW LABEL RANK IF IS NOT EMPTY
if(!NormalizeString.isUndefined(rank)){
// System.out.println("In if Taxonomy set rank " + taxonomy.getRank());
hp.remove(oldLabelRank);
Text setlabelRank = new Text(rank+":");
Text setlabelRank = new Text(rank+":");
hp.add(setlabelRank);
hp.setCellWidth(setlabelRank, "120px");
return true;
}
return false;
}
/**
*
*
* @param taxon
* @param dataSource
* @param parentIndex - if parent index is equal -1.. the method set parent item of taxon as currentItem
* if parent index is equal -2.. the method not set parents of taxon
* @return
*/
private Anchor getAnchorByTaxonomy(final LightTaxonomyRow taxon, final String dataSource, final int parentIndex)
{
Anchor anchor = null;
if(taxon!=null){
anchor = new Anchor("<nobr>"+taxon.getName()+"</nobr>", true);
anchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
// System.out.println("parent index: "+parentIndex + " size "+currentTaxonomy.getParents().size());
if(parentIndex >=0 && parentIndex<=currentTaxonomy.getParents().size()){
// System.out.println("set parent true");
taxon.setParent(currentTaxonomy.getParents().subList(parentIndex, currentTaxonomy.getParents().size()));
}
else if(parentIndex == -1){ //items loaded from get children - the current Taxonomy item is the parent
List<LightTaxonomyRow> list = new ArrayList<LightTaxonomyRow>();
list.add(currentTaxonomy);
list.addAll(currentTaxonomy.getParents());
// System.out.println("parentIndex == -1");
printParents(taxon);
taxon.setParent(list);
}
printParents(taxon);
tablesForTaxonomyRow.addTabItem(taxon, dataSource);
}
});
}
return anchor;
}
void printParents(LightTaxonomyRow taxon){
System.out.println("principal "+taxon.getName());
int i = 0;
for (LightTaxonomyRow tax : taxon.getParents()) {
System.out.println(++i + " parent name " + tax.getName());
}
}
private Text getLabelByTaxonomy(final TaxonomyRow taxon)
{
Text label = null;
if(taxon!=null){
if(!NormalizeString.isUndefined(taxon.getName()))
label = new Text(taxon.getName());
@ -315,64 +315,64 @@ public class TabItemForTaxonomyRow {
}
// public Html getHTMLTableForTaxonomy(TaxonomyRow row, boolean isNewTab){
//
//
// //Init values
// String dataProviderName = "";
// String dataSetCitation= "";
// String matchingAccordionTo= "";
// String rank= "";
//// String matchingCredits= "";
//
//
// String statusName = "";
// String dateModified = "";
// String statusRemark = "";
//
//
// String author = "";
// String lsid = "";
// String credits = "";
//
//
// String propertiesHtml = "";
//
// if(row.getDataProviderName()!=null) dataProviderName = row.getDataProviderName();
// if(row.getStatusName()!=null) statusName = row.getStatusName();
// if(row.getDateModified()!=null) dateModified = row.getDateModified();
//
//
// if(row.getDataSetCitation()!=null) dataSetCitation = row.getDataSetCitation();
// if(row.getRank()!=null) rank = row.getRank();
// if(row.getAccordingTo()!=null) matchingAccordionTo = row.getAccordingTo();
//
//
// if(row.getStatusRemarks()!=null) statusRemark = row.getStatusRemarks();
//
//
// if(row.getAuthor()!=null) author = row.getAuthor();
//
//
// if(row.getLsid()!=null) lsid = row.getLsid();
//
//
// if(row.getCredits()!=null) credits = row.getCredits();
//
//
//
//
// if(row.getProperties()!=null){
//
//
// List<ItemParameter> hashProperties = row.getProperties();
// Collections.sort(hashProperties, ItemParameter.COMPARATOR);
//
//
// propertiesHtml+="<table class=\"parameters\">";
//
//
// for (ItemParameter itemParameter : hashProperties) {
//
//
// propertiesHtml+=
// "<tr>" +
// " <td class=\"title\">"+itemParameter.getKey()+"</td>" +
// " <td>"+itemParameter.getValue()+"</td>" +
// "</tr>";
// }
//
//
// propertiesHtml+="</table>";
// }
//
//
//
// //Create list common name
// String commonNames = "";
//
//
//// if(isNewTab){
// if(row.getCommonNames()!=null){
// for (CommonName comName : row.getCommonNames()) {
@ -380,10 +380,10 @@ public class TabItemForTaxonomyRow {
// }
// }
//// }
//
//
//
// String table = "<table class=\"imagetable\">";
//
//
//// if(isNewTab)
// table+=
// "<tr>" +
@ -432,7 +432,7 @@ public class TabItemForTaxonomyRow {
// " <td class=\"title\">"+TaxonomyGridField.CREDITS.getName()+"</td>" +
// " <td>"+credits+"</td>" +
// "</tr>" +
//
//
// "<tr>" +
// " <td class=\"title\">"+TaxonomyGridField.PROPERTIES.getName()+"</td>" +
// " <td>"+propertiesHtml+"</td>" +
@ -440,10 +440,10 @@ public class TabItemForTaxonomyRow {
//
// "</table>";
// return new Html(table);
//
//
// }
//
//
// public FlexTable getHTMLTableForTaxonomyWithRef(final LightTaxonomyRow row,boolean isNewTab, final String dataSource) {
//
// // Init values
@ -537,12 +537,12 @@ public class TabItemForTaxonomyRow {
// if (refId != null) {
//
// final String status;
//
//
// if(!statusRemark.isEmpty())
// status = statusRemark;
// else
// status = statusName;
//
//
// final String referenceId = refId;
//
// flexTable.setWidget(2, 0, new Label(TaxonomyGridField.STATUS_REMARKS.getName()));
@ -580,7 +580,7 @@ public class TabItemForTaxonomyRow {
// flexTable.setWidget(2, 1, new Label(statusRemark));
// }
//
//
//
// //Create row get synonyms
// flexTable.setWidget(3, 0,new Label(TaxonomyGridField.SYNONYMS.getName()));
//
@ -596,25 +596,25 @@ public class TabItemForTaxonomyRow {
// @Override
// public void onClick(ClickEvent event) {
// flexTable.remove(imageSynonyms);
//
//
//// DEBUG
//// System.out.println("getSynonyms of "+row.getName() + " serviceId "+row.getServiceId());
//
//
//
//
// if(row.getParents().size()>0){
//
//
//
// //TODO
// getSynonymsByReferenceId(flexTable, 3, 1, row.getServiceId(),dataSource, row.getParents());
//
//
//
//
//
//
// }
// }
// });
//
// flexTable.setWidget(3, 1, imageSynonyms);
//
//
//
// flexTable.setWidget(4, 0,new Label(TaxonomyGridField.DATASOURCE.getName()));
// flexTable.setWidget(4, 1, new Label(dataProviderName));
@ -652,134 +652,134 @@ public class TabItemForTaxonomyRow {
// return flexTable;
//
// }
public void getSynonymsByReferenceId(FlexTable flexTable, int row, int col, String refId, final String dataSource, final List<LightTaxonomyRow> parents){
final LayoutContainer layoutContainer = new LayoutContainer();
final Image loading = AbstractImagePrototype.create(Resources.INSTANCE.loadingBalls()).createImage();
layoutContainer.add(loading);
flexTable.setWidget(row, col, layoutContainer);
SpeciesDiscovery.taxonomySearchService.retrieveSynonymsByRefId(refId, new AsyncCallback<List<LightTaxonomyRow>>() {
@Override
public void onFailure(Throwable caught) {
Info.display("Error laoding child", "An error occurred in loading, retry.");
Log.error("Error laoding child", "An error occurred in loading, retry." +caught);
}
@Override
public void onSuccess(List<LightTaxonomyRow> result) {
Log.trace("getReferenceById return " +result.size() + " items");
// System.out.println("getReferenceById return " +result.size() + " items");
if(result.size()>0){
layoutContainer.remove(loading);
LayoutContainer lc = new LayoutContainer();
lc.setLayout(new ColumnLayout());
if(result.size()>0){
for (int i=0; i<result.size()-1; i++) {
LightTaxonomyRow taxonomy = result.get(i);
// System.out.println("child "+taxonomy);
//SET PARENTS
taxonomy.setParent(parents);
Text comma = new Text(",");
comma.setStyleAttribute("margin-right", "5px");
lc.add(getAnchorByTaxonomy(taxonomy, dataSource,-2));
lc.add(comma);
}
LightTaxonomyRow taxonomy = result.get(result.size()-1);
// System.out.println("child "+taxonomy);
//SET PARENTS
taxonomy.setParent(parents);
lc.add(getAnchorByTaxonomy(taxonomy, dataSource,-2));
}
layoutContainer.add(lc);
}
else{
layoutContainer.remove(loading);
layoutContainer.add(new Label("not found"));
}
layoutContainer.layout();
}
});
}
public void getTaxonomyByReferenceId(FlexTable flexTable, int row, int col, final String statusRemark, String refId, final String dataSource, final List<LightTaxonomyRow> parents){
final LayoutContainer layoutContainer = new LayoutContainer();
// hp.getElement().getStyle().setBorderStyle(BorderStyle.NONE);
// hp.getElement().getStyle().setBorderWidth(0, Unit.PX);
final Label status = new Label(statusRemark);
layoutContainer.add(status);
// hp.setCellWidth(status, "160px");
final Image loading = AbstractImagePrototype.create(Resources.INSTANCE.loadingBalls()).createImage();
layoutContainer.add(loading);
flexTable.setWidget(row, col, layoutContainer);
List<String> listId = new ArrayList<String>();
listId.add(refId);
SpeciesDiscovery.taxonomySearchService.retrieveTaxonomyByIds(listId, new AsyncCallback<List<LightTaxonomyRow>>() {
@Override
public void onFailure(Throwable caught) {
Info.display("Error laoding child", "An error occurred in loading, retry.");
Log.error("Error laoding child", "An error occurred in loading, retry." +caught);
}
@Override
public void onSuccess(List<LightTaxonomyRow> result) {
Log.trace("getReferenceById return " +result.size() + " items");
// System.out.println("getReferenceById return " +result.size() + " items");
if(result.size()>0){
layoutContainer.remove(status);
layoutContainer.remove(loading);
Label labelOf = new Label(statusRemark + " for ");
layoutContainer.add(labelOf);
LayoutContainer lc = new LayoutContainer();
lc.setLayout(new ColumnLayout());
if(result.size()>0){
for (int i=0; i<result.size()-1; i++) {
LightTaxonomyRow taxonomy = result.get(i);
// System.out.println("child "+taxonomy);
//SET PARENTS
taxonomy.setParent(parents);
Text comma = new Text(",");
comma.setStyleAttribute("margin-right", "5px");
lc.add(comma);
}
LightTaxonomyRow taxonomy = result.get(result.size()-1);
//FOR DEBUG
// System.out.println("child "+taxonomy);
//SET PARENTS
@ -788,14 +788,14 @@ public class TabItemForTaxonomyRow {
//TODO
lc.add(getAnchorByTaxonomy(taxonomy, dataSource, -2));
}
layoutContainer.add(lc);
}
layoutContainer.layout();
}
});
}
}

View File

@ -1,35 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.speciesdiscovery.client.event;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class ActiveButtonCheckAllRowEvent extends GwtEvent<ActiveButtonCheckAllRowEventHandler> {
public static final GwtEvent.Type<ActiveButtonCheckAllRowEventHandler> TYPE = new Type<ActiveButtonCheckAllRowEventHandler>();
private boolean activeFilter;
@Override
public Type<ActiveButtonCheckAllRowEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(ActiveButtonCheckAllRowEventHandler handler) {
handler.onActiveCkeckAllRow(this);
}
public ActiveButtonCheckAllRowEvent(boolean activeFilter) {
this.activeFilter = activeFilter;
}
public boolean isActiveFilter() {
return activeFilter;
}
}

View File

@ -0,0 +1,34 @@
/**
*
*/
package org.gcube.portlets.user.speciesdiscovery.client.event;
import com.google.gwt.event.shared.GwtEvent;
/**
* The Class AbortCurrentSearchEvent.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Feb 16, 2017
*/
public class StopCurrentSearchEvent extends GwtEvent<StopCurrentSearchEventHandler> {
public static final GwtEvent.Type<StopCurrentSearchEventHandler> TYPE = new Type<StopCurrentSearchEventHandler>();
/* (non-Javadoc)
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
*/
@Override
public Type<StopCurrentSearchEventHandler> getAssociatedType() {
return TYPE;
}
/* (non-Javadoc)
* @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
*/
@Override
protected void dispatch(StopCurrentSearchEventHandler handler) {
handler.onAbortCurrentSearch(this);
}
}

View File

@ -0,0 +1,25 @@
/**
*
*/
package org.gcube.portlets.user.speciesdiscovery.client.event;
import com.google.gwt.event.shared.EventHandler;
/**
* The Interface AbortCurrentSearchEventHandler.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Feb 16, 2017
*/
public interface StopCurrentSearchEventHandler extends EventHandler {
/**
* On abort current search.
*
* @param abortCurrentSearchEvent the abort current search event
*/
public void onAbortCurrentSearch(
StopCurrentSearchEvent abortCurrentSearchEvent);
}

View File

@ -10,7 +10,7 @@ import com.google.gwt.event.shared.EventHandler;
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public interface ActiveButtonCheckAllRowEventHandler extends EventHandler {
public void onActiveCkeckAllRow(ActiveButtonCheckAllRowEvent activeFilterCheckAllRowEvent);
public interface StreamCompletedEventEventHandler extends EventHandler {
public void onStreamCompleteEvent(StreamEvent activeFilterCheckAllRowEvent);
}

View File

@ -0,0 +1,69 @@
/**
*
*/
package org.gcube.portlets.user.speciesdiscovery.client.event;
import com.google.gwt.event.shared.GwtEvent;
/**
* The Class StreamEvent.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Feb 16, 2017
*/
public class StreamEvent extends GwtEvent<StreamCompletedEventEventHandler> {
public static final GwtEvent.Type<StreamCompletedEventEventHandler> TYPE = new Type<StreamCompletedEventEventHandler>();
private boolean activeFilter;
private Event event = null;
public enum Event {STRARTED, COMPLETED}
/* (non-Javadoc)
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
*/
@Override
public Type<StreamCompletedEventEventHandler> getAssociatedType() {
return TYPE;
}
/* (non-Javadoc)
* @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
*/
@Override
protected void dispatch(StreamCompletedEventEventHandler handler) {
handler.onStreamCompleteEvent(this);
}
/**
* Instantiates a new stream event.
*
* @param activeFilter the active filter
* @param isCompleted the is completed
*/
public StreamEvent(boolean activeFilter, Event event) {
this.activeFilter = activeFilter;
this.event = event;
}
/**
* Checks if is active filter.
*
* @return true, if is active filter
*/
public boolean isActiveFilter() {
return activeFilter;
}
/**
* @return the event
*/
public Event getEvent() {
return event;
}
}

View File

@ -5,7 +5,8 @@ import java.util.HashMap;
import java.util.List;
import org.gcube.portlets.user.speciesdiscovery.client.SpeciesDiscovery;
import org.gcube.portlets.user.speciesdiscovery.client.event.ActiveButtonCheckAllRowEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.StreamEvent;
import org.gcube.portlets.user.speciesdiscovery.client.event.StreamEvent.Event;
import org.gcube.portlets.user.speciesdiscovery.client.model.ClassificationModel;
import org.gcube.portlets.user.speciesdiscovery.client.util.SpeciesGridFields;
import org.gcube.portlets.user.speciesdiscovery.client.util.stream.StreamPagingLoader;
@ -37,30 +38,30 @@ public class ResultFilterPanelManager{
private EventBus eventBus;
private int oldStreamSize= -1;
private boolean isDataLoaded = false;
private String currentGroupByRank = "";
private ResultFilterPanelManager(){
classificationFilter = new ClassificationFilter();
dataProviderFilter = new DataProviderFilter();
typeFilter = new TypeFilter();
dataSourceFilter = new DataSourceFilter();
rankFilter = new RankFilter();
listResultFilterPanel.add(classificationFilter.getPanel());
listResultFilterPanel.add(dataProviderFilter.getPanel());
listResultFilterPanel.add(dataSourceFilter.getPanel());
listResultFilterPanel.add(rankFilter.getPanel());
// listResultFilterPanel.add(typeFilter.getPanel());
}
public List<ContentPanel> getListResultFilterPanel() {
return listResultFilterPanel;
}
public static synchronized ResultFilterPanelManager getInstance() {
if (instance == null)
instance = new ResultFilterPanelManager();
@ -68,11 +69,11 @@ public class ResultFilterPanelManager{
}
public void loadDataSource(List<DataSourceModel> result) {
// dataSourceFilter.loadDataSource(result);
}
public void setEventBus(EventBus eventBus){
this.eventBus = eventBus;
classificationFilter.setEventBus(eventBus);
@ -80,47 +81,47 @@ public class ResultFilterPanelManager{
dataSourceFilter.setEventBus(eventBus);
rankFilter.setEventBus(eventBus);
}
public void setIsDataLoaded(boolean bool){
isDataLoaded = bool;
}
public void bind(StreamPagingLoader loader)
{
this.loader = loader;
this.pageSize = loader.getPageSize();
loader.addListener(new StreamPagingLoaderListener() {
@Override
public void onStreamUpdate(int streamSize, int currentStartItem, int currentEndItem) {
Log.trace("in on stream UPDATE - Stream size: " +streamSize);
if(oldStreamSize != streamSize)
updateDataSourceFilter();
oldStreamSize = streamSize;
setIsDataLoaded(true);
}
@Override
public void onStreamLoadingComplete() {
Log.trace("####### onStreamLoadingComplete COMPLETED");
updateDataSourceFilter();
eventBus.fireEvent(new ActiveButtonCheckAllRowEvent(true));
eventBus.fireEvent(new StreamEvent(true, Event.COMPLETED));
}
@Override
public void onStreamStartLoading() {
resetFilters();
eventBus.fireEvent(new ActiveButtonCheckAllRowEvent(false));
eventBus.fireEvent(new StreamEvent(false, Event.STRARTED));
}
});
loader.getStore().addStoreListener(new StoreListener<ModelData>(){
/**
@ -129,139 +130,139 @@ public class ResultFilterPanelManager{
@Override
public void storeBeforeDataChanged(StoreEvent<ModelData> se) {
}
});
}
public void updateDataSourceFilterById(SpeciesGridFields filterId){
if(filterId==null)
return;
switch (filterId) {
case DATASOURCE:
SpeciesDiscovery.taxonomySearchService.getFilterCounterById(SpeciesGridFields.DATASOURCE, new AsyncCallback<HashMap<String,Integer>>() {
@Override
public void onSuccess(HashMap<String, Integer> result) {
if(result!=null)
dataSourceFilter.loadDataSource(result);
}
@Override
public void onFailure(Throwable caught) {
resetFilters();
// errorAlert("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught.getMessage());
Log.error("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught);
}
});
break;
case DATAPROVIDER:
SpeciesDiscovery.taxonomySearchService.getFilterCounterById(SpeciesGridFields.DATAPROVIDER, new AsyncCallback<HashMap<String,Integer>>() {
@Override
public void onSuccess(HashMap<String, Integer> result) {
if(result!=null)
dataProviderFilter.loadDataSource(result);
}
@Override
public void onFailure(Throwable caught) {
resetFilters();
// errorAlert("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught.getMessage());
Log.error("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught);
}
});
break;
case MATCHING_RANK:
SpeciesDiscovery.taxonomySearchService.getFilterCounterById(SpeciesGridFields.MATCHING_RANK, new AsyncCallback<HashMap<String,Integer>>() {
@Override
public void onSuccess(HashMap<String, Integer> result) {
if(result!=null)
rankFilter.loadDataSource(result);
}
@Override
public void onFailure(Throwable caught) {
resetFilters();
// errorAlert("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById" + caught.getMessage());
Log.error("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught);
}
});
break;
}
}
public void updateDataSourceFilter(){
SpeciesDiscovery.taxonomySearchService.getFilterCounterById(SpeciesGridFields.DATASOURCE, new AsyncCallback<HashMap<String,Integer>>() {
@Override
public void onSuccess(HashMap<String, Integer> result) {
if(result!=null)
dataSourceFilter.loadDataSource(result);
}
@Override
public void onFailure(Throwable caught) {
resetFilters();
// errorAlert("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught.getMessage());
Log.error("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught);
}
});
SpeciesDiscovery.taxonomySearchService.getFilterCounterById(SpeciesGridFields.DATAPROVIDER, new AsyncCallback<HashMap<String,Integer>>() {
@Override
public void onSuccess(HashMap<String, Integer> result) {
if(result!=null)
dataProviderFilter.loadDataSource(result);
}
@Override
public void onFailure(Throwable caught) {
resetFilters();
// errorAlert("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught.getMessage());
Log.error("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught);
}
});
SpeciesDiscovery.taxonomySearchService.getFilterCounterById(SpeciesGridFields.MATCHING_RANK, new AsyncCallback<HashMap<String,Integer>>() {
@Override
public void onSuccess(HashMap<String, Integer> result) {
if(result!=null)
rankFilter.loadDataSource(result);
}
@Override
public void onFailure(Throwable caught) {
resetFilters();
// errorAlert("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById" + caught.getMessage());
Log.error("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterById " + caught);
}
});
SpeciesDiscovery.taxonomySearchService.getFilterCounterForClassification(getUpdatedGroupByRank() , callbackFilterCounter);
}
public void resetFilters() {
dataSourceFilter.reset();
@ -270,11 +271,11 @@ public class ResultFilterPanelManager{
rankFilter.reset();
oldStreamSize = -1;
setIsDataLoaded(false);
}
public void updateFilterCounterForClassification(){
if(isDataLoaded)
SpeciesDiscovery.taxonomySearchService.getFilterCounterForClassification(getUpdatedGroupByRank(), callbackFilterCounter);
@ -284,22 +285,22 @@ public class ResultFilterPanelManager{
if(currentGroupByRank.compareTo(classificationFilter.getGroupRank())!=0)
classificationFilter.reset();
setGroupByRank(classificationFilter.getGroupRank());
return currentGroupByRank;
}
public void setGroupByRank(String groupByRank) {
currentGroupByRank = groupByRank;
}
public String getGroupByRank() {
return classificationFilter.getGroupRank();
}
private AsyncCallback<HashMap<String,ClassificationModel>> callbackFilterCounter = new AsyncCallback<HashMap<String,ClassificationModel>>() {
@Override
@ -307,7 +308,7 @@ public class ResultFilterPanelManager{
resetFilters();
// errorAlert("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterForClassification" + caught.getMessage());
Log.error("Error in SpeciesDiscovery.taxonomySearchService.getFilterCounterForClassification " + caught);
}
@Override
@ -316,7 +317,7 @@ public class ResultFilterPanelManager{
classificationFilter.loadDataSourceClassification(result, currentGroupByRank);
}
};
}

View File

@ -52,8 +52,6 @@ public interface TaxonomySearchService extends RemoteService {
public SearchStatus getSearchStatus(boolean onlySelected,
boolean isActiveFilterOnResult) throws SearchServiceException;
public void stopSearch() throws SearchServiceException;
public void updateRowSelection(int rowId, boolean selection)
throws SearchServiceException;
@ -222,4 +220,6 @@ public interface TaxonomySearchService extends RemoteService {
JobGisLayerModel resubmitGisLayerJob(String jobIdentifier) throws Exception;
void userStopSearch() throws SearchServiceException;
}

View File

@ -47,7 +47,7 @@ public interface TaxonomySearchServiceAsync {
// void getSearchStatus(boolean onlySelected, AsyncCallback<SearchStatus> callback);
public void stopSearch(AsyncCallback<Void> callback);
public void userStopSearch(AsyncCallback<Void> callback);
public void updateRowSelection(int rowId, boolean selection, AsyncCallback<Void> callback);
@ -203,4 +203,5 @@ public interface TaxonomySearchServiceAsync {
public void resubmitGisLayerJob(
String jobIdentifier, AsyncCallback<JobGisLayerModel> asyncCallback);
}

View File

@ -133,11 +133,22 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
// root.setLevel(Level.ALL);
// }
protected ASLSession getASLSession()
/**
* Gets the ASL session.
*
* @return the ASL session
*/
protected ASLSession getASLSession()
{
return SessionUtil.getAslSession(this.getThreadLocalRequest().getSession());
}
/**
* Gets the species service.
*
* @return the species service
* @throws SearchServiceException the search service exception
*/
protected SpeciesService getSpeciesService() throws SearchServiceException
{
try {
@ -151,6 +162,12 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
}
/**
* Gets the search session.
*
* @return the search session
* @throws SearchServiceException the search service exception
*/
protected FetchingSession<? extends FetchingElement> getSearchSession() throws SearchServiceException
{
ASLSession session = getASLSession();
@ -166,6 +183,12 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
/**
* Gets the occurrence session.
*
* @return the occurrence session
* @throws SearchServiceException the search service exception
*/
protected FetchingSession<Occurrence> getOccurrenceSession() throws SearchServiceException
{
ASLSession session = getASLSession();
@ -201,6 +224,15 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
search(searchTerm, SearchType.BY_COMMON_NAME, searchFilters);
}
/**
* Search.
*
* @param searchTerm the search term
* @param searchType the search type
* @param searchFilters the search filters
* @return the search result type
* @throws SearchServiceException the search service exception
*/
protected SearchResultType search(String searchTerm, SearchType searchType, SearchFilters searchFilters) throws SearchServiceException
{
@ -226,6 +258,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#searchByQuery(java.lang.String)
*/
@Override
public SearchByQueryParameter searchByQuery(String query) throws SearchServiceException {
logger.info("searchByQuery - query: "+query);
@ -255,6 +290,11 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/**
* Delete all row into dao table.
*
* @throws Exception the exception
*/
private void deleteAllRowIntoDaoTable() throws Exception{
logger.info("deleting all row into dao's");
ResultRowPersistence daoResultRow = null;
@ -356,6 +396,11 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return new SearchResult<ResultRow>(chunk);
}
/**
* Prints the properties.
*
* @param properties the properties
*/
private void printProperties(List<ItemParameter> properties){
for (ItemParameter itemParameter : properties) {
@ -364,6 +409,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getSearchTaxonomyRow(int, int, org.gcube.portlets.user.speciesdiscovery.shared.filter.ResultFilter, boolean)
*/
@SuppressWarnings("unchecked")
@Override
public SearchResult<TaxonomyRow> getSearchTaxonomyRow(int start, int limit, ResultFilter activeFiltersObject, boolean onlySelected) throws SearchServiceException {
@ -442,6 +490,13 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return new SearchResult<TaxonomyRow>(chunk);
}
/**
* Load taxonomy parent by parent id.
*
* @param parentID the parent id
* @return the taxonomy row
* @throws Exception the exception
*/
public TaxonomyRow loadTaxonomyParentByParentId(String parentID) throws Exception {
TaxonomyRow taxonomyRow = null;
@ -501,6 +556,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getFilterCounterForClassification(java.lang.String)
*/
@Override
public HashMap<String, ClassificationModel> getFilterCounterForClassification(String rankLabel) throws Exception {
logger.info("Counter for classification: "+ rankLabel);
@ -616,11 +674,14 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
} else logger.warn("Search session not found");
}
/**
* {@inheritDoc}
* Stop search.
*
* @throws SearchServiceException the search service exception
*/
@Override
public void stopSearch() throws SearchServiceException {
private void stopSearch() throws SearchServiceException {
logger.info("stopSearch");
ASLSession session = getASLSession();
@ -636,6 +697,25 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
} else logger.warn("Search session not found");
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#userStopSearch()
*/
public void userStopSearch() throws SearchServiceException {
ASLSession session = getASLSession();
FetchingSession<? extends FetchingElement> searchSession = SessionUtil.getCurrentSearchSession(session);
if (searchSession != null) {
try {
searchSession.close();
} catch (IOException e) {
throw new SearchServiceException(e.getMessage());
}
} else logger.warn("Search session not found");
}
/**
* {@inheritDoc}
*/
@ -768,6 +848,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return count;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getOccurrencesBatch(int, int)
*/
@Override
public OccurrenceBatch getOccurrencesBatch(int start, int limit) throws SearchServiceException {
logger.info("getOccurrencesBatch: start: "+start+" limit: "+limit);
@ -808,6 +891,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return result;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getCountOfOccurrencesBatch()
*/
@Override
public OccurrencesStatus getCountOfOccurrencesBatch() throws SearchServiceException {
logger.info("get CountOf Occurrences Batch");
@ -882,6 +968,11 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
//USED FOR DEBUG
/**
* Prints the id.
*
* @param listId the list id
*/
protected void printId(List<String> listId){
for (String id : listId) {
@ -889,6 +980,12 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
}
/**
* Gets the selected occurrence ids.
*
* @return the selected occurrence ids
* @throws SearchServiceException the search service exception
*/
protected List<String> getSelectedOccurrenceIds() throws SearchServiceException{
FetchingSession<Occurrence> occurrenceSession = getOccurrenceSession();
@ -911,6 +1008,12 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
}
/**
* Gets the iterator selected occurrence ids.
*
* @return the iterator selected occurrence ids
* @throws SearchServiceException the search service exception
*/
protected Iterator<Occurrence> getIteratorSelectedOccurrenceIds() throws SearchServiceException{
FetchingSession<Occurrence> occurrenceSession = getOccurrenceSession();
@ -923,17 +1026,29 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#saveSelectedOccurrencePoints(java.lang.String, java.lang.String, org.gcube.portlets.user.speciesdiscovery.shared.SaveFileFormat, org.gcube.portlets.user.speciesdiscovery.shared.OccurrencesSaveEnum)
*/
@Override
@Deprecated
public void saveSelectedOccurrencePoints(String destinationFolderId, String fileName, SaveFileFormat fileFormat, OccurrencesSaveEnum typeCSV) throws SearchServiceException {
logger.info("saveSelectedOccurrencePoints destinationFolderId: "+destinationFolderId+" fileName: "+fileName+" fileFormat: "+fileFormat+" typeCSV: "+typeCSV);
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#saveSelectedTaxonomyPoints(java.lang.String, java.lang.String, org.gcube.portlets.user.speciesdiscovery.shared.SaveFileFormat)
*/
@Override
public void saveSelectedTaxonomyPoints(String destinationFolderId, String fileName, SaveFileFormat fileFormat) throws SearchServiceException {
//TODO OLD CALL
}
/**
* Gets the selected occurrence keys.
*
* @return the selected occurrence keys
* @throws SearchServiceException the search service exception
*/
@SuppressWarnings("unchecked")
protected List<String> getSelectedOccurrenceKeys() throws SearchServiceException
{
@ -966,6 +1081,12 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/**
* Gets the selected result row id.
*
* @return the selected result row id
* @throws SearchServiceException the search service exception
*/
@SuppressWarnings("unchecked")
protected List<String> getSelectedResultRowId() throws SearchServiceException
{
@ -996,6 +1117,12 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return listId;
}
/**
* Gets the selected taxonomy id and data source.
*
* @return the selected taxonomy id and data source
* @throws SearchServiceException the search service exception
*/
@SuppressWarnings("unchecked")
protected Map<String, String> getSelectedTaxonomyIdAndDataSource() throws SearchServiceException
{
@ -1027,6 +1154,14 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return hashIdTaxonDataSource;
}
/**
* Generate csv file.
*
* @param ids the ids
* @param csvType the csv type
* @return the file
* @throws Exception the exception
*/
protected File generateCSVFile(List<String> ids, OccurrencesSaveEnum csvType) throws Exception
{
File csvFile = File.createTempFile("test", ".csv");
@ -1066,6 +1201,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#loadDataSourceList()
*/
@Override
public List<DataSourceModel> loadDataSourceList() throws SearchServiceException {
logger.info("loadDataSourceList... ");
@ -1094,6 +1232,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#loadListCommonNameByRowId(java.lang.String)
*/
@Override
@Deprecated
public ArrayList<CommonName> loadListCommonNameByRowId(String resultRowId) throws Exception {
@ -1103,6 +1244,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return listCommonName;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getParentsList(org.gcube.portlets.user.speciesdiscovery.shared.Taxon)
*/
@Override
@Deprecated
public List<Taxon> getParentsList(Taxon taxon) throws Exception {
@ -1111,6 +1255,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#loadListChildrenByParentId(java.lang.String)
*/
@Override
public ArrayList<LightTaxonomyRow> loadListChildrenByParentId(String parentId) throws Exception {
logger.info("Load List Children By ParentId: " + parentId);
@ -1163,6 +1310,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return listLightTaxonomyRow;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getListTaxonomyJobs()
*/
@Override
public List<JobTaxonomyModel> getListTaxonomyJobs() throws Exception {
logger.info("getListTaxonomyJobs... ");
@ -1213,13 +1363,14 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
/**
* Creates the taxonomy job by children.
*
* @param taxonomyServiceId
* @param taxonomyName
* @param taxonomyRank
* @param dataSourceName
* @return
* @throws Exception
* @param taxonomyServiceId the taxonomy service id
* @param taxonomyName the taxonomy name
* @param taxonomyRank the taxonomy rank
* @param dataSourceName the data source name
* @return the job taxonomy model
* @throws Exception the exception
*/
@Override
public JobTaxonomyModel createTaxonomyJobByChildren(String taxonomyServiceId, String taxonomyName, String taxonomyRank, String dataSourceName) throws Exception {
@ -1254,6 +1405,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#createTaxonomyJobByIds(java.lang.String, java.util.List)
*/
@Override
public JobTaxonomyModel createTaxonomyJobByIds(String search, List<DataSourceModel> dataSources) throws Exception {
@ -1296,6 +1450,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#resubmitTaxonomyJob(java.lang.String)
*/
@Override
public JobTaxonomyModel resubmitTaxonomyJob(String jobIdentifier) throws Exception {
@ -1343,6 +1500,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return jobSpeciesModel;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#cancelTaxonomyJob(java.lang.String)
*/
@Override
public boolean cancelTaxonomyJob(String jobIdentifier) throws Exception {
@ -1368,6 +1528,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return false;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#saveTaxonomyJob(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public boolean saveTaxonomyJob(String jobIdentifier, String destinationFolderId, String fileName, String scientificName, String dataSourceName) throws Exception {
@ -1404,6 +1567,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#saveTaxonomyJobError(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public boolean saveTaxonomyJobError(String jobIdentifier, String destinationFolderId, String fileName, String scientificName, String dataSourceName) throws Exception {
logger.info("saveSpeciesJob error jobId: "+jobIdentifier+" destinationFolderId: "+destinationFolderId+" fileName: "+fileName);
@ -1439,6 +1605,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#retrieveTaxonomyByIds(java.util.List)
*/
@Override
public List<LightTaxonomyRow> retrieveTaxonomyByIds(List<String> ids) throws Exception{
logger.info("retrieveTaxonomyByIds ids size: " + ids.size());
@ -1490,6 +1659,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#retrieveSynonymsByRefId(java.lang.String)
*/
@Override
public List<LightTaxonomyRow> retrieveSynonymsByRefId(String refId) throws Exception{
logger.info("retrieveSynonymsById id: " + refId);
@ -1604,6 +1776,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#resubmitOccurrencesJob(java.lang.String)
*/
@Override
public List<JobOccurrencesModel> resubmitOccurrencesJob(String jobIdentifier) throws Exception {
logger.info("createOccurencesJobFromSelection...");
@ -1657,6 +1832,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getListOccurrencesJob()
*/
@Override
public List<JobOccurrencesModel> getListOccurrencesJob() throws Exception{
logger.info("getListOccurencesJob... ");
@ -1706,6 +1884,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getListGisLayerJob()
*/
@Override
public List<JobGisLayerModel> getListGisLayerJob() throws Exception{
logger.info("getListGisLayerJob... ");
@ -1767,6 +1948,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#saveOccurrenceJob(org.gcube.portlets.user.speciesdiscovery.shared.JobOccurrencesModel, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public boolean saveOccurrenceJob(JobOccurrencesModel jobModel, String destinationFolderId, String fileName, String scientificName, String dataSourceName) throws Exception {
logger.info("saveOccurrenceJob jobId: "+jobModel.getJobIdentifier()+" destinationFolderId: "+destinationFolderId+" fileName: "+fileName + " file format: "+jobModel.getFileFormat());
@ -1811,6 +1995,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#saveOccurrenceJobError(org.gcube.portlets.user.speciesdiscovery.shared.JobOccurrencesModel, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public boolean saveOccurrenceJobError(JobOccurrencesModel jobModel, String destinationFolderId, String fileName, String scientificName, String dataSourceName) throws Exception {
@ -1849,6 +2036,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#cancelOccurrenceJob(java.lang.String)
*/
@Override
public boolean cancelOccurrenceJob(String jobIdentifier) throws Exception {
logger.info("cancelOccurrenceJob jobIdentifier: "+jobIdentifier);
@ -1871,6 +2061,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return false;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#loadStructuresForResultRowClustering()
*/
@Override
public ClusterStructuresForResultRow loadStructuresForResultRowClustering() throws Exception {
@ -1907,6 +2100,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
return cluster;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#loadClusterCommonNameForResultRowByScientificName(java.lang.String)
*/
@Override
public ClusterCommonNameDataSourceForResultRow loadClusterCommonNameForResultRowByScientificName(String scientificName) throws Exception {
@ -1927,6 +2123,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#loadDataSourceForResultRow(boolean, boolean)
*/
@Override
public List<DataSource> loadDataSourceForResultRow(boolean selected, boolean distinct) throws Exception {
@ -1965,6 +2164,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#loadStructuresForTaxonomyClustering()
*/
@Override
public ClusterStructuresForTaxonomyRow loadStructuresForTaxonomyClustering() throws Exception {
@ -2017,6 +2219,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#changeStatusOccurrenceJob(java.lang.String, org.gcube.portlets.user.speciesdiscovery.shared.DownloadState)
*/
@Override
public boolean changeStatusOccurrenceJob(String jobIdentifier, DownloadState state) throws Exception {
@ -2031,6 +2236,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#changeStatusTaxonomyJob(java.lang.String, org.gcube.portlets.user.speciesdiscovery.shared.DownloadState)
*/
@Override
public boolean changeStatusTaxonomyJob(String jobIdentifier, DownloadState state) throws Exception {
@ -2081,6 +2289,9 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
}
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.speciesdiscovery.client.rpc.TaxonomySearchService#getLastQuery()
*/
@Override
public String getLastQuery(){
logger.info("getLastQuery...");
@ -2246,4 +2457,6 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
//
// return jobGisLayerModel;
}
}

View File

@ -11,7 +11,7 @@
<!-- <inherits name="org.gcube.portlets.user.gcubegisviewer.GCubeGisViewer" /> -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
<set-property name="log_DivLogger" value="DISABLED" />
<set-property name="log_DivLogger" value="ENABLED" />
<!-- <inherits name='org.gcube.portlets.widgets.lighttree.WorkspacePortletLightTree'
/> -->