Class TideManager

java.lang.Object
PamView.importData.DataImport<String>
videoRangePanel.importTideData.TideManager

public class TideManager extends DataImport<String>
The tide manager open tide data and holds it in memory.
Author:
Jamie Macaulay
  • Constructor Details

    • TideManager

      public TideManager(VRControl vrControl)
  • Method Details

    • getHeightOffset

      public double getHeightOffset(long timeMillis)
      Get the height of the tide above mean sea level at a given time.
      Parameters:
      timeMillis -
      Returns:
    • getInterpData

      public TideDataUnit getInterpData(long timeMillis)
      Get a tide data unit which is interpolated from tide data.
      Parameters:
      timeMillis - - date and time in millis
      Returns:
      a tide dtaa unit with tidal height at the specified time
    • getHeightOffset

      public double getHeightOffset()
    • getTideDataBlock

      public PamDataBlock getTideDataBlock()
      Get teh datablock which adds tide data.
      Returns:
      the tide data block.
    • loadDataIntermediate

      public ArrayList<String> loadDataIntermediate(String filePath)
      Description copied from class: DataImport
      Loads the file into memory - each element of the output array list is then processed.
      Specified by:
      loadDataIntermediate in class DataImport<String>
      Parameters:
      filePath - - the filepath.
      Returns:
      a list of imported objects.
    • isDataFormatOK

      public boolean isDataFormatOK(String dataLine)
      Description copied from class: DataImport
      Check that a row of imported data is in the correct format.
      Specified by:
      isDataFormatOK in class DataImport<String>
      Parameters:
      dataLine - -a row of data loaded from file
      Returns:
      true if the format is OK.
    • createDataUnit

      public PamDataUnit createDataUnit(String dataLine)
      Description copied from class: DataImport
      Create a data unit from the data loaded from the imported file.
      Specified by:
      createDataUnit in class DataImport<String>
      Parameters:
      dataLine - -a row of data loaded from file
      Returns:
      a data unit to be saved to the datablock.
    • getDataBlock

      public PamDataBlock getDataBlock()
      Description copied from class: DataImport
      Get the data block to to save data to.
      Specified by:
      getDataBlock in class DataImport<String>
      Returns:
    • getExtensionsStrings

      public String[] getExtensionsStrings()
      Description copied from class: DataImport
      Return the file extensions that can be loaded.
      Specified by:
      getExtensionsStrings in class DataImport<String>
      Returns:
      an array of file extensions that can be loaded.