Package PamModel

Class PamModel

java.lang.Object
PamModel.PamModel
All Implemented Interfaces:
PamSettings, SettingsNameProvider

public final class PamModel extends Object implements PamSettings
Author:
Doug Gillespie Simple creation of a PAM model, but using the correct interface for the PamController.
  • Constructor Details

    • PamModel

      public PamModel(PamController pamController)
      Parameters:
      pamController - Needs to be parsed a valid reference to a PamController
  • Method Details

    • getPamModel

      public static PamModel getPamModel()
    • setGpsDataBlock

      public void setGpsDataBlock(PamDataBlock gpsDataBlock)
    • createPamModel

      public void createPamModel()
      Creates a list of available Pamguard modules and sets dependencies between them

      Should ony ever be called once immediately after the model has been created !!!!!!.

      Also sets grouping which are used for menu construction and the minimum and maximum numbers of each type of module that may get created.

    • startModel

      public boolean startModel()
      Add any remaining REQUIRED modules.
      this get's called after the PamController has loaded it's main settings. So at this point, go through all the PamModuleInfo's and check that all have at least the minimum number required
      Returns:
      true
    • stopModel

      public void stopModel()
    • modelSettings

      public boolean modelSettings(JFrame frame)
    • setMultithreading

      public void setMultithreading(boolean multithreading)
      Set multithreading for all of PAMGUARD.

      Be warned that this function should very rarely ever be called and has been included only so that the Likelihood detector can turn off multithreading. Once multithreading has been debugged in the Likelihood detector, this function will be removed or deprecated.

      Parameters:
      multithreading -
    • getDependencyManager

      public DependencyManager getDependencyManager()
      Returns:
      Returns the dependencyManager.
    • getSettingsReference

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

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • 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
    • 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
    • isMultiThread

      public boolean isMultiThread()
    • getPamModelSettings

      public PamModelSettings getPamModelSettings()
    • loadPlugins

      public void loadPlugins(PamModuleInfo mi)
      Method to load jar files containing plugins, found in the plugins folder
    • getPluginList

      public List<PamPluginInterface> getPluginList()
      Return a list of the plugins found in the plugin folder
      Returns:
    • getDaqList

      public List<DaqSystemInterface> getDaqList()
      Return a list of DAQ Systems found in the plugins folder
      Returns:
    • getPluginBeingLoaded

      public String getPluginBeingLoaded()
    • setPluginBeingLoaded

      public void setPluginBeingLoaded(String pluginBeingLoaded)
    • clearPluginBeingLoaded

      public void clearPluginBeingLoaded()
    • getClassLoader

      public PamModel.PluginClassloader getClassLoader()