public class ResultReader extends SqliteBase
COMMA, DEFINITION_SUFIX, DESCRIPTION, GAP_THRESHOLD, NAME, TYPE, UNIT, USER_VISIBLE| Constructor and Description |
|---|
ResultReader(File sqlFile)
Constructor using the sql file.
|
| Modifier and Type | Method and Description |
|---|---|
ColumnInfo |
getColumnInfoByIndex(String tableName,
int columnIndex)
Get the column information given the table and the index.
|
ColumnInfo |
getColumnInfoByName(String tableName,
String columnName)
Get the column information given the table and the index.
|
List<Object> |
getColumns(String tableName,
ColumnInfo column)
Get the columns information.
|
List<Object> |
getColumns(String tableName,
ColumnInfo column,
String sortColumn)
Get the columns information.
|
List<Object> |
getColumns(String tableName1,
String tableName2,
ColumnInfo column,
String sortColumn)
Get the columns information.
|
List<Object> |
getColumnsWithUnit(String tableName,
ColumnInfo column,
GUnit unit)
Get the columns information converted to the given unit.
|
List<Object> |
getColumnsWithUnit(String tableName,
ColumnInfo column,
GUnit unit,
String sortColumnName)
Get the columns information converted to the given unit.
|
List<Object> |
getColumnsWithUnit(String tableName1,
String tableName2,
ColumnInfo column,
GUnit unit,
String sortColumn)
Get the columns information converted to the given unit joining the results of 2 tables simultaneously.
|
int |
getNumberColumns(String tableName)
Get the number of columns of the table.
|
int |
getNumberRecords(String tableName)
Get the number of records in the table.
|
int |
getNumberTables()
Get the number of tables stored in the database, excluding the definition tables.
|
Object |
getRecord(String tableName,
ColumnInfo columnInfo,
GUnit unit,
int index)
Get the record corresponding to the index from the sql table.
|
Object |
getRecord(String tableName,
ColumnInfo columnInfo,
int index)
Get the record corresponding to the index from the sql table.
|
List<String> |
getTableNames()
Get the number of tables stored in the database, excluding the definition tables.
|
List<Object[]> |
getXYColumns(String tableName,
ColumnInfo xColumn,
ColumnInfo yColumn)
Get the X and Y columns information.
|
List<Object[]> |
getXYColumnsWithUnit(String tableName,
ColumnInfo xColumn,
GUnit xUnit,
ColumnInfo yColumn,
GUnit yUnit)
Get the X and Y columns information converted to their given units.
|
void |
setRecord(String tableName,
ColumnInfo columnInfo)
Set the new column corresponding to a new index from the sql table.
|
void |
writeToMadonaFile(String tableName,
File outputMadonaFile,
List<String> columnNameList,
List<String> headerInfoLines,
String sortColumn)
Write the columns in a file using the Madona format.
|
void |
writeToMadonaFile(String tableName1,
String tableName2,
File outputMadonaFile,
List<String> columnNameList,
List<String> headerInfoLines,
String sortColumn)
Write the columns in a file using the Madona format.
|
void |
writeToVTSAtt(String tableName,
File outputVTSFile,
List<String> columnNameList,
String sortColumn)
Write the selected columns to a VTS (OEM) ephemeris file.
|
void |
writeToVTSEphem(String tableName,
File outputVTSFile,
List<String> columnNameList,
String sortColumn)
Write the selected columns to a VTS (OEM) ephemeris file.
|
void |
writeToVTSEvents(String tableName,
File outputVTSFile,
List<String> columnNameList,
String sortColumn)
Write the selected columns to a VTS (OEM) ephemeris file.
|
void |
writeToVTSMem(String tableName,
File outputVTSFile,
VTSHeaderInfo vtsHeaderInfo,
List<String> columnNameList,
String sortColumn)
Write the selected columns to a VTS (MEM) file.
|
close, executeStatement, getPreparedStatement, getStatement, openpublic ResultReader(File sqlFile)
sqlFile - to usepublic int getNumberTables()
throws SqliteException
SqliteException - in case of errorpublic List<String> getTableNames() throws SqliteException
SqliteException - in case of errorpublic int getNumberRecords(String tableName) throws SqliteException
tableName - name of the tableSqliteException - in case of errorpublic int getNumberColumns(String tableName) throws SqliteException
tableName - to searchSqliteException - in case of errorpublic ColumnInfo getColumnInfoByIndex(String tableName, int columnIndex) throws SqliteException
tableName - the table name to searchcolumnIndex - the index of the columnSqliteException - in case of errorpublic ColumnInfo getColumnInfoByName(String tableName, String columnName) throws SqliteException
tableName - the table name to searchcolumnName - Name of the columnSqliteException - in case of errorpublic List<Object> getColumnsWithUnit(String tableName, ColumnInfo column, GUnit unit) throws SqliteException
tableName - the table to searchcolumn - the column definitionunit - to convertSqliteException - in case of errorpublic List<Object> getColumnsWithUnit(String tableName, ColumnInfo column, GUnit unit, String sortColumnName) throws SqliteException
tableName - the table to searchcolumn - the column definitionunit - to convertsortColumnName - column name used to sort.SqliteException - in case of errorpublic List<Object> getColumnsWithUnit(String tableName1, String tableName2, ColumnInfo column, GUnit unit, String sortColumn) throws SqliteException
tableName1 - the first table to searchtableName2 - the first table to searchcolumn - the column definitionunit - to convertsortColumn - column or expression used to sort.SqliteException - in case of errorpublic Object getRecord(String tableName, ColumnInfo columnInfo, int index) throws SqliteException
tableName - the table to searchcolumnInfo - the column definitionindex - index of the requested record.SqliteException - in case of errorpublic Object getRecord(String tableName, ColumnInfo columnInfo, GUnit unit, int index) throws SqliteException
tableName - the table to searchcolumnInfo - the column definitionunit - to convertindex - index of the requested record.SqliteException - in case of errorpublic void setRecord(String tableName, ColumnInfo columnInfo) throws SqliteException
tableName - the table to searchcolumnInfo - the column definitionSqliteException - in case of errorpublic List<Object> getColumns(String tableName, ColumnInfo column) throws SqliteException
tableName - the table to searchcolumn - the column definitionSqliteException - in case of errorpublic List<Object> getColumns(String tableName, ColumnInfo column, String sortColumn) throws SqliteException
tableName - the table to searchcolumn - the column definitionsortColumn - column or expression used to sort.SqliteException - in case of errorpublic List<Object> getColumns(String tableName1, String tableName2, ColumnInfo column, String sortColumn) throws SqliteException
tableName1 - the first table to searchtableName2 - the first table to searchcolumn - the column definitionsortColumn - column or expression used to sort.SqliteException - in case of errorpublic List<Object[]> getXYColumnsWithUnit(String tableName, ColumnInfo xColumn, GUnit xUnit, ColumnInfo yColumn, GUnit yUnit) throws SqliteException
tableName - the table to searchxColumn - the X column definitionxUnit - to convertyColumn - the Y column definitionyUnit - to convertSqliteException - in case of errorpublic List<Object[]> getXYColumns(String tableName, ColumnInfo xColumn, ColumnInfo yColumn) throws SqliteException
tableName - the table to searchxColumn - the X column definitionyColumn - the Y column definitionSqliteException - in case of errorpublic void writeToMadonaFile(String tableName, File outputMadonaFile, List<String> columnNameList, List<String> headerInfoLines, String sortColumn) throws SqliteException
tableName - the table name to writeoutputMadonaFile - destination filecolumnNameList - the list of columns names to writeheaderInfoLines - information lines to add to the header.sortColumn - column or expression used to sort.SqliteException - in case of errorpublic void writeToMadonaFile(String tableName1, String tableName2, File outputMadonaFile, List<String> columnNameList, List<String> headerInfoLines, String sortColumn) throws SqliteException
tableName1 - the first table to searchtableName2 - the first table to searchoutputMadonaFile - destination filecolumnNameList - the list of columns names to writeheaderInfoLines - information lines to add to the header.sortColumn - column or expression used to sort.SqliteException - in case of errorpublic void writeToVTSMem(String tableName, File outputVTSFile, VTSHeaderInfo vtsHeaderInfo, List<String> columnNameList, String sortColumn) throws SqliteException, GVTSException
tableName - name of the table to extract the columns.outputVTSFile - VTS file to write the results.vtsHeaderInfo - header of the ASCII FilecolumnNameList - list of the column names. The list of columns should correspond to DATE (1), Position
EME2000 (3), Velocity EME2000(3)sortColumn - column or expression used to sort.SqliteException - in case or problem extracting the information from the sqlite database.GVTSException - vts exceptionpublic void writeToVTSEphem(String tableName, File outputVTSFile, List<String> columnNameList, String sortColumn) throws SqliteException
tableName - name of the table to extract the columns.outputVTSFile - VTS file to write the results.columnNameList - list of the column names. The list of columns should correspond to DATE (1), Position
EME2000 (3), Velocity EME2000(3)sortColumn - column or expression used to sort.SqliteException - in case or problem extracting the information from the sqlite database.public void writeToVTSAtt(String tableName, File outputVTSFile, List<String> columnNameList, String sortColumn) throws SqliteException
tableName - name of the table to extract the columns.outputVTSFile - VTS file to write the results.columnNameList - list of the column names. The list of columns should correspond to DATE (1), Position
EME2000 (3), Velocity EME2000(3)sortColumn - column or expression used to sort.SqliteException - in case or problem extracting the information from the sqlite database.public void writeToVTSEvents(String tableName, File outputVTSFile, List<String> columnNameList, String sortColumn) throws SqliteException
tableName - name of the table to extract the columns.outputVTSFile - VTS file to write the results.columnNameList - list of the column names. The list of columns should correspond to DATE (1), Position
EME2000 (3), Velocity EME2000(3)sortColumn - column or expression used to sort.SqliteException - in case or problem extracting the information from the sqlite database.Copyright © 2024. All rights reserved.