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.
Author:
dg50
  • Field Details Link icon

  • Constructor Details Link icon

    • DeploymentHandler Link icon

      public DeploymentHandler(TethysControl tethysControl)
  • Method Details Link icon

    • getTrackInformation Link icon

      public TrackInformation getTrackInformation()
      Gather up all track information both from the GPS module (if it exists) and the type of hydrophone array (or many!)
      Returns:
    • updateState Link icon

      public void updateState(TethysState tethysState)
      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 interface TethysStateObserver
    • updateProjectDeployments Link icon

      public boolean updateProjectDeployments()
      Update the list of Tethys deployments
      Returns:
      true if OK
    • getProjectDeployments Link icon

      public ArrayList<PDeployment> 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 Link icon

      public void showOptions(Window parent)
    • createPamguardOverview Link icon

      public void createPamguardOverview()
    • exportDeployments Link icon

      public void exportDeployments()
      Export button pressed on GUI. Run wizard....
    • exportDeployments Link icon

      public void exportDeployments(RecordingList allPeriods)
      Export deployments docs. Playing with a couple of different ways of doing this.
      Parameters:
      allPeriods -
    • getDeploymentOverview Link icon

      public DeploymentOverview getDeploymentOverview()
    • getDeploymentOverlap Link icon

      public long getDeploymentOverlap(PDeployment aDeployment, RecordingPeriod aPeriod)
      Get the overlap in mills between a nilus Deployment and a PAMGuard recording period
      Parameters:
      aDeployment - nilus Deployment from Tethys
      aPeriod - PAMGuard recording period
      Returns:
      overlap in milliseconds
    • getMatchedDeployments Link icon

      public ArrayList<PDeployment> 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 Link icon

      public ArrayList<PInstrument> getProjectInstruments()
      Get a list of instruments from the current project deployments. This may be a shorter list than the list of deployments.
      Returns:
    • getFirstFreeDeploymentId Link icon

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

      public nilus.Deployment createDeploymentDocument(int i, RecordingPeriod recordingPeriod, String deploymentId)
    • getBinaryDataURI Link icon

      public String getBinaryDataURI()
    • getDatabaseURI Link icon

      public String getDatabaseURI()
    • getRawDataURI Link icon

      public String getRawDataURI()
    • canExportDeployments Link icon

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

      public PInstrument getCurrentArrayInstrument()
      Get the Instrument info for the current array.
      Returns:
    • selectionChanged Link icon

      public void selectionChanged()
      Specified by:
      selectionChanged in interface DeploymentTableObserver
    • getDeploymentExportOptions Link icon

      public DeploymentExportOpts getDeploymentExportOptions()
      Returns:
      the deploymentExportOptions
    • getHelpPoint Link icon

      public String getHelpPoint()
      Specified by:
      getHelpPoint in class CollectionHandler