public class SpeciesService extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.gcube.data.spd.client.proxies.ManagerClient |
call |
protected org.gcube.data.spd.client.proxies.ClassificationClient |
classificationCall |
protected org.gcube.data.spd.client.proxies.ExecutorClient |
executorCall |
protected String |
lastQuery |
protected org.apache.log4j.Logger |
logger |
protected org.gcube.data.spd.client.proxies.OccurrenceClient |
occurrencesCall |
protected String |
scope |
| Constructor and Description |
|---|
SpeciesService()
Instantiates a new species service.
|
SpeciesService(String scope,
boolean instanceOnlyOccurrence)
Instantiates a new species service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelGisLayerByJobId(String serverJobId)
Cancel gis layer by job id.
|
void |
cancelOccurrenceJobById(String jobIdentifier)
Cancel occurrence job by id.
|
void |
cancelTaxonomyJobById(String jobIdentifier)
Cancel taxonomy job by id.
|
protected org.gcube.data.spd.model.Coordinate |
convertCoordinate(Coordinate coordinate)
Convert coordinate.
|
String |
createOccurrenceCSVJob(org.gcube.data.streams.Stream<String> streamKey)
Creates the occurrence csv job.
|
String |
createOccurrenceCSVOpenModellerJob(org.gcube.data.streams.Stream<String> streamKey)
Creates the occurrence csv open modeller job.
|
String |
createOccurrenceDARWINCOREJob(org.gcube.data.streams.Stream<String> streamKey)
Creates the occurrence darwincore job.
|
String |
createTaxonomyJobForDWCAByChildren(String taxonomyId)
Creates the taxonomy job for dwca by children.
|
String |
createTaxonomyJobForDWCAByIds(List<String> ids)
Creates the taxonomy job for dwca by ids.
|
String |
generateGisLayerFromOccurrenceKeys(List<String> occurrenceKeys,
String layerTitle,
String layerDescr,
String author,
String credits)
Generate gis layer from occurrence keys.
|
org.gcube.data.spd.model.service.types.CompleteJobStatus |
getGisLayerByJobId(String serverJobId)
Gets the gis layer by job id.
|
String |
getGisLayerResultLinkByJobId(String serverJobId)
Gets the gis layer result link by job id.
|
String |
getLastQuery()
Gets the last query.
|
org.gcube.data.spd.model.service.types.CompleteJobStatus |
getOccurrenceJobById(String jobId)
Gets the occurrence job by id.
|
InputStream |
getOccurrenceJobErrorFileById(String jobIdentifier)
Gets the occurrence job error file by id.
|
InputStream |
getOccurrenceJobFileById(String jobIdentifier)
Gets the occurrence job file by id.
|
CloseableIterator<org.gcube.data.spd.model.products.OccurrencePoint> |
getOccurrencesByIds(List<String> ids)
Gets the occurrences by ids.
|
CloseableIterator<org.gcube.data.spd.model.products.OccurrencePoint> |
getOccurrencesByKeys(List<String> keys)
Gets the occurrences by keys.
|
List<DataSourceModel> |
getPlugins()
Gets the plugins.
|
StreamIterator<org.gcube.data.spd.model.products.TaxonomyItem> |
getTaxonChildrenByParentId(String parentId)
Gets the taxon children by parent id.
|
org.gcube.data.spd.model.service.types.CompleteJobStatus |
getTaxonomyJobById(String jobId)
Gets the taxonomy job by id.
|
InputStream |
getTaxonomyJobErrorFileById(String jobIdentifier)
Gets the taxonomy job error file by id.
|
InputStream |
getTaxonomyJobFileById(String jobIdentifier)
Gets the taxonomy job file by id.
|
boolean |
isAvailableOccurrenceJobErrorFileById(String jobIdentifier)
Checks if is available occurrence job error file by id.
|
boolean |
isAvailableTaxonomyJobErrorFileById(String jobIdentifier)
Checks if is available taxonomy job error file by id.
|
CloseableIterator<org.gcube.data.spd.model.products.TaxonomyItem> |
retrieveSynonymsById(String id)
Retrieve synonyms by id.
|
CloseableIterator<org.gcube.data.spd.model.products.TaxonomyItem> |
retrieveTaxonomyById(List<String> ids)
Retrieve taxonomy by id.
|
CloseableIterator<org.gcube.data.spd.model.products.ResultElement> |
searchByFilters(String searchTerm,
SearchType searchType,
SearchFilters searchFilters)
Search by filters.
|
CloseableIterator<org.gcube.data.spd.model.products.ResultElement> |
searchByQuery(String query)
Search by query.
|
org.gcube.data.streams.Stream<org.gcube.data.spd.model.products.ResultElement> |
searchByQuery2(String query)
Search by query2.
|
protected org.apache.log4j.Logger logger
protected String scope
protected org.gcube.data.spd.client.proxies.ManagerClient call
protected org.gcube.data.spd.client.proxies.OccurrenceClient occurrencesCall
protected org.gcube.data.spd.client.proxies.ClassificationClient classificationCall
protected org.gcube.data.spd.client.proxies.ExecutorClient executorCall
protected String lastQuery
public SpeciesService()
throws Exception
Exception - the exceptionpublic CloseableIterator<org.gcube.data.spd.model.products.ResultElement> searchByFilters(String searchTerm, SearchType searchType, SearchFilters searchFilters) throws SearchServiceException
searchTerm - the search termsearchType - the search typesearchFilters - the search filtersSearchServiceException - the search service exceptionpublic CloseableIterator<org.gcube.data.spd.model.products.TaxonomyItem> retrieveTaxonomyById(List<String> ids) throws SearchServiceException
ids - the idsSearchServiceException - the search service exceptionpublic CloseableIterator<org.gcube.data.spd.model.products.TaxonomyItem> retrieveSynonymsById(String id) throws SearchServiceException
id - the idSearchServiceException - the search service exceptionpublic CloseableIterator<org.gcube.data.spd.model.products.ResultElement> searchByQuery(String query) throws SearchServiceException
query - the querySearchServiceException - the search service exceptionpublic org.gcube.data.streams.Stream<org.gcube.data.spd.model.products.ResultElement> searchByQuery2(String query) throws SearchServiceException
query - the querySearchServiceException - the search service exceptionpublic List<DataSourceModel> getPlugins() throws SearchServiceException
SearchServiceException - the search service exceptionprotected org.gcube.data.spd.model.Coordinate convertCoordinate(Coordinate coordinate)
coordinate - the coordinatepublic CloseableIterator<org.gcube.data.spd.model.products.OccurrencePoint> getOccurrencesByKeys(List<String> keys) throws SearchServiceException
keys - the keysSearchServiceException - the search service exceptionpublic CloseableIterator<org.gcube.data.spd.model.products.OccurrencePoint> getOccurrencesByIds(List<String> ids) throws SearchServiceException
ids - the idsSearchServiceException - the search service exceptionpublic String generateGisLayerFromOccurrenceKeys(List<String> occurrenceKeys, String layerTitle, String layerDescr, String author, String credits) throws SearchServiceException
occurrenceKeys - the occurrence keyslayerTitle - the layer titlelayerDescr - the layer descrauthor - the authorcredits - the creditsSearchServiceException - the search service exceptionpublic org.gcube.data.spd.model.service.types.CompleteJobStatus getGisLayerByJobId(String serverJobId) throws InvalidJobIdException, Exception
serverJobId - the server job idInvalidJobIdException - the invalid job id exceptionException - the exceptionpublic String getGisLayerResultLinkByJobId(String serverJobId) throws InvalidJobIdException
serverJobId - the server job idInvalidJobIdException - the invalid job id exceptionpublic void cancelGisLayerByJobId(String serverJobId)
serverJobId - the server job idpublic StreamIterator<org.gcube.data.spd.model.products.TaxonomyItem> getTaxonChildrenByParentId(String parentId) throws Exception
parentId - the parent idException - the exceptionpublic org.gcube.data.spd.model.service.types.CompleteJobStatus getTaxonomyJobById(String jobId)
jobId - the job idpublic InputStream getTaxonomyJobFileById(String jobIdentifier) throws Exception
jobIdentifier - the job identifierException - the exceptionpublic InputStream getTaxonomyJobErrorFileById(String jobIdentifier) throws Exception
jobIdentifier - the job identifierException - the exceptionpublic boolean isAvailableTaxonomyJobErrorFileById(String jobIdentifier) throws Exception
jobIdentifier - the job identifierException - the exceptionpublic String createTaxonomyJobForDWCAByChildren(String taxonomyId) throws Exception
taxonomyId - the taxonomy idException - the exceptionpublic String createTaxonomyJobForDWCAByIds(List<String> ids) throws Exception
ids - the idsException - the exceptionpublic void cancelTaxonomyJobById(String jobIdentifier)
jobIdentifier - the job identifierpublic org.gcube.data.spd.model.service.types.CompleteJobStatus getOccurrenceJobById(String jobId)
jobId - the job idpublic String createOccurrenceCSVJob(org.gcube.data.streams.Stream<String> streamKey) throws Exception
streamKey - the stream keyException - the exceptionpublic String createOccurrenceDARWINCOREJob(org.gcube.data.streams.Stream<String> streamKey) throws Exception
streamKey - the stream keyException - the exceptionpublic String createOccurrenceCSVOpenModellerJob(org.gcube.data.streams.Stream<String> streamKey) throws Exception
streamKey - the stream keyException - the exceptionpublic void cancelOccurrenceJobById(String jobIdentifier)
jobIdentifier - the job identifierpublic InputStream getOccurrenceJobFileById(String jobIdentifier) throws Exception
jobIdentifier - the job identifierException - the exceptionpublic InputStream getOccurrenceJobErrorFileById(String jobIdentifier) throws Exception
jobIdentifier - the job identifierException - the exceptionpublic boolean isAvailableOccurrenceJobErrorFileById(String jobIdentifier) throws Exception
jobIdentifier - the job identifierException - the exceptionpublic String getLastQuery()
Copyright © 2020. All Rights Reserved.