org.gbif.occurrencestore.utils
Class ClassificationUtils

java.lang.Object
  extended by org.gbif.occurrencestore.utils.ClassificationUtils

public final class ClassificationUtils
extends Object

Utilities to work on classifications.

Author:
timrobertson

Field Summary
static Set<String> NULL_STRINGS
           
 
Method Summary
static String canonicalName(ParsedName parsedName)
           
static String canonicalName(String scientificName)
          parses a scientific name and creates the canonical name of it inlcuding the hybrid marker (which is not part of the ParsedName.canonical() output!)
static String clean(String taxon)
          Cleans up a taxon as far as possible by removing erroneous chars etc.
static String cleanAuthor(String author)
          Clean some noise from the author.
protected static boolean equalTaxa(String t1, String... t2)
           
static String parseName(String scientificName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_STRINGS

public static final Set<String> NULL_STRINGS
Method Detail

canonicalName

public static String canonicalName(String scientificName)
parses a scientific name and creates the canonical name of it inlcuding the hybrid marker (which is not part of the ParsedName.canonical() output!)

Parameters:
scientificName -
Returns:

canonicalName

public static String canonicalName(ParsedName parsedName)

clean

public static String clean(String taxon)
Cleans up a taxon as far as possible by removing erroneous chars etc. This does not do any parsing.

Parameters:
taxon - to check

cleanAuthor

public static String cleanAuthor(String author)
Clean some noise from the author. A large proportion are "\N" for example.

Parameters:
author - to clean
Returns:
cleaned author

equalTaxa

protected static boolean equalTaxa(String t1,
                                   String... t2)
Returns:
true if t1 and t2 are considered the same. False if they are both null

parseName

public static String parseName(String scientificName)


Copyright © 2011 Global Biodiversity Information Facility. All Rights Reserved.