Search in sources :

Example 16 with TaxonOccurrence

use of org.openforis.idm.model.TaxonOccurrence in project collect by openforis.

the class SpeciesService method findByFamilyCode.

@Secured("ROLE_ENTRY")
public List<TaxonOccurrenceProxy> findByFamilyCode(String taxonomyName, String searchString, int maxResults, TaxonSearchParameters parameters) {
    CollectTaxonomy taxonomy = loadTaxonomyByActiveSurvey(taxonomyName);
    List<TaxonOccurrence> list = speciesManager.findByFamilyCode(taxonomy, searchString, maxResults, parameters);
    return Proxies.fromList(list, TaxonOccurrenceProxy.class);
}
Also used : TaxonOccurrence(org.openforis.idm.model.TaxonOccurrence) CollectTaxonomy(org.openforis.collect.model.CollectTaxonomy) Secured(org.springframework.security.access.annotation.Secured)

Example 17 with TaxonOccurrence

use of org.openforis.idm.model.TaxonOccurrence in project collect by openforis.

the class SpeciesService method findByCode.

@Secured("ROLE_ENTRY")
public List<TaxonOccurrenceProxy> findByCode(String taxonomyName, String searchString, int maxResults, TaxonSearchParameters parameters) {
    CollectTaxonomy taxonomy = loadTaxonomyByActiveSurvey(taxonomyName);
    List<TaxonOccurrence> list = speciesManager.findByCode(taxonomy, searchString, maxResults, parameters);
    return Proxies.fromList(list, TaxonOccurrenceProxy.class);
}
Also used : TaxonOccurrence(org.openforis.idm.model.TaxonOccurrence) CollectTaxonomy(org.openforis.collect.model.CollectTaxonomy) Secured(org.springframework.security.access.annotation.Secured)

Example 18 with TaxonOccurrence

use of org.openforis.idm.model.TaxonOccurrence in project collect by openforis.

the class TaxonTree method includeAncestorTaxons.

private void includeAncestorTaxons(Node node, TaxonOccurrence occurrence) {
    Node parent = node.getParent();
    while (parent != null) {
        occurrence.addAncestorTaxon(new TaxonOccurrence(parent.getTaxon()));
        parent = parent.getParent();
    }
}
Also used : TaxonOccurrence(org.openforis.idm.model.TaxonOccurrence)

Aggregations

TaxonOccurrence (org.openforis.idm.model.TaxonOccurrence)18 CollectTaxonomy (org.openforis.collect.model.CollectTaxonomy)8 Taxon (org.openforis.idm.model.species.Taxon)6 Secured (org.springframework.security.access.annotation.Secured)5 ArrayList (java.util.ArrayList)4 Test (org.junit.Test)4 CollectIntegrationTest (org.openforis.collect.CollectIntegrationTest)4 SpeciesImportProcess (org.openforis.collect.manager.speciesimport.SpeciesImportProcess)3 SpeciesImportStatus (org.openforis.collect.manager.speciesimport.SpeciesImportStatus)3 TaxonTree (org.openforis.collect.model.TaxonTree)2 List (java.util.List)1 SpeciesBackupImportJob (org.openforis.collect.io.metadata.species.SpeciesBackupImportJob)1 SpeciesBackupImportTask (org.openforis.collect.io.metadata.species.SpeciesBackupImportTask)1 TaxonSearchParameters (org.openforis.collect.manager.TaxonSearchParameters)1 CollectRecord (org.openforis.collect.model.CollectRecord)1 TaxonomyDefinition (org.openforis.idm.metamodel.ReferenceDataSchema.TaxonomyDefinition)1 TaxonAttribute (org.openforis.idm.model.TaxonAttribute)1 TaxonRank (org.openforis.idm.model.species.Taxon.TaxonRank)1 TaxonVernacularName (org.openforis.idm.model.species.TaxonVernacularName)1