Package clickDetector.offlineFuncs
Class OfflineEventDataBlock
java.lang.Object
PamguardMVC.PamObservable
PamguardMVC.PamDataBlock<Tunit>
PamguardMVC.superdet.SuperDetDataBlock<OfflineEventDataUnit,PamDataUnit>
clickDetector.offlineFuncs.OfflineEventDataBlock
PamDataBlock for offline events.
As with RainbowClick, this will (probably) hold all offline events from the database so that the operator can navigate through them with ease. However, only clicks associated with the currently loaded period will be loaded into memory and associated with the OfflineEventDataUnits.
- Author:
- Doug
-
Nested Class Summary
Nested classes/interfaces inherited from class PamguardMVC.superdet.SuperDetDataBlock
SuperDetDataBlock.ViewerLoadPolicy
-
Field Summary
Fields inherited from class PamguardMVC.PamDataBlock
ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, POSITION_AFTER, POSITION_BEFORE, REFERENCE_ABSOLUTE, REFERENCE_CURRENT, REQUEST_DATA_LOADED, REQUEST_DATA_PARTIAL_LOAD, REQUEST_EXCEPTION, REQUEST_INTERRUPTED, REQUEST_NO_DATA, REQUEST_SAME_REQUEST
-
Constructor Summary
ConstructorDescriptionOfflineEventDataBlock
(String dataName, ClickDetector parentProcess, int channelMap) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPamData
(OfflineEventDataUnit pamDataUnit) Adds a new PamDataUnit to the PamDataBlock.boolean
canSuperDetection
(PamDataBlock subDataBlock) Return whether this type of super detection can hold the passed sub detection data.void
clearAll()
This is generally only called from loadViwerData and since LoadviewerData only ever operates once, it should never get called !int
Get any information from the data block about cross referencing in database tables.Get the level of automation employed by the generation of these data.Get information about species types that may occur within this data block.double[]
Get the nominal range of durations of sounds that might be detected by this detector (if applicable).int
Quick event id for new data units.Find localisation algorithm for this data.boolean
getShouldLog
(PamDataUnit pamDataUnit) Should log the data unit to the database ?getTethysDataProvider
(TethysControl tethysControl) Gets a data provider for Tethys.void
updatePamData
(OfflineEventDataUnit pamDataUnit, long updateTimeMillis) update a dataunit.Methods inherited from class PamguardMVC.superdet.SuperDetDataBlock
clearOnViewerLoad, dummyClassResolve, findSubDetDataBlock, getLogging, getSubDetectionClass, getSubtableData, getViewerLoadPolicy, makeSubDetectionInfo, reattachSubdetections, setSubtableData, setViewerLoadPolicy
Methods inherited from class PamguardMVC.PamDataBlock
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addOldPamData, addPamData, autoEffortProvider, autoSetDataBlockMixMode, cancelDataOrder, cancelDataOrder, checkOfflineDataUIDs, clearChannelIterators, clearDeletedList, copyDataList, createProcessAnnotations, createProcessAnnotations, dispose, dumpBlockContents, dumpBufferStatus, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, findFirstUnitAfter, findLastUnitBefore, findUnitByUIDandUTC, findUnitsinInterval, getAnnotationHandler, getARealChannel, getBackgroundManager, getBespokeDataMapGraphic, getBinaryDataSource, getCanLog, getChannelIterator, getChannelIteratorCount, getChannelsForSequenceMap, getClosestUnitMillis, getClosestUnitMillis, getClosestUnitMillisUsingSeq, getCumulativeGain, getCurrentViewDataEnd, getCurrentViewDataStart, getDataBlockXML, getDataCopy, getDataCopy, getDataCopy, getDataCopy, getDataCopyFromEnd, getDataCopyFromStart, getDataGain, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelector, getDataSelector, getDataSelector, getDataUnit, getDataUnitMenuItems, getDataUnitPopupMenu, getEffortProvider, getFirstRawSourceDataBlock, getFirstUnit, getFirstUnit, getFirstUnitAfter, getFirstViewerUID, getFrequencyRange, getHydrophoneMap, getJSONDataSource, getLastUnit, getLastUnit, getLastUnitMillis, getLastViewerUID, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationContents, getLoggingName, getLongDataName, getMixedDirection, getMyDataUnits, getNanoTimeCalculator, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNextUnit, getNextUnit, getNumOfflineDataMaps, getNumRequiredBeforeLoadTime, getOfflineData, getOfflineDataMap, getOfflineDataMap, getPamSymbolManager, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnitFromSeq, getPreceedingUnitFromSeq, getPrevDataEnd, getPrimaryDataMap, getProcessAnnotations, getQuickId, getQuickId2, getRawSourceDataBlock, getRawSourceDataBlock2, getRecordingTrigger, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getReverseChannelIterator, getSampleRate, getSaveRequirements, getSequenceCount, getSequenceIterator, getSequenceMap, getSequenceMapObject, getShouldBinary, getShouldLog, getSourceDataBlock, getSourceProcess, getSuperDetectionClass, getSynchLock, getTOADCalculator, getUidHandler, getUIDRepairLogging, getUniqueParentList, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, hasDataRange, isCanClipGenerate, isClearAtStart, isLinkGpsData, isOffline, isRecycling, loadViewerData, loadViewerData, masterClockUpdate, needViewerDataLoad, noteNewSettings, notifyModelChanged, orderOfflineData, orderOfflineData, orderOfflineData, pamStart, pamStop, remove, remove, remove, removeOfflineDataMap, reset, saveViewerData, setAnnotationHandler, setBackgroundManager, setBinaryDataSource, setCanClipGenerate, setChannelMap, setClearAtStart, setDatagramProvider, setDataName, setDataSelectCreator, setJSONDataSource, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNanoTimeCalculator, setNaturalLifetime, setNaturalLifetimeMillis, setPamSymbolManager, setParentProcess, setRecordingTrigger, setRecycling, setRecyclingStoreLength, setSampleRate, setSequenceMap, setShouldBinary, setShouldLog, setSynchLock, setUidHandler, shouldNotify, sortData, sortOutputMaps, stopTimer, toString
Methods inherited from class PamguardMVC.PamObservable
addInstantObserver, canDraw, canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getMaxThreadJitter, getOverlayDraw, getPamObserver, getRequiredHistory, isInstantObserver, notifyInstantObservers, notifyNornalObservers, notifyObservers, notifyObservers, setChanged, setOverlayDraw, updateObservers, waitForThreadedObservers
-
Constructor Details
-
OfflineEventDataBlock
-
-
Method Details
-
getLastEventId
public int getLastEventId()Quick event id for new data units. Generally, this will get overwritten when there is a database with the database index, but will stick if there is no database.- Returns:
-
getChannelMap
public int getChannelMap()- Overrides:
getChannelMap
in classPamDataBlock<OfflineEventDataUnit>
- Returns:
- Software channel map for the data block.
-
addPamData
Description copied from class:PamDataBlock
Adds a new PamDataUnit to the PamDataBlock. When the data unit is added, PamObservers that have subscribed to the block will be notified.
If the data unit already has a UID, it will be left as is.- Overrides:
addPamData
in classPamDataBlock<OfflineEventDataUnit>
- Parameters:
pamDataUnit
- Reference to a PamDataUnit
-
getShouldLog
Description copied from class:PamDataBlock
Should log the data unit to the database ?- Overrides:
getShouldLog
in classPamDataBlock<OfflineEventDataUnit>
- Parameters:
pamDataUnit
- dataunit to consider- Returns:
- true if data should be logged.
-
clearAll
public void clearAll()This is generally only called from loadViwerData and since LoadviewerData only ever operates once, it should never get called !- Overrides:
clearAll
in classPamDataBlock<OfflineEventDataUnit>
-
updatePamData
Description copied from class:PamDataBlock
update a dataunit. Does little except flag that the data unit is updated (so it will get saved), and sends notifications to other modules.- Overrides:
updatePamData
in classPamDataBlock<OfflineEventDataUnit>
-
getDataSelectCreator
- Overrides:
getDataSelectCreator
in classPamDataBlock<OfflineEventDataUnit>
- Returns:
- an object that can create data selectors to sub select data from within this type of data block.
-
getCrossReferenceInformation
Description copied from class:PamDataBlock
Get any information from the data block about cross referencing in database tables.This gets used when importing databases, whereby Id's will change, so may need to be rewritten in related tables. Does not (currently) handle issues with UID's.
- Overrides:
getCrossReferenceInformation
in classPamDataBlock<OfflineEventDataUnit>
- Returns:
- null or cross reference information.
-
getDurationRange
public double[] getDurationRange()Description copied from class:PamDataBlock
Get the nominal range of durations of sounds that might be detected by this detector (if applicable). This is pretty crude, but will give an indication of which detectors might work with which types of sound.
can return null, 0 and Double.Infinity are also acceptable values.- Overrides:
getDurationRange
in classPamDataBlock<OfflineEventDataUnit>
- Returns:
- duration range in seconds of sounds this detector can sensibly detect
-
canSuperDetection
Description copied from class:SuperDetDataBlock
Return whether this type of super detection can hold the passed sub detection data. Default is based on class compatibility, but some super det datablocks should override this if they only manage one stream of data.- Overrides:
canSuperDetection
in classSuperDetDataBlock<OfflineEventDataUnit,
PamDataUnit> - Parameters:
subDataBlock
- Sub detection data block- Returns:
- true if this data can hold those sub data.
-
getDatablockSpeciesManager
Description copied from class:PamDataBlock
Get information about species types that may occur within this data block. Primarily for conversion into Tethys compatible data, but may prove to have other uses.- Overrides:
getDatablockSpeciesManager
in classPamDataBlock<OfflineEventDataUnit>
- Returns:
- Types of species information available within this datablock.
-
getTethysDataProvider
Description copied from class:PamDataBlock
Gets a data provider for Tethys. These will probably need to be bespoke, but for now will autogenerate based on the SQLLogging information.- Overrides:
getTethysDataProvider
in classPamDataBlock<OfflineEventDataUnit>
- Returns:
- the tethysDataProvider
-
getDataAutomationInfo
Description copied from class:PamDataBlock
Get the level of automation employed by the generation of these data. Should ideally be completed for everything providing data to Tethys.- Overrides:
getDataAutomationInfo
in classPamDataBlock<OfflineEventDataUnit>
- Returns:
- level of automation for this data block.
-
getLocalisationAlgorithm
Description copied from class:PamDataBlock
Find localisation algorithm for this data. This may be within the owning module, or a downstream algorithm.- Overrides:
getLocalisationAlgorithm
in classPamDataBlock<OfflineEventDataUnit>
- Returns:
- first found localisation algorithm or null;
-