org.tridas.io.util
Class ITRDBTaxonConverter

java.lang.Object
  extended by org.tridas.io.util.ITRDBTaxonConverter

public class ITRDBTaxonConverter
extends Object

Class for converting between ITRDB 4 char taxon code and proper latin name.

Author:
sbr00pwb

Method Summary
static String getCodeFromName(String argName)
          Get the four letter code for this latin name.
static org.tridas.schema.ControlledVoc getControlledVocFromCode(String incode)
          Get a controlled vocabulary version of this taxon from the 4 letter code.
static org.tridas.schema.ControlledVoc getControlledVocFromName(String name)
          Get a controlled vocabulary version of this taxon from the full latin name.
static org.tridas.schema.ControlledVoc getControlledVocFromString(String str)
          Creates a taxon ControlledVoc from the given string.
static String getNameFromCode(String argCode)
          Get the full latin name of a taxon from the ITRDB 4 letter code.
static String getNormalisedCode(String argCode)
          Check that the specified code is in the dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNormalisedCode

public static String getNormalisedCode(String argCode)
Check that the specified code is in the dictionary. If not then return the default standardised code.

Parameters:
argCode -
Returns:

getNameFromCode

public static String getNameFromCode(String argCode)
Get the full latin name of a taxon from the ITRDB 4 letter code. If code is not found, then return code unchanged.

Parameters:
argCode -
Returns:

getControlledVocFromString

public static org.tridas.schema.ControlledVoc getControlledVocFromString(String str)
Creates a taxon ControlledVoc from the given string. The string should be either an ITRDB code or a species name.

Parameters:
str -
Returns:

getCodeFromName

public static String getCodeFromName(String argName)
Get the four letter code for this latin name. Note that this is a simple text string match so the latin name must be precisely the same (including authority) to get a hit.

Parameters:
argName -
Returns:

getControlledVocFromCode

public static org.tridas.schema.ControlledVoc getControlledVocFromCode(String incode)
Get a controlled vocabulary version of this taxon from the 4 letter code. If no match is found a simple tag is returned with no vocab info.

Parameters:
code -
Returns:

getControlledVocFromName

public static org.tridas.schema.ControlledVoc getControlledVocFromName(String name)
Get a controlled vocabulary version of this taxon from the full latin name. If no match is found a simple tag is returned with no vocab info.

Parameters:
name -
Returns:


Copyright © 2011. All Rights Reserved.