Class SpeciesMapManager

java.lang.Object
tethys.species.SpeciesMapManager
All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class SpeciesMapManager extends Object implements PamSettings
Master manager for species maps which will eventually allow for export and import from XML documents, databases and other things ...
(Perhaps not as XML, will simply output the serialized map - easier.
Author:
dg50
  • Field Details

  • Method Details

    • getInstance

      public static SpeciesMapManager getInstance()
      Get an instance of the global species manager. This handles look up tables for each datablock to convert from internal PAMGuard names to ITIS species codes and usefully call types for output to Tethys.
      Returns:
    • getUnitName

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • getSettingsReference

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSpeciesMap

      public DataBlockSpeciesMap getSpeciesMap(PamDataBlock pamDataBlock)
    • getSettingsVersion

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • restoreSettings

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • getExportAction

      public ActionListener getExportAction(Window parentFrame)
    • getImportAction

      public ActionListener getImportAction(Window parentFrame)
    • exportSpeciesMaps

      public boolean exportSpeciesMaps(Window parentFrame)
      Export all species maps to a serialized object file.
      Parameters:
      parentFrame -
      Returns:
    • importSpeciesMaps

      public boolean importSpeciesMaps(Window parentFrame)
      Import global species maps from selected file.
      Parameters:
      parentFrame -
      Returns: