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; import org.gcube.portlets.user.speciesdiscovery.shared.JobGisLayerModel; import org.gcube.portlets.user.speciesdiscovery.shared.JobOccurrencesModel; import org.gcube.portlets.user.speciesdiscovery.shared.JobTaxonomyModel; import org.gcube.portlets.user.speciesdiscovery.shared.LightTaxonomyRow; 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; import org.gcube.portlets.user.speciesdiscovery.shared.SearchByQueryParameter; 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; import org.gcube.portlets.user.speciesdiscovery.shared.cluster.ClusterCommonNameDataSourceForResultRow; import org.gcube.portlets.user.speciesdiscovery.shared.cluster.ClusterCommonNameDataSourceForTaxonomyRow; 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 GreetingService. */ public interface TaxonomySearchServiceAsync { public void searchByScientificName(String searchTerm, SearchFilters searchFilters, AsyncCallback callback); public void searchByCommonName(String searchTerm, SearchFilters searchFilters, AsyncCallback callback); void getSearchStatus(boolean onlySelected, boolean isActiveFilterOnResult, AsyncCallback callback); // void getSearchStatus(boolean onlySelected, AsyncCallback callback); public void stopSearch(AsyncCallback callback); public void updateRowSelection(int rowId, boolean selection, AsyncCallback callback); public void retrieveOccurencesFromSelection(AsyncCallback callback); void getOccurrencesBatch(int start, int count, AsyncCallback callback); public void stopRetrievingOccurrences(AsyncCallback callback); void createGisLayerJobFromSelectedOccurrenceKeys( String layerTitle, String layerDescr, long totalPoints, AsyncCallback callback); void saveSelectedOccurrencePoints(String destinationFolderId, String fileName, SaveFileFormat fileFormat, OccurrencesSaveEnum typeCSV, AsyncCallback callback); void updateRowSelections(boolean selection, ResultFilter activeFiltersObject, AsyncCallback callback); void loadDataSourceList(AsyncCallback> callback); void getFilterCounterById(GridField field, AsyncCallback> callback); void getParentsList(Taxon taxon, AsyncCallback> callback); void getFilterCounterForClassification(String rank, AsyncCallback> callback); void loadListCommonNameByRowId(String resultRowId, AsyncCallback> asyncCallback); void countOfSelectedRow(AsyncCallback callback); void searchByQuery(String query, AsyncCallback callback); void getSearchResultRows(int start, int limit, ResultFilter activeFiltersObject, boolean onlySelected, AsyncCallback> callback); public void getSearchTaxonomyRow(int start, int limit, ResultFilter activeFiltersObject, boolean showOnlySelected, AsyncCallback> asyncCallback); void loadListChildrenByParentId(String parentId, AsyncCallback> asyncCallback); void saveSelectedTaxonomyPoints(String destinationFolderId, String fileName, SaveFileFormat fileFormat, AsyncCallback callback); void getCountOfOccurrencesBatch(AsyncCallback callback); void getListTaxonomyJobs(AsyncCallback> callback); // void createTaxonomyJobByChildren(TaxonomyRow taxonomy, String dataSourceName, // AsyncCallback callback); void cancelTaxonomyJob(String jobIdentifier, AsyncCallback callback); void saveTaxonomyJob(String jobIdentifier, String destinationFolderId, String fileName, String scientificName, String dataSourceName, AsyncCallback callback); void retrieveTaxonomyByIds(List ids, AsyncCallback> asyncCallback); void retrieveSynonymsByRefId(String refId, AsyncCallback> asyncCallback); void createOccurrencesJob(List listJobOccurrenceModel, SaveFileFormat saveFileFormat, OccurrencesSaveEnum csvType, boolean isByDataSource, int expectedOccurrence, AsyncCallback> callback); void getListOccurrencesJob(AsyncCallback> callback); void saveOccurrenceJob(JobOccurrencesModel jobModel, String destinationFolderId, String fileName, String scientificName, String dataSourceName, AsyncCallback callback); void cancelOccurrenceJob(String jobIdentifier, AsyncCallback callback); void resubmitTaxonomyJob(String jobIdentifier, AsyncCallback callback); void resubmitOccurrencesJob(String jobIdentifier, AsyncCallback> callback); void loadStructuresForResultRowClustering( AsyncCallback callback); void loadStructuresForTaxonomyClustering( AsyncCallback callback); void changeStatusOccurrenceJob(String jobIdentifier, DownloadState state, AsyncCallback callback); void changeStatusTaxonomyJob(String jobIdentifier, DownloadState state, AsyncCallback callback); void loadDataSourceForResultRow(boolean selected, boolean distinct, AsyncCallback> callback); void createTaxonomyJobByIds(String search, List dataSources, AsyncCallback callback); void createTaxonomyJobByChildren(String taxonomyServiceId, String taxonomyName, String taxonomyRank, String dataSourceName, AsyncCallback callback); void saveTaxonomyJobError(String jobIdentifier, String destinationFolderId, String fileName, String scientificName, String dataSourceName, AsyncCallback callback); void saveOccurrenceJobError(JobOccurrencesModel jobModel, String destinationFolderId, String fileName, String scientificName, String dataSourceName, AsyncCallback callback); void isAvailableOccurrenceJobReportError(String jobIdentifier, AsyncCallback callback); void isAvailableTaxonomyJobReportError(String jobIdentifier, AsyncCallback callback); void getLastQuery(AsyncCallback callback); void loadClusterCommonNameForResultRowByScientificName( String scientificName, AsyncCallback callback); void loadClusterCommonNameForTaxonomyRowByScientificName( String scientificName, AsyncCallback callback); void getListGisLayerJob(AsyncCallback> callback); /** * @param jobGisLayer * @param id * @param fileName * @param asyncCallback */ public void saveGisLayerAsWsLink( JobGisLayerModel jobGisLayer, String id, String fileName, AsyncCallback asyncCallback); /** * @param jobId * @param state * @param asyncCallback */ public void changeStatusGisLayerJob( String jobId, DownloadState state, AsyncCallback asyncCallback); /** * @param jobIdentifier * @param asyncCallback */ public void cancelGisLayerJob( String jobIdentifier, AsyncCallback asyncCallback); /** * @param jobIdentifier * @param asyncCallback */ public void resubmitGisLayerJob( String jobIdentifier, AsyncCallback asyncCallback); }