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
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public boolean hasTSTable(String tableName)
public void addTSTable(String tableName, byte[] tableMetaData, int sampleTime, String[] columnNames, String[] columnMetaData) throws IOException
IOException
public void addTSTable(String tableName, byte[] tableMetaData, int sampleTime, String[] columnNames, byte[][] columnMetaData) throws IOException
IOException
public void write(long time, String tableName, long[] values) throws IOException
IOException
public void flush() throws IOException
IOException
public Collection<TSTable> getTSTables()
public Pair<long[],long[][]> readAll(String tableName) throws IOException
IOException
public long readStartDate(String tableName) throws IOException
IOException
public Pair<long[],long[][]> read(String tableName, long startTime, long endTime) throws IOException
tableName
- startTime
- start time includingendTime
- end time includingIOException
public String getDBFilePath()
public org.jfree.chart.JFreeChart createHeatJFreeChart(String tableName) throws IOException
IOException
public org.jfree.chart.JFreeChart createHeatJFreeChart(String tableName, long startTime, long endTime) throws IOException
IOException
public org.jfree.chart.JFreeChart createMinMaxAvgJFreeChart(String tableName) throws IOException
IOException
public org.jfree.chart.JFreeChart createMinMaxAvgJFreeChart(String tableName, long startTime, long endTime) throws IOException
IOException
public org.jfree.chart.JFreeChart createCountJFreeChart(String tableName) throws IOException
IOException
public org.jfree.chart.JFreeChart createCountJFreeChart(String tableName, long startTime, long endTime) throws IOException
IOException
public List<org.jfree.chart.JFreeChart> createJFreeCharts(String tableName) throws IOException
IOException
public List<org.jfree.chart.JFreeChart> createJFreeCharts(String tableName, long startTime, long endTime) throws IOException
IOException
public 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
IOException
public void writeCsvTables(List<String> tableNames, File output) throws IOException
IOException
Copyright © 2014. All rights reserved.