Package org.genesys.taxonomy.checker
Interface TaxonomyDatabase
-
- All Known Implementing Classes:
CachingInMemoryTaxonomyDatabase,InMemoryTaxonomyDatabase
public interface TaxonomyDatabaseDefines searches possible against a database of taxonomic data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsGenus(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?.List<String>findSimilarGenus(String genus, int maxSize)Return a list of genera close to the specified genus.List<String>findSimilarSpecies(String genus, String species, int maxSize)Return a list of species close to the specified genus and species.List<String>findSimilarSubtaxa(String genus, String species, String subtaxa, int maxSize)Suggest a list of subtaxaList<IGrinSpecies>findSpeciesRow(String genus, String species, String subtaxa)Find SpeciesRows matching the definitionStringgetGenus(long genusId)Get genus by genusIdStringgetSpeciesAuthority(String genus, String species)Return the species authority for the specified species within genus.IGrinSpeciesgetSpeciesRow(long speciesId)Get species by speciesIdStringgetSubtaxaAuthority(String genus, String species, String subtaxa)Return the authority for the specified subtaxaList<IGrinSpecies>listSpecies(String genus, String species, int maxSize)Return all subtaxa for genus and speciesdoublesimilarityScore(String string1, String string2)Get string similarity score.
-
-
-
Method Detail
-
containsGenus
boolean containsGenus(String genus)
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
List<String> findSimilarGenus(String genus, int maxSize)
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
boolean containsSpecies(String genus, String species)
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
List<String> findSimilarSpecies(String genus, String species, int maxSize)
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
String getSpeciesAuthority(String genus, String species)
Return the species authority for the specified species within genus.- Parameters:
genus- the genusspecies- the species- Returns:
- the authority or
null
-
containsSubtaxa
boolean containsSubtaxa(String genus, String species, String subtaxa)
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
List<String> findSimilarSubtaxa(String genus, String species, String subtaxa, int maxSize)
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
String getSubtaxaAuthority(String genus, String species, String subtaxa)
Return the authority for the specified subtaxa- Parameters:
genus- the genusspecies- the speciessubtaxa- subtaxa- Returns:
- the authority or
null
-
listSpecies
List<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<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
IGrinSpecies getSpeciesRow(long speciesId)
Get species by speciesId- Parameters:
speciesId- duh- Returns:
- SpeciesRow or null if not found
-
getGenus
String getGenus(long genusId)
Get genus by genusId- Parameters:
genusId- duh- Returns:
- genus name or null
-
-