public class GPlotDataMadonaReader extends Object implements GPlotDataReaderInterface
Constructor and Description |
---|
GPlotDataMadonaReader()
Constructor.
|
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<GPlotColumnInfo> |
getColumnsInfo()
getter to retrieve all the columns informations
|
List<String> |
getDatasetList()
Get the list of data sets in the file.
|
File |
getFile()
getter to retrieve file loaded
|
int |
getFirstMadonaIndex()
Get the first index in Madona file
|
int |
getNumberColums(String datasetId)
Get the number of columns of the data file.
|
ArrayList<Double[]> |
getXYColumns(String datasetId,
int xColumn,
int yColumn)
Get the XY values corresponding to the requested columns.
|
ArrayList<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[] columnData1,
Object[] columnData2)
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isISODate, parseColumnValue
public List<GPlotColumnInfo> getColumnsInfo()
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()
getDatasetList
in interface GPlotDataReaderInterface
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 ArrayList<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.ParseException
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.ParseException
GPlotDataReaderException
- in case of error reading the column values from the data file.public ArrayList<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.ParseException
GPlotDataReaderException
- in case of error reading the column values from the data file.public ArrayList<Double[]> getXYColumnsCalculator(String datasetId, String xColumnName, String yColumnName, Object[] columnData1, Object[] columnData2) throws GPlotDataReaderException
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.columnData1
- Data of the parameter which isnt in the file, is null if Y is the missing columncolumnData2
- 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 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.ParseException
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.ParseException
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 int getFirstMadonaIndex()
public File getFile()
GPlotDataReaderInterface
getFile
in interface GPlotDataReaderInterface
public void addColumnInfo(ColumnInfo columnInfo)
GPlotDataReaderInterface
addColumnInfo
in interface GPlotDataReaderInterface
columnInfo
- the column informationCopyright © 2024. All rights reserved.