use of org.openforis.collect.manager.TaxonSearchParameters in project collect by openforis.
the class SpeciesBackupImportJobIntegrationTest method findByCode.
protected TaxonOccurrence findByCode(String code) {
CollectTaxonomy taxonomy = speciesManager.loadTaxonomyByName(survey, TEST_TAXONOMY_NAME);
TaxonSearchParameters searchParameters = new TaxonSearchParameters();
searchParameters.setHighestRank(FAMILY);
List<TaxonOccurrence> occurrences = speciesManager.findByCode(taxonomy, code, 10, searchParameters);
assertNotNull(occurrences);
assertEquals(1, occurrences.size());
TaxonOccurrence occurrence = occurrences.get(0);
return occurrence;
}
Aggregations