public final class TimeSeriesDatabase extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
static int |
VERSION |
| Constructor and Description |
|---|
TimeSeriesDatabase(String pathToDatabaseFile,
byte... metaData) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTSTable(String tableName,
byte[] tableMetaData,
int sampleTime,
String[] columnNames,
byte[][] columnMetaData) |
void |
addTSTable(String tableName,
byte[] tableMetaData,
int sampleTime,
String[] columnNames,
String[] columnMetaData) |
void |
close() |
static org.jfree.chart.JFreeChart |
createCountJFreeChart(Pair<long[],long[][]> data,
TSTable info) |
org.jfree.chart.JFreeChart |
createCountJFreeChart(String tableName) |
org.jfree.chart.JFreeChart |
createCountJFreeChart(String tableName,
long startTime,
long endTime) |
static org.jfree.chart.JFreeChart |
createHeatJFreeChart(Pair<long[],long[][]> data,
TSTable info) |
org.jfree.chart.JFreeChart |
createHeatJFreeChart(String tableName) |
org.jfree.chart.JFreeChart |
createHeatJFreeChart(String tableName,
long startTime,
long endTime) |
static List<org.jfree.chart.JFreeChart> |
createJFreeCharts(Pair<long[],long[][]> data,
TSTable info) |
List<org.jfree.chart.JFreeChart> |
createJFreeCharts(String tableName) |
List<org.jfree.chart.JFreeChart> |
createJFreeCharts(String tableName,
long startTime,
long endTime) |
static org.jfree.chart.JFreeChart |
createMinMaxAvgJFreeChart(Pair<long[],long[][]> data,
TSTable info) |
org.jfree.chart.JFreeChart |
createMinMaxAvgJFreeChart(String tableName) |
org.jfree.chart.JFreeChart |
createMinMaxAvgJFreeChart(String tableName,
long startTime,
long endTime) |
void |
flush() |
String[] |
getColumnNames(String tableName) |
String |
getDBFilePath() |
byte[] |
getMetaData() |
TSTable |
getTSTable(String tableName) |
Collection<TSTable> |
getTSTables() |
boolean |
hasTSTable(String tableName) |
Pair<long[],long[][]> |
read(String tableName,
long startTime,
long endTime)
Read measurements from table.
|
Pair<long[],long[][]> |
readAll(String tableName) |
long |
readStartDate(String tableName) |
String |
toString() |
void |
write(long time,
String tableName,
long[] values) |
void |
writeCsvTable(String tableName,
File output) |
void |
writeCsvTables(List<String> tableNames,
File output) |
public static final int VERSION
public TimeSeriesDatabase(String pathToDatabaseFile, byte... metaData) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean hasTSTable(String tableName)
public void addTSTable(String tableName, byte[] tableMetaData, int sampleTime, String[] columnNames, String[] columnMetaData) throws IOException
IOExceptionpublic void addTSTable(String tableName, byte[] tableMetaData, int sampleTime, String[] columnNames, byte[][] columnMetaData) throws IOException
IOExceptionpublic void write(long time,
String tableName,
long[] values)
throws IOException
IOExceptionpublic void flush()
throws IOException
IOExceptionpublic Collection<TSTable> getTSTables()
public Pair<long[],long[][]> readAll(String tableName) throws IOException
IOExceptionpublic long readStartDate(String tableName) throws IOException
IOExceptionpublic Pair<long[],long[][]> read(String tableName, long startTime, long endTime) throws IOException
tableName - startTime - start time includingendTime - end time includingIOExceptionpublic String getDBFilePath()
public org.jfree.chart.JFreeChart createHeatJFreeChart(String tableName) throws IOException
IOExceptionpublic org.jfree.chart.JFreeChart createHeatJFreeChart(String tableName, long startTime, long endTime) throws IOException
IOExceptionpublic org.jfree.chart.JFreeChart createMinMaxAvgJFreeChart(String tableName) throws IOException
IOExceptionpublic org.jfree.chart.JFreeChart createMinMaxAvgJFreeChart(String tableName, long startTime, long endTime) throws IOException
IOExceptionpublic org.jfree.chart.JFreeChart createCountJFreeChart(String tableName) throws IOException
IOExceptionpublic org.jfree.chart.JFreeChart createCountJFreeChart(String tableName, long startTime, long endTime) throws IOException
IOExceptionpublic List<org.jfree.chart.JFreeChart> createJFreeCharts(String tableName) throws IOException
IOExceptionpublic List<org.jfree.chart.JFreeChart> createJFreeCharts(String tableName, long startTime, long endTime) throws IOException
IOExceptionpublic static org.jfree.chart.JFreeChart createHeatJFreeChart(Pair<long[],long[][]> data, TSTable info)
public static org.jfree.chart.JFreeChart createMinMaxAvgJFreeChart(Pair<long[],long[][]> data, TSTable info)
public static org.jfree.chart.JFreeChart createCountJFreeChart(Pair<long[],long[][]> data, TSTable info)
public static List<org.jfree.chart.JFreeChart> createJFreeCharts(Pair<long[],long[][]> data, TSTable info)
public byte[] getMetaData()
public void writeCsvTable(String tableName, File output) throws IOException
IOExceptionpublic void writeCsvTables(List<String> tableNames, File output) throws IOException
IOExceptionCopyright © 2014. All rights reserved.