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 Link icon

    • PamModel Link icon

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

    • getPamModel Link icon

      public static PamModel getPamModel()
    • setGpsDataBlock Link icon

      public void setGpsDataBlock(PamDataBlock gpsDataBlock)
    • createPamModel Link icon

      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 Link icon

      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 Link icon

      public void stopModel()
    • modelSettings Link icon

      public boolean modelSettings(JFrame frame)
    • setMultithreading Link icon

      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 Link icon

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

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

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

      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 Link icon

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

      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 Link icon

      public boolean isMultiThread()
    • getPamModelSettings Link icon

      public PamModelSettings getPamModelSettings()
    • loadPlugins Link icon

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

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

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

      public String getPluginBeingLoaded()
    • setPluginBeingLoaded Link icon

      public void setPluginBeingLoaded(String pluginBeingLoaded)
    • clearPluginBeingLoaded Link icon

      public void clearPluginBeingLoaded()
    • getClassLoader Link icon

      public PamModel.PluginClassloader getClassLoader()