Package PamModel
Class PamModel
java.lang.Object
PamModel.PamModel
- All Implemented Interfaces:
PamSettings,SettingsNameProvider
- Author:
- Doug Gillespie Simple creation of a PAM model, but using the correct interface for the PamController.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of subfolder containing Pamguard plugin modules -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidCreates a list of available Pamguard modules and sets dependencies between themstatic PamModelReturn a list of the plugins found in the plugin foldergetPluginType(Class pluginType) Get plugins of a given types.longbooleanvoidMethod to list jar files containing plugins and extract plugin interfaces of all plugin typesbooleanmodelSettings(JFrame frame) booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidsetGpsDataBlock(PamDataBlock gpsDataBlock) voidsetMultithreading(boolean multithreading) Set multithreading for all of PAMGUARD.voidsetPluginBeingLoaded(String pluginBeingLoaded) booleanAdd any remaining REQUIRED modules.
this get's called after the PamController has loaded it's main settings.void
-
Field Details
-
pluginsFolder
Name of subfolder containing Pamguard plugin modules- See Also:
-
-
Constructor Details
-
PamModel
- Parameters:
pamController- Needs to be parsed a valid reference to a PamController
-
-
Method Details
-
getPamModel
-
setGpsDataBlock
-
createPamModel
public void createPamModel()Creates a list of available Pamguard modules and sets dependencies between themShould 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
-
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
- Returns:
- Returns the dependencyManager.
-
getSettingsReference
- Specified by:
getSettingsReferencein interfacePamSettings- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersionin interfacePamSettings- Returns:
- An integer version number for the settings
-
getUnitName
- Specified by:
getUnitNamein interfaceSettingsNameProvider- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitTypein interfacePamSettings- Returns:
- A Name specific to the type, e.g. Click detector
-
restoreSettings
- Specified by:
restoreSettingsin interfacePamSettings- Parameters:
pamControlledUnitSettings-- 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
-
listPlugins
Method to list jar files containing plugins and extract plugin interfaces of all plugin types -
getPluginType
Get plugins of a given types.- Parameters:
pluginType-- Returns:
-
getPluginList
Return a list of the plugins found in the plugin folder- Returns:
-
getPluginBeingLoaded
-
setPluginBeingLoaded
-
clearPluginBeingLoaded
public void clearPluginBeingLoaded() -
getClassLoader
-