2013-03-04 14:38:25 +01:00
|
|
|
package org.gcube.portlets.user.speciesdiscovery.client.rpc;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.client.model.ClassificationModel;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.client.util.GridField;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.CommonName;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.DataSource;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.DataSourceModel;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.DownloadState;
|
2017-02-09 18:23:28 +01:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.JobGisLayerModel;
|
2013-03-04 14:38:25 +01:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.JobOccurrencesModel;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.JobTaxonomyModel;
|
2013-10-24 12:52:34 +02:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.LightTaxonomyRow;
|
2013-03-04 14:38:25 +01:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.OccurrenceBatch;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.OccurrencesSaveEnum;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.OccurrencesStatus;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.ResultRow;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.SaveFileFormat;
|
2013-03-15 19:18:12 +01:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.SearchByQueryParameter;
|
2013-03-04 14:38:25 +01:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.SearchFilters;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.SearchResult;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.SearchStatus;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.Taxon;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.TaxonomyRow;
|
2013-10-24 12:52:34 +02:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.cluster.ClusterCommonNameDataSourceForResultRow;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.cluster.ClusterCommonNameDataSourceForTaxonomyRow;
|
2013-03-04 14:38:25 +01:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.cluster.ClusterStructuresForResultRow;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.cluster.ClusterStructuresForTaxonomyRow;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.filter.ResultFilter;
|
|
|
|
|
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The async counterpart of <code>GreetingService</code>.
|
|
|
|
*/
|
|
|
|
public interface TaxonomySearchServiceAsync {
|
|
|
|
|
|
|
|
public void searchByScientificName(String searchTerm, SearchFilters searchFilters, AsyncCallback<Void> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
public void searchByCommonName(String searchTerm, SearchFilters searchFilters, AsyncCallback<Void> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
void getSearchStatus(boolean onlySelected, boolean isActiveFilterOnResult,
|
|
|
|
AsyncCallback<SearchStatus> callback);
|
|
|
|
|
|
|
|
// void getSearchStatus(boolean onlySelected, AsyncCallback<SearchStatus> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
public void stopSearch(AsyncCallback<Void> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
public void updateRowSelection(int rowId, boolean selection, AsyncCallback<Void> callback);
|
|
|
|
|
|
|
|
public void retrieveOccurencesFromSelection(AsyncCallback<Integer> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
void getOccurrencesBatch(int start, int count, AsyncCallback<OccurrenceBatch> callback);
|
|
|
|
|
|
|
|
public void stopRetrievingOccurrences(AsyncCallback<Void> callback);
|
|
|
|
|
2017-02-09 18:23:28 +01:00
|
|
|
void createGisLayerJobFromSelectedOccurrenceKeys(
|
|
|
|
String layerTitle, String layerDescr,
|
2017-02-10 15:18:57 +01:00
|
|
|
long totalPoints, AsyncCallback<JobGisLayerModel> callback);
|
2013-03-04 14:38:25 +01:00
|
|
|
|
|
|
|
void saveSelectedOccurrencePoints(String destinationFolderId, String fileName, SaveFileFormat fileFormat, OccurrencesSaveEnum typeCSV, AsyncCallback<Void> callback);
|
|
|
|
|
|
|
|
void updateRowSelections(boolean selection,
|
|
|
|
ResultFilter activeFiltersObject, AsyncCallback<Integer> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
void loadDataSourceList(AsyncCallback<List<DataSourceModel>> callback);
|
|
|
|
|
|
|
|
void getFilterCounterById(GridField field, AsyncCallback<HashMap<String, Integer>> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
void getParentsList(Taxon taxon, AsyncCallback<List<Taxon>> callback);
|
|
|
|
|
|
|
|
void getFilterCounterForClassification(String rank, AsyncCallback<HashMap<String, ClassificationModel>> callback);
|
|
|
|
|
|
|
|
void loadListCommonNameByRowId(String resultRowId, AsyncCallback<ArrayList<CommonName>> asyncCallback);
|
|
|
|
|
|
|
|
void countOfSelectedRow(AsyncCallback<Integer> callback);
|
|
|
|
|
2013-03-15 19:18:12 +01:00
|
|
|
void searchByQuery(String query, AsyncCallback<SearchByQueryParameter> callback);
|
2013-03-04 14:38:25 +01:00
|
|
|
|
|
|
|
void getSearchResultRows(int start, int limit,
|
|
|
|
ResultFilter activeFiltersObject,
|
|
|
|
boolean onlySelected,
|
|
|
|
AsyncCallback<SearchResult<ResultRow>> callback);
|
|
|
|
|
|
|
|
public void getSearchTaxonomyRow(int start, int limit,
|
|
|
|
ResultFilter activeFiltersObject,
|
|
|
|
boolean showOnlySelected,
|
|
|
|
AsyncCallback<SearchResult<TaxonomyRow>> asyncCallback);
|
|
|
|
|
2013-10-24 12:52:34 +02:00
|
|
|
void loadListChildrenByParentId(String parentId, AsyncCallback<ArrayList<LightTaxonomyRow>> asyncCallback);
|
2013-03-04 14:38:25 +01:00
|
|
|
|
|
|
|
void saveSelectedTaxonomyPoints(String destinationFolderId, String fileName, SaveFileFormat fileFormat, AsyncCallback<Void> callback);
|
|
|
|
|
|
|
|
void getCountOfOccurrencesBatch(AsyncCallback<OccurrencesStatus> callback);
|
|
|
|
|
|
|
|
void getListTaxonomyJobs(AsyncCallback<List<JobTaxonomyModel>> callback);
|
|
|
|
|
2013-05-20 18:50:24 +02:00
|
|
|
// void createTaxonomyJobByChildren(TaxonomyRow taxonomy, String dataSourceName,
|
|
|
|
// AsyncCallback<JobTaxonomyModel> callback);
|
2013-03-04 14:38:25 +01:00
|
|
|
|
|
|
|
void cancelTaxonomyJob(String jobIdentifier, AsyncCallback<Boolean> callback);
|
|
|
|
|
|
|
|
void saveTaxonomyJob(String jobIdentifier, String destinationFolderId, String fileName, String scientificName, String dataSourceName, AsyncCallback<Boolean> callback);
|
|
|
|
|
2013-10-24 12:52:34 +02:00
|
|
|
void retrieveTaxonomyByIds(List<String> ids, AsyncCallback<List<LightTaxonomyRow>> asyncCallback);
|
2013-03-04 14:38:25 +01:00
|
|
|
|
2013-10-24 12:52:34 +02:00
|
|
|
void retrieveSynonymsByRefId(String refId, AsyncCallback<List<LightTaxonomyRow>> asyncCallback);
|
2013-03-04 14:38:25 +01:00
|
|
|
|
|
|
|
void createOccurrencesJob(List<JobOccurrencesModel> listJobOccurrenceModel, SaveFileFormat saveFileFormat, OccurrencesSaveEnum csvType, boolean isByDataSource, int expectedOccurrence, AsyncCallback<List<JobOccurrencesModel>> callback);
|
|
|
|
|
|
|
|
void getListOccurrencesJob(AsyncCallback<List<JobOccurrencesModel>> callback);
|
|
|
|
|
|
|
|
void saveOccurrenceJob(JobOccurrencesModel jobModel,
|
|
|
|
String destinationFolderId, String fileName, String scientificName,
|
|
|
|
String dataSourceName, AsyncCallback<Boolean> callback);
|
|
|
|
|
|
|
|
void cancelOccurrenceJob(String jobIdentifier, AsyncCallback<Boolean> callback);
|
|
|
|
|
|
|
|
void resubmitTaxonomyJob(String jobIdentifier,
|
|
|
|
AsyncCallback<JobTaxonomyModel> callback);
|
|
|
|
|
|
|
|
void resubmitOccurrencesJob(String jobIdentifier, AsyncCallback<List<JobOccurrencesModel>> callback);
|
|
|
|
|
|
|
|
void loadStructuresForResultRowClustering(
|
|
|
|
AsyncCallback<ClusterStructuresForResultRow> callback);
|
|
|
|
|
|
|
|
void loadStructuresForTaxonomyClustering(
|
|
|
|
AsyncCallback<ClusterStructuresForTaxonomyRow> callback);
|
|
|
|
|
|
|
|
void changeStatusOccurrenceJob(String jobIdentifier, DownloadState state,
|
|
|
|
AsyncCallback<Boolean> callback);
|
|
|
|
|
|
|
|
void changeStatusTaxonomyJob(String jobIdentifier, DownloadState state,
|
|
|
|
AsyncCallback<Boolean> callback);
|
|
|
|
|
|
|
|
void loadDataSourceForResultRow(boolean selected, boolean distinct,
|
|
|
|
AsyncCallback<List<DataSource>> callback);
|
|
|
|
|
|
|
|
void createTaxonomyJobByIds(String search, List<DataSourceModel> dataSources, AsyncCallback<JobTaxonomyModel> callback);
|
2013-05-20 18:50:24 +02:00
|
|
|
|
|
|
|
void createTaxonomyJobByChildren(String taxonomyServiceId,
|
|
|
|
String taxonomyName, String taxonomyRank, String dataSourceName,
|
|
|
|
AsyncCallback<JobTaxonomyModel> callback);
|
2013-07-16 19:36:40 +02:00
|
|
|
|
|
|
|
void saveTaxonomyJobError(String jobIdentifier, String destinationFolderId,
|
|
|
|
String fileName, String scientificName, String dataSourceName,
|
|
|
|
AsyncCallback<Boolean> callback);
|
|
|
|
|
|
|
|
void saveOccurrenceJobError(JobOccurrencesModel jobModel,
|
|
|
|
String destinationFolderId, String fileName, String scientificName,
|
|
|
|
String dataSourceName, AsyncCallback<Boolean> callback);
|
|
|
|
|
|
|
|
void isAvailableOccurrenceJobReportError(String jobIdentifier,
|
|
|
|
AsyncCallback<Boolean> callback);
|
|
|
|
|
|
|
|
void isAvailableTaxonomyJobReportError(String jobIdentifier,
|
|
|
|
AsyncCallback<Boolean> callback);
|
2013-07-18 18:32:28 +02:00
|
|
|
|
|
|
|
void getLastQuery(AsyncCallback<String> callback);
|
2013-10-24 12:52:34 +02:00
|
|
|
|
|
|
|
void loadClusterCommonNameForResultRowByScientificName(
|
|
|
|
String scientificName,
|
|
|
|
AsyncCallback<ClusterCommonNameDataSourceForResultRow> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2013-10-24 12:52:34 +02:00
|
|
|
void loadClusterCommonNameForTaxonomyRowByScientificName(
|
|
|
|
String scientificName,
|
|
|
|
AsyncCallback<ClusterCommonNameDataSourceForTaxonomyRow> callback);
|
2017-02-09 18:23:28 +01:00
|
|
|
|
2017-02-10 15:18:57 +01:00
|
|
|
void getListGisLayerJob(AsyncCallback<List<JobGisLayerModel>> callback);
|
|
|
|
|
2017-02-16 12:44:41 +01:00
|
|
|
/**
|
|
|
|
* @param jobGisLayer
|
|
|
|
* @param id
|
|
|
|
* @param fileName
|
|
|
|
* @param asyncCallback
|
|
|
|
*/
|
|
|
|
public void saveGisLayerAsWsLink(
|
|
|
|
JobGisLayerModel jobGisLayer, String id, String fileName,
|
|
|
|
AsyncCallback<Boolean> asyncCallback);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param jobId
|
|
|
|
* @param state
|
|
|
|
* @param asyncCallback
|
|
|
|
*/
|
|
|
|
public void changeStatusGisLayerJob(
|
|
|
|
String jobId, DownloadState state, AsyncCallback<Boolean> asyncCallback);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param jobIdentifier
|
|
|
|
* @param asyncCallback
|
|
|
|
*/
|
|
|
|
public void cancelGisLayerJob(
|
|
|
|
String jobIdentifier, AsyncCallback<Boolean> asyncCallback);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param jobIdentifier
|
|
|
|
* @param asyncCallback
|
|
|
|
*/
|
|
|
|
public void resubmitGisLayerJob(
|
|
|
|
String jobIdentifier, AsyncCallback<JobGisLayerModel> asyncCallback);
|
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
}
|