Package org.genesys.taxonomy.checker
Interface TaxonomyDatabase
- All Known Implementing Classes:
CachingInMemoryTaxonomyDatabase,InMemoryTaxonomyDatabase
public interface TaxonomyDatabase
Defines searches possible against a database of taxonomic data.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsGenus(String genus) Does the database contain at least one record that exactly matches specified genus?.booleancontainsSpecies(String genus, String species) Does the database contain at least one record that exactly matches specified genus and species?.booleancontainsSpecies(String genus, String species, String spAuthor) Does the database contain at least one record that exactly matches specified genus and species?.booleancontainsSubtaxa(String genus, String species, String subtaxa) Does the database contain at least one record that exactly matches specified genus, species and subtaxa?.booleanDoes the database contain at least one record that exactly matches specified genus, species and subtaxa?.findSimilar(String genus, String species, String spAuthor, String subtaxa, String subtAuthor, int maxSize) Suggest a list of matches.findSimilarGenus(String genus, int maxSize) Return a list of genera close to the specified genus.findSimilarSpecies(String genus, String species, String spAuthor, int maxSize) Return a list of species close to the specified genus and species.findSimilarSubtaxa(String genus, String species, String subtaxa, int maxSize) Suggest a list of subtaxafindSimilarSubtaxa(String genus, String species, String spAuthor, String subtaxa, String subtAuthor, int maxSize) Suggest a list of subtaxaList<org.genesys.taxonomy.gringlobal.model.IGrinSpecies>findSpeciesRow(String genus, String species, String subtaxa) Find SpeciesRows matching the definitionList<org.genesys.taxonomy.gringlobal.model.IGrinSpecies>Find SpeciesRows matching the definitionfindTaxa(String genus, String species, String spAuthor, String subtaxa, String subtAuthor, int maxSize) getGenus(long genusId) Get genus by genusIdgetSpeciesAuthority(String genus, String species) Return the species authority for the specified species within genus.getSpeciesAuthority(String genus, String species, String spAuthor) Return the species authority for the specified species within genus.org.genesys.taxonomy.gringlobal.model.IGrinSpeciesgetSpeciesRow(long speciesId) Get species by speciesIdgetSubtaxaAuthority(String genus, String species, String subtaxa) Return the authority for the specified subtaxagetSubtaxaAuthority(String genus, String species, String spAuthor, String subtaxa, String subtAuthor) Return the authority for the specified subtaxaGet exact match.List<org.genesys.taxonomy.gringlobal.model.IGrinSpecies>listSpecies(String genus, String species, int maxSize) Return all subtaxa for genus and speciesdoublesimilarityScore(String string1, String string2) Get string similarity score.
-
Method Details
-
containsGenus
Does the database contain at least one record that exactly matches specified genus?.- Parameters:
genus- the genus- Returns:
trueif there is at least one record
-
findSimilarGenus
Return a list of genera close to the specified genus.- Parameters:
genus- genusmaxSize- maximum rows to return- Returns:
- list of suggestions, ordered by preference (best first), never null.
-
containsSpecies
Does the database contain at least one record that exactly matches specified genus and species?.- Parameters:
genus- the genusspecies- the species- Returns:
trueif there is at least one record
-
containsSpecies
Does the database contain at least one record that exactly matches specified genus and species?.- Parameters:
genus- the genusspecies- the speciesspAuthor- species authority- Returns:
trueif there is at least one record
-
findSimilarSpecies
Return a list of species close to the specified genus and species.- Parameters:
genus- valid genusspecies- speciesspAuthor- species authoritymaxSize- maximum number of suggestions to return- Returns:
- list of suggestions, ordered by preference (best first), never null.
-
getSpeciesAuthority
Return the species authority for the specified species within genus.- Parameters:
genus- the genusspecies- the species- Returns:
- the authority or
null
-
getSpeciesAuthority
Return the species authority for the specified species within genus.- Parameters:
genus- the genusspecies- the speciesspAuthor- species authority- Returns:
- the authority or
null
-
containsSubtaxa
Does the database contain at least one record that exactly matches specified genus, species and subtaxa?.- Parameters:
genus- valid genusspecies- valid speciessubtaxa- subtaxa to check- Returns:
trueif there is at least one record
-
containsSubtaxa
boolean containsSubtaxa(String genus, String species, String spAuthor, String subtaxa, String subtAuthor) Does the database contain at least one record that exactly matches specified genus, species and subtaxa?.- Parameters:
genus- valid genusspecies- valid speciesspAuthor- species authoritysubtaxa- subtaxa to checksubtAuthor- species authority at the lowest classification level- Returns:
trueif there is at least one record
-
findSimilarSubtaxa
Suggest a list of subtaxa- Parameters:
genus- valid genusspecies- valid speciessubtaxa- subtaxa to checkmaxSize- maximum number of suggestions to return- Returns:
- list of suggestions, ordered by preference, never null
-
findSimilarSubtaxa
List<String> findSimilarSubtaxa(String genus, String species, String spAuthor, String subtaxa, String subtAuthor, int maxSize) Suggest a list of subtaxa- Parameters:
genus- valid genusspecies- valid speciesspAuthor- species authoritysubtaxa- subtaxa to checksubtAuthor- species authority at the lowest classification levelmaxSize- maximum number of suggestions to return- Returns:
- list of suggestions, ordered by preference, never null
-
findSimilar
@Nonnull List<TaxonomyChecker.Taxon> findSimilar(String genus, String species, String spAuthor, String subtaxa, String subtAuthor, int maxSize) Suggest a list of matches.- Parameters:
genus- valid genusspecies- valid speciesspAuthor- species authoritysubtaxa- subtaxa to checksubtAuthor- species authority at the lowest classification levelmaxSize- maximum number of suggestions to return- Returns:
- list of suggestions, ordered by preference, never null
-
getSubtaxaAuthority
Return the authority for the specified subtaxa- Parameters:
genus- the genusspecies- the speciessubtaxa- subtaxa to check- Returns:
- the authority or
null
-
getSubtaxaAuthority
List<String> getSubtaxaAuthority(String genus, String species, String spAuthor, String subtaxa, String subtAuthor) Return the authority for the specified subtaxa- Parameters:
genus- the genusspecies- the speciesspAuthor- species authoritysubtaxa- subtaxa to checksubtAuthor- species authority at the lowest classification level- Returns:
- the authority or
null
-
listSpecies
List<org.genesys.taxonomy.gringlobal.model.IGrinSpecies> listSpecies(String genus, String species, int maxSize) Return all subtaxa for genus and species- Parameters:
genus- valid genusspecies- valid speciesmaxSize- maximum number of rows to return- Returns:
- list of species matching genus and species name
-
findSpeciesRow
List<org.genesys.taxonomy.gringlobal.model.IGrinSpecies> findSpeciesRow(String genus, String species, String subtaxa) Find SpeciesRows matching the definition- Parameters:
genus- the genusspecies- the speciessubtaxa- the MCPD subtaxa- Returns:
- list of matching SpeciesRows
-
findSpeciesRows
List<org.genesys.taxonomy.gringlobal.model.IGrinSpecies> findSpeciesRows(String genus, String species, String spAuthor, String subtaxa, String subtAuthor) Find SpeciesRows matching the definition- Parameters:
genus- the genusspecies- the speciesspAuthor- species authoritysubtaxa- the MCPD subtaxasubtAuthor- species authority at the lowest classification level- Returns:
- list of matching SpeciesRows
-
getTaxon
TaxonomyChecker.Taxon getTaxon(String genus, String species, String spAuthor, String subtaxa, String subtAuthor) Get exact match.- Parameters:
genus- valid genusspecies- valid speciesspAuthor- species authoritysubtaxa- subtaxa to checksubtAuthor- species authority at the lowest classification level- Returns:
- One exactly matching record
-
findTaxa
@Nonnull List<TaxonomyChecker.Taxon> findTaxa(String genus, String species, String spAuthor, String subtaxa, String subtAuthor, int maxSize) - Parameters:
genus- the genusspecies- the speciesspAuthor- species authoritysubtaxa- the MCPD subtaxasubtAuthor- species authority at the lowest classification levelmaxSize- maximum rows to return- Returns:
- list of taxa
-
getSpeciesRow
org.genesys.taxonomy.gringlobal.model.IGrinSpecies getSpeciesRow(long speciesId) Get species by speciesId- Parameters:
speciesId- duh- Returns:
- SpeciesRow or null if not found
-
getGenus
Get genus by genusId- Parameters:
genusId- duh- Returns:
- genus name or null
-
similarityScore
Get string similarity score.- Parameters:
string1- the string 1string2- the string 2- Returns:
- the double
-