public class TaxonomySearchServiceImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements TaxonomySearchService
| Modifier and Type | Field and Description |
|---|---|
static String |
BASETAXONOMY |
protected static long |
BUFFER_LIMIT |
protected org.apache.log4j.Logger |
logger |
protected static long |
MAX_BUFFERING_ELEMENTS |
protected static String |
RESUBMIT |
protected static String |
SAVE_CHILDREN_OF |
static String |
TAXONOMYUNKNOWN |
static String |
UNK |
| Constructor and Description |
|---|
TaxonomySearchServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelGisLayerJob(String jobIdentifier)
Cancel gis layer job.
|
boolean |
cancelOccurrenceJob(String jobIdentifier)
Cancel occurrence job.
|
boolean |
cancelTaxonomyJob(String jobIdentifier)
Cancel taxonomy job.
|
boolean |
changeStatusGisLayerJob(String jobId,
DownloadState state)
Change status gis layer job.
|
boolean |
changeStatusOccurrenceJob(String jobIdentifier,
DownloadState state)
Change status occurrence job.
|
boolean |
changeStatusTaxonomyJob(String jobIdentifier,
DownloadState state)
Change status taxonomy job.
|
int |
countOfSelectedRow() |
JobGisLayerModel |
createGisLayerJobFromSelectedOccurrenceKeys(String layerTitle,
String layerDescr,
long totalPoints) |
List<JobOccurrencesModel> |
createOccurrencesJob(List<JobOccurrencesModel> listJobOccurrenceModel,
SaveFileFormat saveFileFormat,
OccurrencesSaveEnum csvType,
boolean isByDataSource,
int expectedOccurrence) |
JobTaxonomyModel |
createTaxonomyJobByChildren(String taxonomyServiceId,
String taxonomyName,
String taxonomyRank,
String dataSourceName)
Creates the taxonomy job by children.
|
JobTaxonomyModel |
createTaxonomyJobByIds(String search,
List<DataSourceModel> dataSources)
Creates the taxonomy job by ids.
|
protected File |
generateCSVFile(List<String> ids,
OccurrencesSaveEnum csvType)
Generate csv file.
|
protected org.gcube.application.framework.core.session.ASLSession |
getASLSession()
Gets the ASL session.
|
OccurrencesStatus |
getCountOfOccurrencesBatch()
Gets the count of occurrences batch.
|
HashMap<String,Integer> |
getFilterCounterById(GridField field) |
HashMap<String,ClassificationModel> |
getFilterCounterForClassification(String rankLabel)
Gets the filter counter for classification.
|
protected Iterator<Occurrence> |
getIteratorSelectedOccurrenceIds()
Gets the iterator selected occurrence ids.
|
String |
getLastQuery()
Gets the last query.
|
List<JobGisLayerModel> |
getListGisLayerJob()
Gets the list gis layer job.
|
List<JobOccurrencesModel> |
getListOccurrencesJob()
Gets the list occurrences job.
|
List<JobTaxonomyModel> |
getListTaxonomyJobs()
Gets the list taxonomy jobs.
|
OccurrenceBatch |
getOccurrencesBatch(int start,
int limit)
Gets the occurrences batch.
|
protected FetchingSession<Occurrence> |
getOccurrenceSession()
Gets the occurrence session.
|
List<Taxon> |
getParentsList(Taxon taxon)
Deprecated.
|
SearchResult<ResultRow> |
getSearchResultRows(int start,
int limit,
ResultFilter activeFiltersObject,
boolean onlySelected) |
protected FetchingSession<? extends FetchingElement> |
getSearchSession()
Gets the search session.
|
SearchStatus |
getSearchStatus(boolean onlySelected,
boolean isActiveFilterOnResult) |
SearchResult<TaxonomyRow> |
getSearchTaxonomyRow(int start,
int limit,
ResultFilter activeFiltersObject,
boolean onlySelected)
Gets the search taxonomy row.
|
protected List<String> |
getSelectedOccurrenceIds()
Gets the selected occurrence ids.
|
protected List<String> |
getSelectedOccurrenceKeys()
Gets the selected occurrence keys.
|
protected List<String> |
getSelectedResultRowId()
Gets the selected result row id.
|
protected Map<String,String> |
getSelectedTaxonomyIdAndDataSource()
Gets the selected taxonomy id and data source.
|
protected SpeciesService |
getSpeciesService()
Gets the species service.
|
boolean |
isAvailableOccurrenceJobReportError(String jobIdentifier)
Checks if is available occurrence job report error.
|
boolean |
isAvailableTaxonomyJobReportError(String jobIdentifier)
Checks if is available taxonomy job report error.
|
ClusterCommonNameDataSourceForResultRow |
loadClusterCommonNameForResultRowByScientificName(String scientificName)
Load cluster common name for result row by scientific name.
|
ClusterCommonNameDataSourceForTaxonomyRow |
loadClusterCommonNameForTaxonomyRowByScientificName(String scientificName)
Load cluster common name for taxonomy row by scientific name.
|
List<DataSource> |
loadDataSourceForResultRow(boolean selected,
boolean distinct)
Load data source for result row.
|
List<DataSourceModel> |
loadDataSourceList()
Load data source list.
|
ArrayList<LightTaxonomyRow> |
loadListChildrenByParentId(String parentId)
Load list children by parent id.
|
ArrayList<CommonName> |
loadListCommonNameByRowId(String resultRowId)
Deprecated.
|
ClusterStructuresForResultRow |
loadStructuresForResultRowClustering()
Load structures for result row clustering.
|
ClusterStructuresForTaxonomyRow |
loadStructuresForTaxonomyClustering()
Load structures for taxonomy clustering.
|
TaxonomyRow |
loadTaxonomyParentByParentId(String parentID)
Load taxonomy parent by parent id.
|
protected void |
printId(List<String> listId)
Prints the id.
|
JobGisLayerModel |
resubmitGisLayerJob(String jobIdentifier)
Resubmit gis layer job.
|
List<JobOccurrencesModel> |
resubmitOccurrencesJob(String jobIdentifier)
Resubmit occurrences job.
|
JobTaxonomyModel |
resubmitTaxonomyJob(String jobIdentifier)
Resubmit taxonomy job.
|
int |
retrieveOccurencesFromSelection() |
List<LightTaxonomyRow> |
retrieveSynonymsByRefId(String refId)
Retrieve synonyms by ref id.
|
List<LightTaxonomyRow> |
retrieveTaxonomyByIds(List<String> ids)
Retrieve taxonomy by ids.
|
boolean |
saveGisLayerAsWsLink(JobGisLayerModel jobGisLayer,
String destinationFolderId,
String fileName)
Save gis layer as ws link.
|
boolean |
saveOccurrenceJob(JobOccurrencesModel jobModel,
String destinationFolderId,
String fileName,
String scientificName,
String dataSourceName)
Save occurrence job.
|
boolean |
saveOccurrenceJobError(JobOccurrencesModel jobModel,
String destinationFolderId,
String fileName,
String scientificName,
String dataSourceName)
Save occurrence job error.
|
void |
saveSelectedOccurrencePoints(String destinationFolderId,
String fileName,
SaveFileFormat fileFormat,
OccurrencesSaveEnum typeCSV)
Deprecated.
|
void |
saveSelectedTaxonomyPoints(String destinationFolderId,
String fileName,
SaveFileFormat fileFormat)
Save selected taxonomy points.
|
boolean |
saveTaxonomyJob(String jobIdentifier,
String destinationFolderId,
String fileName,
String scientificName,
String dataSourceName)
Save taxonomy job.
|
boolean |
saveTaxonomyJobError(String jobIdentifier,
String destinationFolderId,
String fileName,
String scientificName,
String dataSourceName)
Save taxonomy job error.
|
protected SearchResultType |
search(String searchTerm,
SearchType searchType,
SearchFilters searchFilters)
Search.
|
void |
searchByCommonName(String searchTerm,
SearchFilters searchFilters) |
SearchByQueryParameter |
searchByQuery(String query)
Search by query.
|
void |
searchByScientificName(String searchTerm,
SearchFilters searchFilters) |
void |
stopRetrievingOccurrences() |
void |
stopSearchWithoutRemove() |
void |
updateRowSelection(int rowId,
boolean selection) |
Integer |
updateRowSelections(boolean selection,
ResultFilter activeFiltersObject) |
void |
userStopSearch()
User stop search.
|
checkPermutationStrongName, doGetSerializationPolicy, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponsedoPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceprotected static final String SAVE_CHILDREN_OF
protected static final String RESUBMIT
protected static final long MAX_BUFFERING_ELEMENTS
protected static final long BUFFER_LIMIT
protected org.apache.log4j.Logger logger
public static final String TAXONOMYUNKNOWN
public static final String BASETAXONOMY
public static final String UNK
protected org.gcube.application.framework.core.session.ASLSession getASLSession()
protected SpeciesService getSpeciesService() throws SearchServiceException
SearchServiceException - the search service exceptionprotected FetchingSession<? extends FetchingElement> getSearchSession() throws SearchServiceException
SearchServiceException - the search service exceptionprotected FetchingSession<Occurrence> getOccurrenceSession() throws SearchServiceException
SearchServiceException - the search service exceptionpublic void searchByScientificName(String searchTerm, SearchFilters searchFilters) throws SearchServiceException
searchByScientificName in interface TaxonomySearchServiceSearchServiceExceptionpublic void searchByCommonName(String searchTerm, SearchFilters searchFilters) throws SearchServiceException
searchByCommonName in interface TaxonomySearchServiceSearchServiceExceptionprotected SearchResultType search(String searchTerm, SearchType searchType, SearchFilters searchFilters) throws SearchServiceException
searchTerm - the search termsearchType - the search typesearchFilters - the search filtersSearchServiceException - the search service exceptionpublic SearchByQueryParameter searchByQuery(String query) throws SearchServiceException
searchByQuery in interface TaxonomySearchServicequery - the querySearchServiceException - the search service exceptionpublic SearchResult<ResultRow> getSearchResultRows(int start, int limit, ResultFilter activeFiltersObject, boolean onlySelected) throws SessionExpired, SearchServiceException
getSearchResultRows in interface TaxonomySearchServiceSessionExpiredSearchServiceExceptionpublic SearchResult<TaxonomyRow> getSearchTaxonomyRow(int start, int limit, ResultFilter activeFiltersObject, boolean onlySelected) throws SearchServiceException
getSearchTaxonomyRow in interface TaxonomySearchServicestart - the startlimit - the limitactiveFiltersObject - the active filters objectonlySelected - the only selectedSearchServiceException - the search service exceptionpublic TaxonomyRow loadTaxonomyParentByParentId(String parentID) throws Exception
parentID - the parent idException - the exceptionpublic HashMap<String,Integer> getFilterCounterById(GridField field) throws Exception
getFilterCounterById in interface TaxonomySearchServiceExceptionpublic HashMap<String,ClassificationModel> getFilterCounterForClassification(String rankLabel) throws Exception
getFilterCounterForClassification in interface TaxonomySearchServicerankLabel - the rank labelException - the exceptionpublic SearchStatus getSearchStatus(boolean onlySelected, boolean isActiveFilterOnResult) throws SearchServiceException
getSearchStatus in interface TaxonomySearchServiceSearchServiceExceptionpublic void stopSearchWithoutRemove()
throws SearchServiceException
SearchServiceExceptionpublic void userStopSearch()
throws SearchServiceException
userStopSearch in interface TaxonomySearchServiceSearchServiceException - the search service exceptionpublic void updateRowSelection(int rowId,
boolean selection)
throws SearchServiceException
updateRowSelection in interface TaxonomySearchServiceSearchServiceExceptionpublic Integer updateRowSelections(boolean selection, ResultFilter activeFiltersObject) throws SearchServiceException
updateRowSelections in interface TaxonomySearchServiceSearchServiceExceptionpublic int countOfSelectedRow()
throws SearchServiceException
countOfSelectedRow in interface TaxonomySearchServiceSearchServiceExceptionpublic int retrieveOccurencesFromSelection()
throws SearchServiceException
retrieveOccurencesFromSelection in interface TaxonomySearchServiceSearchServiceExceptionpublic OccurrenceBatch getOccurrencesBatch(int start, int limit) throws SearchServiceException
getOccurrencesBatch in interface TaxonomySearchServicestart - the startlimit - the limitSearchServiceException - the search service exceptionpublic OccurrencesStatus getCountOfOccurrencesBatch() throws SearchServiceException
getCountOfOccurrencesBatch in interface TaxonomySearchServiceSearchServiceException - the search service exceptionpublic void stopRetrievingOccurrences()
throws SearchServiceException
stopRetrievingOccurrences in interface TaxonomySearchServiceSearchServiceExceptionpublic JobGisLayerModel createGisLayerJobFromSelectedOccurrenceKeys(String layerTitle, String layerDescr, long totalPoints) throws Exception
createGisLayerJobFromSelectedOccurrenceKeys in interface TaxonomySearchServiceExceptionprotected List<String> getSelectedOccurrenceIds() throws SearchServiceException
SearchServiceException - the search service exceptionprotected Iterator<Occurrence> getIteratorSelectedOccurrenceIds() throws SearchServiceException
SearchServiceException - the search service exception@Deprecated public void saveSelectedOccurrencePoints(String destinationFolderId, String fileName, SaveFileFormat fileFormat, OccurrencesSaveEnum typeCSV) throws SearchServiceException
saveSelectedOccurrencePoints in interface TaxonomySearchServicedestinationFolderId - the destination folder idfileName - the file namefileFormat - the file formattypeCSV - the type CSVSearchServiceException - the search service exceptionpublic void saveSelectedTaxonomyPoints(String destinationFolderId, String fileName, SaveFileFormat fileFormat) throws SearchServiceException
saveSelectedTaxonomyPoints in interface TaxonomySearchServicedestinationFolderId - the destination folder idfileName - the file namefileFormat - the file formatSearchServiceException - the search service exceptionprotected List<String> getSelectedOccurrenceKeys() throws SearchServiceException
SearchServiceException - the search service exceptionprotected List<String> getSelectedResultRowId() throws SearchServiceException
SearchServiceException - the search service exceptionprotected Map<String,String> getSelectedTaxonomyIdAndDataSource() throws SearchServiceException
SearchServiceException - the search service exceptionprotected File generateCSVFile(List<String> ids, OccurrencesSaveEnum csvType) throws Exception
ids - the idscsvType - the csv typeException - the exceptionpublic List<DataSourceModel> loadDataSourceList() throws SearchServiceException
loadDataSourceList in interface TaxonomySearchServiceSearchServiceException - the search service exception@Deprecated public ArrayList<CommonName> loadListCommonNameByRowId(String resultRowId) throws Exception
loadListCommonNameByRowId in interface TaxonomySearchServiceresultRowId - the result row idException - the exception@Deprecated public List<Taxon> getParentsList(Taxon taxon) throws Exception
getParentsList in interface TaxonomySearchServicetaxon - the taxonException - the exceptionpublic ArrayList<LightTaxonomyRow> loadListChildrenByParentId(String parentId) throws Exception
loadListChildrenByParentId in interface TaxonomySearchServiceparentId - the parent idException - the exceptionpublic List<JobTaxonomyModel> getListTaxonomyJobs() throws SessionExpired, Exception
getListTaxonomyJobs in interface TaxonomySearchServiceSessionExpired - the session expiredException - the exceptionpublic JobTaxonomyModel createTaxonomyJobByChildren(String taxonomyServiceId, String taxonomyName, String taxonomyRank, String dataSourceName) throws Exception
createTaxonomyJobByChildren in interface TaxonomySearchServicetaxonomyServiceId - the taxonomy service idtaxonomyName - the taxonomy nametaxonomyRank - the taxonomy rankdataSourceName - the data source nameException - the exceptionpublic JobTaxonomyModel createTaxonomyJobByIds(String search, List<DataSourceModel> dataSources) throws Exception
createTaxonomyJobByIds in interface TaxonomySearchServicesearch - the searchdataSources - the data sourcesException - the exceptionpublic JobTaxonomyModel resubmitTaxonomyJob(String jobIdentifier) throws Exception
resubmitTaxonomyJob in interface TaxonomySearchServicejobIdentifier - the job identifierException - the exceptionpublic boolean cancelTaxonomyJob(String jobIdentifier) throws Exception
cancelTaxonomyJob in interface TaxonomySearchServicejobIdentifier - the job identifierException - the exceptionpublic boolean saveTaxonomyJob(String jobIdentifier, String destinationFolderId, String fileName, String scientificName, String dataSourceName) throws Exception
saveTaxonomyJob in interface TaxonomySearchServicejobIdentifier - the job identifierdestinationFolderId - the destination folder idfileName - the file namescientificName - the scientific namedataSourceName - the data source nameException - the exceptionpublic boolean saveTaxonomyJobError(String jobIdentifier, String destinationFolderId, String fileName, String scientificName, String dataSourceName) throws Exception
saveTaxonomyJobError in interface TaxonomySearchServicejobIdentifier - the job identifierdestinationFolderId - the destination folder idfileName - the file namescientificName - the scientific namedataSourceName - the data source nameException - the exceptionpublic List<LightTaxonomyRow> retrieveTaxonomyByIds(List<String> ids) throws Exception
retrieveTaxonomyByIds in interface TaxonomySearchServiceids - the idsException - the exceptionpublic List<LightTaxonomyRow> retrieveSynonymsByRefId(String refId) throws Exception
retrieveSynonymsByRefId in interface TaxonomySearchServicerefId - the ref idException - the exceptionpublic List<JobOccurrencesModel> createOccurrencesJob(List<JobOccurrencesModel> listJobOccurrenceModel, SaveFileFormat saveFileFormat, OccurrencesSaveEnum csvType, boolean isByDataSource, int expectedOccurrence) throws Exception
createOccurrencesJob in interface TaxonomySearchServiceExceptionpublic List<JobOccurrencesModel> resubmitOccurrencesJob(String jobIdentifier) throws Exception
resubmitOccurrencesJob in interface TaxonomySearchServicejobIdentifier - the job identifierException - the exceptionpublic List<JobOccurrencesModel> getListOccurrencesJob() throws SessionExpired, Exception
getListOccurrencesJob in interface TaxonomySearchServiceSessionExpired - the session expiredException - the exceptionpublic List<JobGisLayerModel> getListGisLayerJob() throws SessionExpired, Exception
getListGisLayerJob in interface TaxonomySearchServiceSessionExpired - the session expiredException - the exceptionpublic boolean saveOccurrenceJob(JobOccurrencesModel jobModel, String destinationFolderId, String fileName, String scientificName, String dataSourceName) throws Exception
saveOccurrenceJob in interface TaxonomySearchServicejobModel - the job modeldestinationFolderId - the destination folder idfileName - the file namescientificName - the scientific namedataSourceName - the data source nameException - the exceptionpublic boolean saveOccurrenceJobError(JobOccurrencesModel jobModel, String destinationFolderId, String fileName, String scientificName, String dataSourceName) throws Exception
saveOccurrenceJobError in interface TaxonomySearchServicejobModel - the job modeldestinationFolderId - the destination folder idfileName - the file namescientificName - the scientific namedataSourceName - the data source nameException - the exceptionpublic boolean cancelOccurrenceJob(String jobIdentifier) throws Exception
cancelOccurrenceJob in interface TaxonomySearchServicejobIdentifier - the job identifierException - the exceptionpublic ClusterStructuresForResultRow loadStructuresForResultRowClustering() throws Exception
loadStructuresForResultRowClustering in interface TaxonomySearchServiceException - the exceptionpublic ClusterCommonNameDataSourceForResultRow loadClusterCommonNameForResultRowByScientificName(String scientificName) throws Exception
loadClusterCommonNameForResultRowByScientificName in interface TaxonomySearchServicescientificName - the scientific nameException - the exceptionpublic List<DataSource> loadDataSourceForResultRow(boolean selected, boolean distinct) throws Exception
loadDataSourceForResultRow in interface TaxonomySearchServiceselected - the selecteddistinct - the distinctException - the exceptionpublic ClusterStructuresForTaxonomyRow loadStructuresForTaxonomyClustering() throws Exception
loadStructuresForTaxonomyClustering in interface TaxonomySearchServiceException - the exceptionpublic boolean changeStatusOccurrenceJob(String jobIdentifier, DownloadState state) throws Exception
changeStatusOccurrenceJob in interface TaxonomySearchServicejobIdentifier - the job identifierstate - the stateException - the exceptionpublic boolean changeStatusTaxonomyJob(String jobIdentifier, DownloadState state) throws Exception
changeStatusTaxonomyJob in interface TaxonomySearchServicejobIdentifier - the job identifierstate - the stateException - the exceptionpublic boolean isAvailableTaxonomyJobReportError(String jobIdentifier) throws Exception
isAvailableTaxonomyJobReportError in interface TaxonomySearchServicejobIdentifier - the job identifierException - the exceptionpublic boolean isAvailableOccurrenceJobReportError(String jobIdentifier) throws Exception
isAvailableOccurrenceJobReportError in interface TaxonomySearchServicejobIdentifier - the job identifierException - the exceptionpublic String getLastQuery()
getLastQuery in interface TaxonomySearchServicepublic ClusterCommonNameDataSourceForTaxonomyRow loadClusterCommonNameForTaxonomyRowByScientificName(String scientificName)
loadClusterCommonNameForTaxonomyRowByScientificName in interface TaxonomySearchServicescientificName - the scientific namepublic boolean saveGisLayerAsWsLink(JobGisLayerModel jobGisLayer, String destinationFolderId, String fileName) throws Exception
saveGisLayerAsWsLink in interface TaxonomySearchServicejobGisLayer - the job gis layerdestinationFolderId - the destination folder idfileName - the file nameException - the exceptionpublic boolean changeStatusGisLayerJob(String jobId, DownloadState state)
changeStatusGisLayerJob in interface TaxonomySearchServicejobId - the job idstate - the statepublic boolean cancelGisLayerJob(String jobIdentifier) throws Exception
cancelGisLayerJob in interface TaxonomySearchServicejobIdentifier - the job identifierException - the exceptionpublic JobGisLayerModel resubmitGisLayerJob(String jobIdentifier) throws Exception
resubmitGisLayerJob in interface TaxonomySearchServicejobIdentifier - the job identifierException - the exceptionCopyright © 2021. All Rights Reserved.