类 TimeTableData
- java.lang.Object
-
- org.meteoinfo.table.DataTable
-
- org.meteoinfo.data.TableData
-
- org.meteoinfo.data.TimeTableData
-
public class TimeTableData extends TableData
- 作者:
- wyq
-
-
字段概要
-
从类继承的字段 org.meteoinfo.data.TableData
missingValue
-
-
构造器概要
构造器 构造器 说明 TimeTableData()ConstructorTimeTableData(DataTable dataTable, String timeColName)Constructor
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 DataTableave_Day(List<DataColumn> cols)Average dailyDataTableave_DayOfWeek(List<DataColumn> cols)Average by day of weekDataTableave_Hour(List<DataColumn> cols)Average HourlyDataTableave_HourOfDay(List<DataColumn> cols)Average by hour of dayDataTableave_Month(List<DataColumn> cols)Average month by monthDataTableave_MonthOfYear(List<DataColumn> cols)Average monthlyDataTableave_SeasonOfYear(List<DataColumn> cols)Average seasonalDataTableave_Year(List<DataColumn> cols)Average year by yearDataTableave_Year(List<DataColumn> cols, int year)Average yearDataTableave_YearMonth(List<DataColumn> cols, int month)Average month by yearList<DataRow>getDataByDate(int year, int month, int day)Get data row list by dateList<DataRow>getDataByDate(int year, int month, int day, int hour)Get data row list by dateList<DataRow>getDataByDate(LocalDateTime date, List<DataRow> drs)Get data row list by dateList<DataRow>getDataByDate_Hour(LocalDateTime date, List<DataRow> drs)Get data row list by date - hourList<DataRow>getDataByDayOfWeek(int dow)Get data row list by day of weekList<DataRow>getDataByHour(int hour)Get data row list by hourList<DataRow>getDataByMonth(int month)Get data row list by monthList<DataRow>getDataBySeason(String season)Get data row list by yearList<DataRow>getDataByYear(int year)Get data row list by yearList<DataRow>getDataByYearMonth(int year, int month)Get data row list by year and monthList<DataRow>getDataByYearMonth(String yearMonth)Get data row list by year and monthstatic List<LocalDateTime>getDateList(LocalDateTime stdate, LocalDateTime enddate, String tdtype, int timeDelt)Get date list - StringList<LocalDateTime>getDates_Day()Get daysList<LocalDateTime>getDates_Hour()Get date hoursStringgetTimeColName()Get time column nameintgetTimeIndex(LocalDateTime t)Get time indexList<Integer>getTimeIndex(LocalDateTime st, LocalDateTime et, int step)Get time indexList<Integer>getTimeIndex(List<LocalDateTime> ts)Get time index listintgetTimeIndex_Ex(LocalDateTime t)Get time indexList<String>getYearMonths()Get year monthsList<Integer>getYears()Get yearsvoidreadASCIIFile(String fileName, int timeColIdx, String formatStr)Read data table from ASCII filevoidreadASCIIFile(String fileName, int timeColIdx, String formatStr, List<DataColumn> dataColumns)Read data table from ASCII filevoidsetTimeColName(String value)Set time column nameDataTablesum_Day(List<DataColumn> cols)Summary dailyDataTablesum_DayOfWeek(List<DataColumn> cols)Summary by day of weekDataTablesum_Hour(List<DataColumn> cols)Summary HourlyDataTablesum_HourOfDay(List<DataColumn> cols)Summary by hour of dayDataTablesum_Month(List<DataColumn> cols)Summary month by monthDataTablesum_MonthOfYear(List<DataColumn> cols)Summary month of yearDataTablesum_SeasonOfYear(List<DataColumn> cols)Summary seasonalDataTablesum_Year(List<DataColumn> cols)Average year by yearDataTablesum_YearMonth(List<DataColumn> cols, int month)Sum month by yearTimeTableDatatimeOrder(LocalDateTime stdate, LocalDateTime enddate, String tdtype, int timeDelt)Time order for data-
从类继承的方法 org.meteoinfo.data.TableData
addColumnData, addColumnData, ave_DayOfWeek, ave_HourOfDay, ave_Month, ave_MonthOfYear, ave_SeasonOfYear, ave_stdev, ave_Year, average, clone, columnToDouble, getDataByDayOfWeek, getDataByHour, getDataByMonth, getDataBySeason, getDataByYear, getDataByYearMonth, getDataByYearMonth, getDataColumns, getMissingValue, getRow, getValidColumnValues, getValidColumnValues, getYearMonths, getYears, join, join, readASCIIFile, readASCIIFile, readASCIIFile, readASCIIFile, removeColumn, setColumnData, setMissingValue, sqlSelect, statistics, statistics, sum, toSingleRowTable, toSingleRowTable, toSingleRowTable
-
从类继承的方法 org.meteoinfo.table.DataTable
addColumn, addColumn, addColumn, addColumn, addColumnData, addColumnData, addColumnData, addRow, addRow, addRows, appendRow, avg, avg, cloneTable_Field, colSelect, findColumn, findColumns, findColumns_Index, getColumnCount, getColumnData, getColumnData, getColumnData, getColumnNames, getColumns, getRowCount, getRows, getRows, getRows, getTableName, getTag, getTotalCount, getValue, getValue, hasTimeColumn, head, isReadOnly, join, join, join, max, max, min, min, newRow, removeColumn, removeJoin, removeRow, removeRow, removeRows, renameColumn, renameColumn, renameColumn, saveAsASCIIFile, saveAsASCIIFile, saveAsASCIIFile_format, saveAsCSVFile, saveAsCSVFile, select, select, select, select, select, select, select, select, select, select, select, select, setColumnData, setColumnData, setColumnData, setColumnData, setColumnData, setReadOnly, setRows, setTableName, setTag, setValue, setValue, setValues, tail, toString, toString, toString, toString
-
-
-
-
方法详细资料
-
getTimeColName
public String getTimeColName()
Get time column name- 覆盖:
getTimeColName在类中TableData- 返回:
- Time column name
-
setTimeColName
public void setTimeColName(String value)
Set time column name- 参数:
value- Time column name
-
readASCIIFile
public void readASCIIFile(String fileName, int timeColIdx, String formatStr, List<DataColumn> dataColumns) throws FileNotFoundException, IOException, Exception
Read data table from ASCII file- 参数:
fileName- File nametimeColIdx- Time column indexformatStr- Time format stringdataColumns- Data columns- 抛出:
FileNotFoundExceptionIOExceptionException
-
readASCIIFile
public void readASCIIFile(String fileName, int timeColIdx, String formatStr) throws FileNotFoundException, IOException, Exception
Read data table from ASCII file- 参数:
fileName- File nametimeColIdx- Time column indexformatStr- Time format string- 抛出:
FileNotFoundExceptionIOExceptionException
-
getTimeIndex_Ex
public int getTimeIndex_Ex(LocalDateTime t)
Get time index- 参数:
t- Time- 返回:
- Index
-
getTimeIndex
public int getTimeIndex(LocalDateTime t)
Get time index- 参数:
t- Time- 返回:
- Index
-
getTimeIndex
public List<Integer> getTimeIndex(List<LocalDateTime> ts)
Get time index list- 参数:
ts- Times- 返回:
- Index list
-
getTimeIndex
public List<Integer> getTimeIndex(LocalDateTime st, LocalDateTime et, int step)
Get time index- 参数:
st- Start timeet- End timestep- Step- 返回:
- Time index
-
getDates_Day
public List<LocalDateTime> getDates_Day()
Get days- 返回:
- Date list
-
getDates_Hour
public List<LocalDateTime> getDates_Hour()
Get date hours- 返回:
- Date list
-
getDataByYear
public List<DataRow> getDataByYear(int year)
Get data row list by year- 参数:
year- The year- 返回:
- Data row list
-
getDataBySeason
public List<DataRow> getDataBySeason(String season)
Get data row list by year- 参数:
season- The season- 返回:
- Data row list
-
getDataByYearMonth
public List<DataRow> getDataByYearMonth(String yearMonth)
Get data row list by year and month- 参数:
yearMonth- The year and month- 返回:
- Data row list
-
getDataByYearMonth
public List<DataRow> getDataByYearMonth(int year, int month)
Get data row list by year and month- 参数:
year- The yearmonth- The month- 返回:
- Data row list
-
getDataByDate
public List<DataRow> getDataByDate(LocalDateTime date, List<DataRow> drs)
Get data row list by date- 参数:
date- Date stringdrs- Data rows- 返回:
- Data row list
-
getDataByDate_Hour
public List<DataRow> getDataByDate_Hour(LocalDateTime date, List<DataRow> drs)
Get data row list by date - hour- 参数:
date- Date stringdrs- Data rows- 返回:
- Data row list
-
getDataByDate
public List<DataRow> getDataByDate(int year, int month, int day)
Get data row list by date- 参数:
year- The yearmonth- The monthday- The day- 返回:
- Data row list
-
getDataByDate
public List<DataRow> getDataByDate(int year, int month, int day, int hour)
Get data row list by date- 参数:
year- The yearmonth- The monthday- The dayhour- The hour- 返回:
- Data row list
-
getDataByMonth
public List<DataRow> getDataByMonth(int month)
Get data row list by month- 参数:
month- The month- 返回:
- Data row list
-
getDataByDayOfWeek
public List<DataRow> getDataByDayOfWeek(int dow)
Get data row list by day of week- 参数:
dow- Day of week- 返回:
- Data row list
-
getDataByHour
public List<DataRow> getDataByHour(int hour)
Get data row list by hour- 参数:
hour- The hour- 返回:
- Result data row list
-
ave_Year
public DataTable ave_Year(List<DataColumn> cols) throws Exception
Average year by year- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
ave_Year
public DataTable ave_Year(List<DataColumn> cols, int year) throws Exception
Average year- 参数:
cols- The data columnsyear- The year- 返回:
- Result data table
- 抛出:
Exception
-
sum_Year
public DataTable sum_Year(List<DataColumn> cols) throws Exception
Average year by year- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
ave_YearMonth
public DataTable ave_YearMonth(List<DataColumn> cols, int month) throws Exception
Average month by year- 参数:
cols- The data columnsmonth- The month- 返回:
- Result data table
- 抛出:
Exception
-
sum_YearMonth
public DataTable sum_YearMonth(List<DataColumn> cols, int month) throws Exception
Sum month by year- 参数:
cols- The data columnsmonth- The month- 返回:
- Result data table
- 抛出:
Exception
-
ave_Month
public DataTable ave_Month(List<DataColumn> cols) throws Exception
Average month by month- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
sum_Month
public DataTable sum_Month(List<DataColumn> cols) throws Exception
Summary month by month- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
ave_Day
public DataTable ave_Day(List<DataColumn> cols) throws Exception
Average daily- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
sum_Day
public DataTable sum_Day(List<DataColumn> cols) throws Exception
Summary daily- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
ave_Hour
public DataTable ave_Hour(List<DataColumn> cols) throws Exception
Average Hourly- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
sum_Hour
public DataTable sum_Hour(List<DataColumn> cols) throws Exception
Summary Hourly- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
ave_MonthOfYear
public DataTable ave_MonthOfYear(List<DataColumn> cols) throws Exception
Average monthly- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
sum_MonthOfYear
public DataTable sum_MonthOfYear(List<DataColumn> cols) throws Exception
Summary month of year- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
ave_SeasonOfYear
public DataTable ave_SeasonOfYear(List<DataColumn> cols) throws Exception
Average seasonal- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
sum_SeasonOfYear
public DataTable sum_SeasonOfYear(List<DataColumn> cols) throws Exception
Summary seasonal- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
ave_DayOfWeek
public DataTable ave_DayOfWeek(List<DataColumn> cols) throws Exception
Average by day of week- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
sum_DayOfWeek
public DataTable sum_DayOfWeek(List<DataColumn> cols) throws Exception
Summary by day of week- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
ave_HourOfDay
public DataTable ave_HourOfDay(List<DataColumn> cols) throws Exception
Average by hour of day- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
sum_HourOfDay
public DataTable sum_HourOfDay(List<DataColumn> cols) throws Exception
Summary by hour of day- 参数:
cols- The data columns- 返回:
- Result data table
- 抛出:
Exception
-
getDateList
public static List<LocalDateTime> getDateList(LocalDateTime stdate, LocalDateTime enddate, String tdtype, int timeDelt) throws FileNotFoundException, IOException, ParseException
Get date list - String- 参数:
stdate- Start dateenddate- End datetdtype- Calendar typetimeDelt- Time delta value- 返回:
- Date list
- 抛出:
FileNotFoundExceptionIOExceptionParseException
-
timeOrder
public TimeTableData timeOrder(LocalDateTime stdate, LocalDateTime enddate, String tdtype, int timeDelt) throws IOException, FileNotFoundException, ParseException, Exception
Time order for data- 参数:
stdate- Start dateenddate- End datetdtype- Calendar typetimeDelt- Time delta- 返回:
- Ordered data
- 抛出:
IOExceptionFileNotFoundExceptionParseExceptionException
-
-