Package PamguardMVC.superdet
Class SuperDetDataBlock<Tunit extends SuperDetection,TSubDet extends PamDataUnit>
java.lang.Object
PamguardMVC.PamObservable
PamguardMVC.PamDataBlock<Tunit>
PamguardMVC.superdet.SuperDetDataBlock<Tunit,TSubDet>
- Direct Known Subclasses:
ClickTrainDataBlock
,CPODClickTrainDataBlock
,DetectionGroupDataBlock
,Group3DDataBlock
,MarkGroupDataBlock
,OfflineEventDataBlock
,QADataBlock
,QASequenceDataBlock
,QATestDataBlock
public class SuperDetDataBlock<Tunit extends SuperDetection,TSubDet extends PamDataUnit>
extends PamDataBlock<Tunit>
-
Nested Class Summary
-
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
ConstructorDescriptionSuperDetDataBlock
(Class unitClass, String dataName, PamProcess parentProcess, int channelMap, boolean isOffline, SuperDetDataBlock.ViewerLoadPolicy viewerLoadPolicy) SuperDetDataBlock
(Class unitClass, String dataName, PamProcess parentProcess, int channelMap, SuperDetDataBlock.ViewerLoadPolicy viewerLoadPolicy) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canSuperDetection
(PamDataBlock subDataBlock) Return whether this type of super detection can hold the passed sub detection data.boolean
Clear all data units on viewer load.This is a dummy method which is not used for anything apart from a call to resolve the return type.findSubDetDataBlock
(String dataLongName) find the datablock for the subdetection.Returns the list of subtable data that gets generated when the PamDataBlock is loaded from the database.makeSubDetectionInfo
(TSubDet subDetection, Tunit superDetection) boolean
reattachSubdetections
(ViewLoadObserver viewLoadObserver) New version of this call that only has to link data units into their sub detections since the SubdetectionInfo lists are already in place in the SuperDetections.void
setSubtableData
(ArrayList<PamSubtableData> subTableDataList, ViewLoadObserver loadObserver) Called from the database when subtable data are loaded.void
setViewerLoadPolicy
(SuperDetDataBlock.ViewerLoadPolicy viewerLoadPolicy) Methods inherited from class PamguardMVC.PamDataBlock
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addOldPamData, addPamData, addPamData, autoEffortProvider, autoSetDataBlockMixMode, cancelDataOrder, cancelDataOrder, checkOfflineDataUIDs, clearAll, 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, getChannelMap, getChannelsForSequenceMap, getClosestUnitMillis, getClosestUnitMillis, getClosestUnitMillisUsingSeq, getCrossReferenceInformation, getCumulativeGain, getCurrentViewDataEnd, getCurrentViewDataStart, getDataAutomationInfo, getDatablockSpeciesManager, getDataBlockXML, getDataCopy, getDataCopy, getDataCopy, getDataCopy, getDataCopyFromEnd, getDataCopyFromStart, getDataGain, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelectCreator, getDataSelector, getDataSelector, getDataSelector, getDataUnit, getDataUnitMenuItems, getDataUnitPopupMenu, getDurationRange, getEffortProvider, getFirstRawSourceDataBlock, getFirstUnit, getFirstUnit, getFirstUnitAfter, getFirstViewerUID, getFrequencyRange, getHydrophoneMap, getJSONDataSource, getLastUnit, getLastUnit, getLastUnitMillis, getLastViewerUID, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationAlgorithm, 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, getShouldLog, getSourceDataBlock, getSourceProcess, getSuperDetectionClass, getSynchLock, getTethysDataProvider, 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, updatePamData
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
-
SuperDetDataBlock
public SuperDetDataBlock(Class unitClass, String dataName, PamProcess parentProcess, int channelMap, boolean isOffline, SuperDetDataBlock.ViewerLoadPolicy viewerLoadPolicy) -
SuperDetDataBlock
public SuperDetDataBlock(Class unitClass, String dataName, PamProcess parentProcess, int channelMap, SuperDetDataBlock.ViewerLoadPolicy viewerLoadPolicy)
-
-
Method Details
-
dummyClassResolve
This is a dummy method which is not used for anything apart from a call to resolve the return type.- Returns:
- null. This is never used, but don't delete it!
-
getSubDetectionClass
-
canSuperDetection
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.- Parameters:
subDataBlock
- Sub detection data block- Returns:
- true if this data can hold those sub data.
-
getSubtableData
Returns the list of subtable data that gets generated when the PamDataBlock is loaded from the database. The list contains information about all the subdetections in each of the PamDataUnits contained in the PamDataBlock. It will be used to re-attach the subdetections- Returns:
-
setSubtableData
public void setSubtableData(ArrayList<PamSubtableData> subTableDataList, ViewLoadObserver loadObserver) Called from the database when subtable data are loaded. The SuperDetection data units will have been loaded at this point, to it's OK to go ahead and sort the subtable data into their SuperDetecitons. However, its possible that the binary data won't have loaded yet, so it may not yet be possible to link the SubdetectionInfo objects to their subdetection data units. That is done in reattach subdetections.- Parameters:
subTableDataList
-loadObserver
-
-
reattachSubdetections
New version of this call that only has to link data units into their sub detections since the SubdetectionInfo lists are already in place in the SuperDetections.- Parameters:
viewLoadObserver
-- Returns:
-
findSubDetDataBlock
find the datablock for the subdetection. Generally, this is just the normal datablock, but in some silly circumstances, it may need to change to something more bespoke (e.g. in QA module).- Parameters:
dataLongName
- data name- Returns:
- data block,null if nothing found.
-
makeSubDetectionInfo
-
getLogging
- Overrides:
getLogging
in classPamDataBlock<Tunit extends SuperDetection>
-
clearOnViewerLoad
public boolean clearOnViewerLoad()Description copied from class:PamDataBlock
Clear all data units on viewer load.- Overrides:
clearOnViewerLoad
in classPamDataBlock<Tunit extends SuperDetection>
- Returns:
- true for normal operations, may be overridded for some types of super detection
-
getViewerLoadPolicy
- Returns:
- the viewerLoadPolicy
-
setViewerLoadPolicy
- Parameters:
viewerLoadPolicy
- the viewerLoadPolicy to set
-