Package tethys
Class TethysControl
java.lang.Object
PamController.PamControlledUnit
tethys.TethysControl
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider,TethysStateObserver
Quick play with a simple system for outputting data to Tethys. At it's start
 this is simply going to offer a dialog and have a few functions which show how
 to access data within PAMGuard.
- Author:
 - dg50
 
- 
Field Summary
FieldsFields inherited from class PamController.PamControlledUnit
isMixed, isViewer - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddStateObserver(TethysStateObserver stateObserver) Add a new state observer.Check the server.createDetectionMenu(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessescreateFileMenu(JFrame parentFrame) createTethysMenu(Frame parentFrame) Make a menu.voiddeletedDetections(PamDataBlock dataBlock) voiddisplayDocument(String collection, String documentId) Load a document from the database and display it in a popup windowvoiddisplayDocument(DocumentInfo docInfo) voidexportDocument(String collection, String documentId) Load a document from the database and write to a file selected by the uservoidexportedDetections(PamDataBlock dataBlock) Called when a detections document has been exported.findDatablockSynchInfo(PamDataBlock dataBlock) A name for any deta selectors.Get DBXML Connector.One stop place to get Deployment information.Get a list of datablocks that can be exported to Tethys.nilus.DeploymentGet global deployment data.longGet the synchronisation info for all datablocks.Gets a reference to a panel to be added to a viewgetTabSpecificMenuBar(Frame parentFrame, JMenuBar standardMenu, PamGui pamGui) Create a tab specific menu to go with this PamControlledUnit.booleanQuick way for any controls to see that the server is probably OK without actually pinging it.voidnotifyModelChanged(int changeType) General notification when the PAMGAURD model changes.voidopenCollectionInBrowser(String collectionName) voidopenCollectionInPAMGuard(Collection collection) protected voidvoidopen client in the default web browservoidopenTethysCollection(Collection collection) open client in the default web browserbooleanremoveStateObserver(TethysStateObserver stateObserver) Remove a state observer.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidsendStateUpdate(TethysState tethysState) Send state updates around to all state observers.voidshowException(TethysException tethysException) voidvoidupdateState(TethysState tethysState) Receive state updates when Tethys has done something (made a connection, moved some data, etc.)
Note that this is for RECEIVING state updates, not for sending them.Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDisplayMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getToolbarComponent, getUnitName, getUnitTaskManager, getUnitTaskManager, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setUnitTaskManager, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface PamController.PamSettings
getUnitTypeMethods inherited from interface PamController.SettingsNameProvider
getUnitName 
- 
Field Details
- 
unitType
- See Also:
 
 - 
defaultName
 - 
xmlNameSpace
 
 - 
 - 
Constructor Details
- 
TethysControl
 
 - 
 - 
Method Details
- 
getDbxmlConnect
Get DBXML Connector. This class contains all the functions that are needed to talk to the database.- Returns:
 - DBXML functions.
 
 - 
createDetectionMenu
Description copied from class:PamControlledUnitCreate a JMenu object containing MenuItems associated with PamProcesses- Overrides:
 createDetectionMenuin classPamControlledUnit- Parameters:
 parentFrame- The owner frame of the menu- Returns:
 - reference to a JMenu which can be added to an existing menu or
         menu bar
         
Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.
 
 - 
createFileMenu
- Overrides:
 createFileMenuin classPamControlledUnit- Parameters:
 parentFrame- parent frame for the menu- Returns:
 - the file menu item
 
 - 
createTethysMenu
Make a menu. Can go either in File or Settings. TBD.- Parameters:
 parentFrame-- Returns:
 
 - 
getTabSpecificMenuBar
Description copied from class:PamControlledUnitCreate a tab specific menu to go with this PamControlledUnit.Default is to throw back the standard menu to be used. This function should clone the standard menu and then modify the clone (usually by replacing the Display sub menu)
- Overrides:
 getTabSpecificMenuBarin classPamControlledUnit- Parameters:
 standardMenu- the standard menu for the Pam GUI.- Returns:
 - a complete menu bar to be shown while a particular tab is selected
 
 - 
openTempDocuments
protected void openTempDocuments() - 
showProjectDeploymentsDialog
public void showProjectDeploymentsDialog() - 
getExportableDataBlocks
Get a list of datablocks that can be exported to Tethys.- Returns:
 
 - 
getSynchronisationInfos
Get the synchronisation info for all datablocks. This list should be static, but check it in case something has been added or removed.- Returns:
 
 - 
findDatablockSynchInfo
 - 
openTethysClient
public void openTethysClient()open client in the default web browser - 
openTethysCollection
open client in the default web browser - 
openCollectionInPAMGuard
 - 
openCollectionInBrowser
 - 
getTabPanel
Description copied from class:PamControlledUnitGets a reference to a panel to be added to a view- Overrides:
 getTabPanelin classPamControlledUnit- Returns:
 - reference to a PamTabPanel object
 - See Also:
 
 - 
getTethysExportParams
- Returns:
 - the tethysExportParams
 
 - 
getGlobalDeplopymentData
public nilus.Deployment getGlobalDeplopymentData()Get global deployment data. This is a bit of a mess, trying to use a separate module so that the rest of PAMGuard can use it, but creating the- Returns:
 
 - 
addStateObserver
Add a new state observer.- Parameters:
 stateObserver-
 - 
removeStateObserver
Remove a state observer.- Parameters:
 stateObserver-- Returns:
 - true if it existed.
 
 - 
sendStateUpdate
Send state updates around to all state observers.- Parameters:
 tethysState-
 - 
getDataSelectName
A name for any deta selectors.- Returns:
 
 - 
getDbxmlQueries
 - 
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnitGeneral notification when the PAMGAURD model changes.- Overrides:
 notifyModelChangedin classPamControlledUnit- Parameters:
 changeType- type of change
 - 
checkServer
Check the server. This will send around a notification if the state has changed since the last call to this function, so it's unlikely you'll need to use the return value- Returns:
 - server status.
 
 - 
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
 
 - 
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
 
 - 
updateState
Description copied from interface:TethysStateObserverReceive state updates when Tethys has done something (made a connection, moved some data, etc.)
Note that this is for RECEIVING state updates, not for sending them. To avoid infinite notifications loops, use tethysControl.sendStateUpdate(TethysState) to send out state notifications.- Specified by:
 updateStatein interfaceTethysStateObserver- Parameters:
 tethysState-
 - 
getDeploymentHandler
One stop place to get Deployment information. Will provide both information on record periods in PAMGuard and also Deployment docs in Tethys.- Returns:
 - set of functions for handling deployments.
 
 - 
getDetectionsHandler
 - 
getLocalizationHandler
- Returns:
 - the localizationHandler
 
 - 
showException
 - 
displayDocument
 - 
displayDocument
Load a document from the database and display it in a popup window- Parameters:
 collection-documentId-
 - 
exportDocument
Load a document from the database and write to a file selected by the user- Parameters:
 collection-documentId-
 - 
getItisFunctions
- Returns:
 - the itisFunctions
 
 - 
exportedDetections
Called when a detections document has been exported.- Parameters:
 dataBlock-
 - 
deletedDetections
 - 
getCalibrationHandler
- Returns:
 - the calibrationHandler
 
 - 
getLastServerStatus
- Returns:
 - the lastServerStatus
 
 - 
isServerOk
public boolean isServerOk()Quick way for any controls to see that the server is probably OK without actually pinging it.- Returns:
 - true if last ping of server was OK
 
 - 
getDocumentMap
- Returns:
 - the documentMap
 
 
 -