Interface TaxonomyDatabase

    • 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:
        true if 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 - genus
        maxSize - 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 genus
        species - the species
        Returns:
        true if 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 genus
        species - species
        maxSize - 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 genus
        species - 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 genus
        species - valid species
        subtaxa - subtaxa to check
        Returns:
        true if 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 genus
        species - valid species
        subtaxa - current subtaxa
        maxSize - 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 genus
        species - the species
        subtaxa - 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 genus
        species - valid species
        maxSize - 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 genus
        species - the species
        subtaxa - 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
      • similarityScore

        double similarityScore​(String string1,
                               String string2)
        Get string similarity score.
        Parameters:
        string1 - the string 1
        string2 - the string 2
        Returns:
        the double