public interface GPlotDataReaderInterface
Modifier and Type | Method and Description |
---|---|
void |
addColumnInfo(ColumnInfo columnInfo)
Method that allows the user to add column information
|
void |
close()
Close the data file.
|
boolean |
fileIsLoaded()
Checks if the file is loaded
|
GPlotColumnInfo |
getColumnInfo(String datasetId,
int columnIndex)
Get the column information corresponding to the column indicated by the columnIndex.
|
GPlotColumnInfo |
getColumnInfo(String datasetId,
String columnName,
int columnIndex)
Get the column information corresponding to the column indicated by the columnName.
|
List<Double[]> |
getColumns(String datasetId,
Integer... columnIndexList)
Get the values corresponding to the requested columns.
|
List<Double[]> |
getColumns(String datasetId,
String... columnNameList)
Get the values corresponding to the requested columns.
|
List<String[]> |
getColumnsAsString(String datasetId,
Integer... columnIndexList)
Get the values corresponding to the requested columns.
|
List<String> |
getDatasetList()
Get the list of data sets in the file.
|
File |
getFile()
getter to retrieve file loaded
|
int |
getNumberColums(String datasetId)
Get the number of columns of the data file.
|
List<Double[]> |
getXYColumns(String datasetId,
int xColumn,
int yColumn)
Get the XY values corresponding to the requested columns.
|
List<Double[]> |
getXYColumns(String datasetId,
String xColumnName,
String yColumnName)
Get the XY values corresponding to the requested columns.
|
ArrayList<Double[]> |
getXYColumnsCalculator(String datasetId,
String xColumnName,
String yColumnName,
Object[] columnXData,
Object[] columnYData)
Get the XY values corresponding to the requested columns, to be used when the data for on the two columns is not
in a file.
|
default boolean |
isISODate(String line)
checks if the string is a date
|
void |
load(File file)
Load the file.
|
default double |
parseColumnValue(String valueString)
Parse the contents of a column depending on its type.
|
void load(File file) throws GPlotDataReaderException
file
- file to load.GPlotDataReaderException
- in case there is a problem loading the file.List<String> getDatasetList() throws GPlotDataReaderException
GPlotDataReaderException
- in case of error getting the dataset identifiers from the database.int getNumberColums(String datasetId)
datasetId
- dataset identifier.GPlotColumnInfo getColumnInfo(String datasetId, int columnIndex)
datasetId
- dataset identifier.columnIndex
- index of the column.GPlotColumnInfo getColumnInfo(String datasetId, String columnName, int columnIndex)
datasetId
- dataset identifier.columnName
- name of the column.columnIndex
- index of the column.List<Double[]> getXYColumns(String datasetId, int xColumn, int yColumn) throws GPlotDataReaderException
datasetId
- dataset identifier.xColumn
- index of the x column to get the values.yColumn
- index of the y column to get the values.GPlotDataReaderException
- in case of error reading the column values from the data file.List<Double[]> getColumns(String datasetId, Integer... columnIndexList) throws GPlotDataReaderException
datasetId
- dataset identifier.columnIndexList
- List of indexes of the columns to recover.GPlotDataReaderException
- in case of error reading the column values from the data file.List<Double[]> getXYColumns(String datasetId, String xColumnName, String yColumnName) throws GPlotDataReaderException
datasetId
- dataset identifier.xColumnName
- name of the x column to get the values.yColumnName
- name of the y column to get the values.GPlotDataReaderException
- in case of error reading the column values from the data file.ArrayList<Double[]> getXYColumnsCalculator(String datasetId, String xColumnName, String yColumnName, Object[] columnXData, Object[] columnYData) throws GPlotDataReaderException, ParseException
datasetId
- dataset identifier.xColumnName
- name of the x column to get the values.yColumnName
- name of the y column to get the values.columnXData
- Data of the parameter which isnt in the file, is null if Y is the missing columncolumnYData
- Data of the parameter which isnt in the file, is null if X is the missing columnGPlotDataReaderException
- in case of error reading the column values from the data file.ParseException
- in case of error reading the column values from the data file.List<Double[]> getColumns(String datasetId, String... columnNameList) throws GPlotDataReaderException
datasetId
- dataset identifier.columnNameList
- List of names of the columns to recover.GPlotDataReaderException
- in case of error reading the column values from the data file.List<String[]> getColumnsAsString(String datasetId, Integer... columnIndexList) throws GPlotDataReaderException
datasetId
- dataset identifier.columnIndexList
- List of indexes of the columns to recover.GPlotDataReaderException
- in case of error reading the column values from the data file.void close() throws GPlotDataReaderException
GPlotDataReaderException
- in case of error closing the data file.boolean fileIsLoaded()
File getFile()
default boolean isISODate(String line)
line
- is stringdefault double parseColumnValue(String valueString) throws ParseException
valueString
- values to parse as a string.ParseException
- in case the values can not be parsed.void addColumnInfo(ColumnInfo columnInfo)
columnInfo
- the column informationCopyright © 2024. All rights reserved.