Package fileOfflineData
Class OfflineFileControl
java.lang.Object
PamController.PamControlledUnit
fileOfflineData.OfflineFileControl
- All Implemented Interfaces:
OfflineDataStore
,SettingsNameProvider
- Direct Known Subclasses:
CPODControl
,D3Control
-
Field Summary
FieldsFields inherited from class PamController.PamControlledUnit
isMixed, isViewer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDetectionMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessesprotected abstract PamDataBlock
createOfflineDataBlock
(OfflineFileProcess offlineFileProcess) Get the datablock - need to be abstract so that it can be created for specific types in the concrete classes.void
createOfflineDataMap
(Window parentFrame) Create a basic map of the data including first and last times and some kind of data/unit time count plus ideally some kind of start and stop time list of where there are gaps in the data.void
detectionMenuAction
(Frame parentFrame) Get the data location.Get the data source nameprotected abstract String
Get the file type for the files to be listedabstract boolean
loadData
(PamDataBlock dataBlock, ArrayList<OfflineFileMapPoint> usedMapPoints, OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver) Load data from the files and pack into appropriate datablocks.boolean
loadData
(PamDataBlock dataBlock, OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver) Load data for a given datablock between two time limits.void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.protected abstract void
processMapFile
(File aFile, int fileIndex) Called for each file when making the data map.boolean
rewriteIndexFile
(PamDataBlock dataBlock, OfflineDataMapPoint dmp) Moved this function over from binary data store.void
setDatagramManager
(DatagramManager datagramManager) void
setFileParams
(OfflineFileParams fileParams) Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitTaskManager, getUnitTaskManager, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setUnitTaskManager, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface PamController.OfflineDataStore
saveData
-
Field Details
-
Constructor Details
-
Method Details
-
getDataLocation
Description copied from interface:OfflineDataStore
Get the data location. This may be a specific file, or might be a folder if data are in many files, a URI, etc.- Specified by:
getDataLocation
in interfaceOfflineDataStore
- Returns:
- store locations
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnit
General notification when the PAMGAURD model changes.- Overrides:
notifyModelChanged
in classPamControlledUnit
- Parameters:
changeType
- type of change
-
createOfflineDataMap
Description copied from interface:OfflineDataStore
Create a basic map of the data including first and last times and some kind of data/unit time count plus ideally some kind of start and stop time list of where there are gaps in the data.- Specified by:
createOfflineDataMap
in interfaceOfflineDataStore
-
processMapFile
Called for each file when making the data map. Concrete class should examine the file and create a datamap point for whatever is in there.- Parameters:
aFile
-fileIndex
-
-
getOfflineFileType
Get the file type for the files to be listed- Returns:
- file type (e.g. xml)
-
createOfflineDataBlock
Get the datablock - need to be abstract so that it can be created for specific types in the concrete classes.- Parameters:
offlineFileProcess2
-- Returns:
-
getDataSourceName
Description copied from interface:OfflineDataStore
Get the data source name- Specified by:
getDataSourceName
in interfaceOfflineDataStore
- Returns:
- data source name
-
createDetectionMenu
Description copied from class:PamControlledUnit
Create a JMenu object containing MenuItems associated with PamProcesses- Overrides:
createDetectionMenu
in classPamControlledUnit
- Parameters:
parentFrame
- The owner frame of the menu- Returns:
- reference to a JMenu which can be added to an existing menu or
menu bar
Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.
-
detectionMenuAction
-
getOfflineFileDataMap
- Returns:
- the offlineFileDataMap
-
loadData
public boolean loadData(PamDataBlock dataBlock, OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver) Description copied from interface:OfflineDataStore
Load data for a given datablock between two time limits.- Specified by:
loadData
in interfaceOfflineDataStore
- Parameters:
dataBlock
- datablock owner of the dataloadObserver
-- Returns:
- true if load successful.
-
loadData
public abstract boolean loadData(PamDataBlock dataBlock, ArrayList<OfflineFileMapPoint> usedMapPoints, OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver) Load data from the files and pack into appropriate datablocks.- Parameters:
dataBlock
- dataBlock for datausedMapPoints
- list of mappoints which may have data in the load timeloadObserver
- update observer for loading data.dataStart
- start of data loaddataEnd
- end of data loadcancellationObject
- cancellation object for threading loading- Returns:
- true hopefully !
-
getFileParams
- Returns:
- the fileParams
-
getOfflineFileProcess
- Returns:
- the offlineFileProcess
-
rewriteIndexFile
Description copied from interface:OfflineDataStore
Moved this function over from binary data store. Many storage systems may not be able to do this, but some might !- Specified by:
rewriteIndexFile
in interfaceOfflineDataStore
- Parameters:
dataBlock
-dmp
-- Returns:
-
getDatagramManager
- Specified by:
getDatagramManager
in interfaceOfflineDataStore
- Returns:
- the datagramManager
-
setDatagramManager
- Parameters:
datagramManager
- the datagramManager to set
-
setFileParams
- Parameters:
fileParams
- the fileParams to set
-