Interface NameParser
public interface NameParser
Interface for parsing scientific names.
-
Method Summary
Modifier and TypeMethodDescriptionDelegate method to parse a scientific name of unknown rank.Fully parse the supplied name also trying to extract authorships, a conceptual sec reference, remarks or notes on the nomenclatural status.parseQuietly
(String scientificName) Delegate method to parse a scientific name of unknown rank quietly.parseQuietly
(String scientificName, Rank rank) Fully parses a name using #parse(String, Rank) but converts names that throw a UnparsableException into ParsedName objects with the scientific name, rank and name type given.parseToCanonical
(String scientificName) Delegate method to parse a scientific name of unknown rank and return its canonical form.parseToCanonical
(String scientificName, Rank rank) Parses the scientific name without authorship and returns the ParsedName.canonicalName() string
-
Method Details
-
parse
Fully parse the supplied name also trying to extract authorships, a conceptual sec reference, remarks or notes on the nomenclatural status. In some cases the authorship parsing proves impossible and this nameparser will return null. For strings which are no scientific names and scientific names that cannot be expressed by the ParsedName class the parser will throw an UnparsableException with a given NameType and the original, unparsed name. This is the case for all virus names and proper hybrid formulas, so make sure you catch and process this exception.- Parameters:
scientificName
- the full scientific name to parserank
- the rank of the name if it is known externally. Helps identifying infrageneric names vs bracket authors- Returns:
- the parsed name
- Throws:
UnparsableException
-
parse
Delegate method to parse a scientific name of unknown rank.- Returns:
- the parsed name
- Throws:
UnparsableException
-
parseQuietly
Fully parses a name using #parse(String, Rank) but converts names that throw a UnparsableException into ParsedName objects with the scientific name, rank and name type given.- Returns:
- the parsed name
-
parseQuietly
Delegate method to parse a scientific name of unknown rank quietly.- Returns:
- the parsed name
-
parseToCanonical
Parses the scientific name without authorship and returns the ParsedName.canonicalName() string- Parameters:
scientificName
- the full scientific name to parserank
- the rank of the name if it is known externally. Helps identifying infrageneric names vs bracket authors- Returns:
- the canonical name or null for unparsable names
-
parseToCanonical
Delegate method to parse a scientific name of unknown rank and return its canonical form.
-