Package videoRangePanel.importTideData
Class TideManager
The tide manager open tide data and holds it in memory.
- Author:
- Jamie Macaulay
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateDataUnit
(String dataLine) Create a data unit from the data loaded from the imported file.Get the data block to to save data to.String[]
Return the file extensions that can be loaded.double
double
getHeightOffset
(long timeMillis) Get the height of the tide above mean sea level at a given time.getInterpData
(long timeMillis) Get a tide data unit which is interpolated from tide data.Get teh datablock which adds tide data.boolean
isDataFormatOK
(String dataLine) Check that a row of imported data is in the correct format.loadDataIntermediate
(String filePath) Loads the file into memory - each element of the output array list is then processed.Methods inherited from class PamView.importData.DataImport
getDataUnitName, performPreChecks
-
Constructor Details
-
TideManager
-
-
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
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
Get teh datablock which adds tide data.- Returns:
- the tide data block.
-
loadDataIntermediate
Description copied from class:DataImport
Loads the file into memory - each element of the output array list is then processed.- Specified by:
loadDataIntermediate
in classDataImport<String>
- Parameters:
filePath
- - the filepath.- Returns:
- a list of imported objects.
-
isDataFormatOK
Description copied from class:DataImport
Check that a row of imported data is in the correct format.- Specified by:
isDataFormatOK
in classDataImport<String>
- Parameters:
dataLine
- -a row of data loaded from file- Returns:
- true if the format is OK.
-
createDataUnit
Description copied from class:DataImport
Create a data unit from the data loaded from the imported file.- Specified by:
createDataUnit
in classDataImport<String>
- Parameters:
dataLine
- -a row of data loaded from file- Returns:
- a data unit to be saved to the datablock.
-
getDataBlock
Description copied from class:DataImport
Get the data block to to save data to.- Specified by:
getDataBlock
in classDataImport<String>
- Returns:
-
getExtensionsStrings
Description copied from class:DataImport
Return the file extensions that can be loaded.- Specified by:
getExtensionsStrings
in classDataImport<String>
- Returns:
- an array of file extensions that can be loaded.
-