Package tethys.deployment
Class DeploymentHandler
java.lang.Object
tethys.CollectionHandler
tethys.deployment.DeploymentHandler
- All Implemented Interfaces:
DeploymentTableObserver
,TethysStateObserver
public class DeploymentHandler
extends CollectionHandler
implements TethysStateObserver, DeploymentTableObserver
Functions to gather data for the deployment document from all around PAMGuard.
There should be just one of these, available from TethysControl and it will try
to sensible handle when and how it updates it's list of PAMGuard and Tethys information
Any part of PAMGuard wanting information on Deployments should come here.
Any part of PAMGuard wanting information on Deployments should come here.
- Author:
- dg50
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionTest to see if it's possible to export Deployment documents.nilus.Deployment
createDeploymentDocument
(int i, RecordingPeriod recordingPeriod, String deploymentId) void
void
Export button pressed on GUI.void
exportDeployments
(RecordingList allPeriods) Export deployments docs.Get the Instrument info for the current array.long
getDeploymentOverlap
(PDeployment aDeployment, RecordingPeriod aPeriod) Get the overlap in mills between a nilus Deployment and a PAMGuard recording periodint
Get the first free deploymendId.Get a list of Tethys Deployment docs that match the current PAMGuard data.Get a list of Tethys deployment docs.Get a list of instruments from the current project deployments.Gather up all track information both from the GPS module (if it exists) and the type of hydrophone array (or many!)void
void
showOptions
(Window parent) boolean
Update the list of Tethys deploymentsvoid
updateState
(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 tethys.CollectionHandler
collectionName, getCollection, getDetectorEffort, getMethodString, getSoftwareString, getSupportSoftware, getSupportSoftwareVersion, getTethysControl, getVersionString
-
Field Details
-
helpPoint
- See Also:
-
-
Constructor Details
-
DeploymentHandler
-
-
Method Details
-
getTrackInformation
Gather up all track information both from the GPS module (if it exists) and the type of hydrophone array (or many!)- Returns:
-
updateState
Description copied from interface:TethysStateObserver
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. To avoid infinite notifications loops, use tethysControl.sendStateUpdate(TethysState) to send out state notifications.- Specified by:
updateState
in interfaceTethysStateObserver
-
updateProjectDeployments
public boolean updateProjectDeployments()Update the list of Tethys deployments- Returns:
- true if OK
-
getProjectDeployments
Get a list of Tethys deployment docs. Note that this doesn't update the list, but uses the one currently in memory so call updateTethysDeployments() first if necessary.- Returns:
- list of (wrapped) nilus Deployment objects.
-
showOptions
-
createPamguardOverview
public void createPamguardOverview() -
exportDeployments
public void exportDeployments()Export button pressed on GUI. Run wizard.... -
exportDeployments
Export deployments docs. Playing with a couple of different ways of doing this.- Parameters:
allPeriods
-
-
getDeploymentOverview
-
getDeploymentOverlap
Get the overlap in mills between a nilus Deployment and a PAMGuard recording period- Parameters:
aDeployment
- nilus Deployment from TethysaPeriod
- PAMGuard recording period- Returns:
- overlap in milliseconds
-
getMatchedDeployments
Get a list of Tethys Deployment docs that match the current PAMGuard data. Watch for repeats if a single deployment doc covers many perdiods.- Returns:
-
getProjectInstruments
Get a list of instruments from the current project deployments. This may be a shorter list than the list of deployments.- Returns:
-
getFirstFreeDeploymentId
public int getFirstFreeDeploymentId()Get the first free deploymendId. This will get appended to the ProjectName to make and id for each Deployment document- Returns:
-
createDeploymentDocument
public nilus.Deployment createDeploymentDocument(int i, RecordingPeriod recordingPeriod, String deploymentId) -
getBinaryDataURI
-
getDatabaseURI
-
getRawDataURI
-
canExportDeployments
Test to see if it's possible to export Deployment documents. This is basically a test of various metadata fields that are required, such as instrument id's.- Returns:
- null if OK, or a string describing the first encountered error
-
getCurrentArrayInstrument
Get the Instrument info for the current array.- Returns:
-
selectionChanged
public void selectionChanged()- Specified by:
selectionChanged
in interfaceDeploymentTableObserver
-
getDeploymentExportOptions
- Returns:
- the deploymentExportOptions
-
getHelpPoint
- Specified by:
getHelpPoint
in classCollectionHandler
-