Class OfflineFileControl

java.lang.Object
PamController.PamControlledUnit
fileOfflineData.OfflineFileControl
All Implemented Interfaces:
OfflineDataStore, SettingsNameProvider
Direct Known Subclasses:
CPODControl, D3Control

public abstract class OfflineFileControl extends PamControlledUnit implements OfflineDataStore
  • Constructor Details

    • OfflineFileControl

      public OfflineFileControl(String unitType, String unitName)
  • Method Details

    • getDataLocation

      public String 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 interface OfflineDataStore
      Returns:
      store locations
    • notifyModelChanged

      public void notifyModelChanged(int changeType)
      Description copied from class: PamControlledUnit
      General notification when the PAMGAURD model changes.
      Overrides:
      notifyModelChanged in class PamControlledUnit
      Parameters:
      changeType - type of change
    • createOfflineDataMap

      public void createOfflineDataMap(Window parentFrame)
      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 interface OfflineDataStore
    • getDataSourceName

      public String getDataSourceName()
      Description copied from interface: OfflineDataStore
      Get the data source name
      Specified by:
      getDataSourceName in interface OfflineDataStore
      Returns:
      data source name
    • createDetectionMenu

      public JMenuItem createDetectionMenu(Frame parentFrame)
      Description copied from class: PamControlledUnit
      Create a JMenu object containing MenuItems associated with PamProcesses
      Overrides:
      createDetectionMenu in class PamControlledUnit
      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

      public void detectionMenuAction(Frame parentFrame)
    • getOfflineFileDataMap

      public OfflineFileDataMap 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 interface OfflineDataStore
      Parameters:
      dataBlock - datablock owner of the data
      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 data
      usedMapPoints - list of mappoints which may have data in the load time
      loadObserver - update observer for loading data.
      dataStart - start of data load
      dataEnd - end of data load
      cancellationObject - cancellation object for threading loading
      Returns:
      true hopefully !
    • getFileParams

      public OfflineFileParams getFileParams()
      Returns:
      the fileParams
    • getOfflineFileProcess

      public OfflineFileProcess getOfflineFileProcess()
      Returns:
      the offlineFileProcess
    • rewriteIndexFile

      public boolean rewriteIndexFile(PamDataBlock dataBlock, OfflineDataMapPoint dmp)
      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 interface OfflineDataStore
      Returns:
    • getDatagramManager

      public DatagramManager getDatagramManager()
      Specified by:
      getDatagramManager in interface OfflineDataStore
      Returns:
      the datagramManager
    • setDatagramManager

      public void setDatagramManager(DatagramManager datagramManager)
      Parameters:
      datagramManager - the datagramManager to set
    • setFileParams

      public void setFileParams(OfflineFileParams fileParams)
      Parameters:
      fileParams - the fileParams to set