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?.booleancontainsSubtaxa(String genus, String species, String subtaxa) Does the database contain at least one record that exactly matches specified genus, species and subtaxa?.findSimilarGenus(String genus, int maxSize) Return a list of genera close to the specified genus.findSimilarSpecies(String genus, String species, 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 subtaxaList<org.genesys.taxonomy.gringlobal.model.IGrinSpecies>findSpeciesRow(String genus, String species, String subtaxa) Find SpeciesRows matching the definitiongetGenus(long genusId) Get genus by genusIdgetSpeciesAuthority(String genus, String species) 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 subtaxaList<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- TODO- 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
-
findSimilarSpecies
Return a list of species close to the specified genus and species.- Parameters:
genus- valid genusspecies- speciesmaxSize- 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
-
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
-
findSimilarSubtaxa
Suggest a list of subtaxa- Parameters:
genus- valid genusspecies- valid speciessubtaxa- current subtaxamaxSize- 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- 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
-
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
-