Package tethys.detection
Class DetectionsHandler
java.lang.Object
tethys.CollectionHandler
tethys.detection.DetectionsHandler
Functions for handling output of Detections documents.
Works closely with a TethysDataProvider and DataBlockSpeciesManager
to generate Detections elements for an xml doc to export to Tethys.
- Author:
- dg50
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
send a cancel command to export thread if it's runningvoid
exportDataBlock
(PamDataBlock dataBlock) Export data from given block, using appropriate species checks and other dialogs.getStreamDetections
(PamDataBlock dataBlock) Get a list of Detections documents associated with a particular data stream for this data set (not the entire project).getStreamDetections
(PamDataBlock dataBlock, ArrayList<PDeployment> deployments) Get a list of Detections documents associated with a particular data block for the list of deployments documents.static long
roundDownBinStart
(long binStart, long binInterval) Round a bin start so that it's aligned correctly with day starts.void
startExportThread
(PamDataBlock pamDataBlock, StreamExportParams streamExportParams, DetectionExportObserver exportObserver) Detections will be exported in a separate worker thread since export may take some time and the user should be given ample opportunity to cancel it.Methods inherited from class tethys.CollectionHandler
collectionName, getCollection, getDetectorEffort, getMethodString, getSoftwareString, getSupportSoftware, getSupportSoftwareVersion, getTethysControl, getVersionString
-
Field Details
-
uniqueDetectionsId
public int uniqueDetectionsId -
helpPoint
- See Also:
-
-
Constructor Details
-
DetectionsHandler
- Parameters:
tethysControl
-
-
-
Method Details
-
getStreamDetections
public StreamDetectionsSummary<NilusDataWrapper<PDetections>> getStreamDetections(PamDataBlock dataBlock) Get a list of Detections documents associated with a particular data stream for this data set (not the entire project).- Parameters:
dataBlock
-
-
getStreamDetections
public StreamDetectionsSummary<NilusDataWrapper<PDetections>> getStreamDetections(PamDataBlock dataBlock, ArrayList<PDeployment> deployments) Get a list of Detections documents associated with a particular data block for the list of deployments documents. Group them by abstract or something- Parameters:
dataBlock
-deployments
-- Returns:
-
startExportThread
public void startExportThread(PamDataBlock pamDataBlock, StreamExportParams streamExportParams, DetectionExportObserver exportObserver) Detections will be exported in a separate worker thread since export may take some time and the user should be given ample opportunity to cancel it.- Parameters:
pamDataBlock
-streamExportParams
-exportWorkerCard
-
-
cancelExport
public void cancelExport()send a cancel command to export thread if it's running -
roundDownBinStart
public static long roundDownBinStart(long binStart, long binInterval) Round a bin start so that it's aligned correctly with day starts.- Parameters:
binStart
- in millisecondsbinInterval
- in milliseconds- Returns:
- rounded time.
-
exportDataBlock
Export data from given block, using appropriate species checks and other dialogs.- Parameters:
dataBlock
-
-
getHelpPoint
- Specified by:
getHelpPoint
in classCollectionHandler
-