public class GPlotDataSqliteReader extends Object implements GPlotDataReaderInterface
Constructor and Description |
---|
GPlotDataSqliteReader() |
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.
|
void |
load(File file)
Load the file.
|
void |
setSortColum(String value)
Set sort column.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isISODate, parseColumnValue
public void load(File file) throws GPlotDataReaderException
load
in interface GPlotDataReaderInterface
file
- file to load.GPlotDataReaderException
- in case there is a problem loading the file.public List<String> getDatasetList() throws GPlotDataReaderException
getDatasetList
in interface GPlotDataReaderInterface
GPlotDataReaderException
public int getNumberColums(String datasetId)
getNumberColums
in interface GPlotDataReaderInterface
datasetId
- dataset identifier.public GPlotColumnInfo getColumnInfo(String datasetId, int columnIndex)
getColumnInfo
in interface GPlotDataReaderInterface
datasetId
- dataset identifier.columnIndex
- index of the column.public GPlotColumnInfo getColumnInfo(String datasetId, String columnName, int columnIndex)
getColumnInfo
in interface GPlotDataReaderInterface
datasetId
- dataset identifier.columnName
- name of the column.columnIndex
- index of the column.public List<Double[]> getXYColumns(String datasetId, int xColumn, int yColumn) throws GPlotDataReaderException
getXYColumns
in interface GPlotDataReaderInterface
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.public List<Double[]> getColumns(String datasetId, Integer... columnIndexList) throws GPlotDataReaderException
getColumns
in interface GPlotDataReaderInterface
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.public List<Double[]> getXYColumns(String datasetId, String xColumnName, String yColumnName) throws GPlotDataReaderException
getXYColumns
in interface GPlotDataReaderInterface
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.public List<Double[]> getColumns(String datasetId, String... columnNameList) throws GPlotDataReaderException
getColumns
in interface GPlotDataReaderInterface
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.public List<String[]> getColumnsAsString(String datasetId, Integer... columnIndexList) throws GPlotDataReaderException
getColumnsAsString
in interface GPlotDataReaderInterface
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.public void close() throws GPlotDataReaderException
close
in interface GPlotDataReaderInterface
GPlotDataReaderException
- in case of error closing the data file.public boolean fileIsLoaded()
GPlotDataReaderInterface
fileIsLoaded
in interface GPlotDataReaderInterface
public void addColumnInfo(ColumnInfo columnInfo)
GPlotDataReaderInterface
addColumnInfo
in interface GPlotDataReaderInterface
columnInfo
- the column informationpublic ArrayList<Double[]> getXYColumnsCalculator(String datasetId, String xColumnName, String yColumnName, Object[] columnXData, Object[] columnYData) throws GPlotDataReaderException
GPlotDataReaderInterface
getXYColumnsCalculator
in interface GPlotDataReaderInterface
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.public File getFile()
GPlotDataReaderInterface
getFile
in interface GPlotDataReaderInterface
public void setSortColum(String value)
value
- sort column to setCopyright © 2024. All rights reserved.