类 TimeTableData


  • public class TimeTableData
    extends TableData
    作者:
    wyq
    • 字段概要

      • 从类继承的字段 org.meteoinfo.table.DataTable

        columns, nextRowIndex, readOnly, rows, tableName, tag
    • 构造器概要

      构造器 
      构造器 说明
      TimeTableData()
      Constructor
      TimeTableData​(org.meteoinfo.table.DataTable dataTable, java.lang.String timeColName)
      Constructor
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      org.meteoinfo.table.DataTable ave_Day​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average daily
      org.meteoinfo.table.DataTable ave_DayOfWeek​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average by day of week
      org.meteoinfo.table.DataTable ave_Hour​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average Hourly
      org.meteoinfo.table.DataTable ave_HourOfDay​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average by hour of day
      org.meteoinfo.table.DataTable ave_Month​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average month by month
      org.meteoinfo.table.DataTable ave_MonthOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average monthly
      org.meteoinfo.table.DataTable ave_SeasonOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average seasonal
      org.meteoinfo.table.DataTable ave_Year​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average year by year
      org.meteoinfo.table.DataTable ave_Year​(java.util.List<org.meteoinfo.table.DataColumn> cols, int year)
      Average year
      org.meteoinfo.table.DataTable ave_YearMonth​(java.util.List<org.meteoinfo.table.DataColumn> cols, int month)
      Average month by year
      java.util.List<org.meteoinfo.table.DataRow> getDataByDate​(int year, int month, int day)
      Get data row list by date
      java.util.List<org.meteoinfo.table.DataRow> getDataByDate​(int year, int month, int day, int hour)
      Get data row list by date
      java.util.List<org.meteoinfo.table.DataRow> getDataByDate​(java.time.LocalDateTime date, java.util.List<org.meteoinfo.table.DataRow> drs)
      Get data row list by date
      java.util.List<org.meteoinfo.table.DataRow> getDataByDate_Hour​(java.time.LocalDateTime date, java.util.List<org.meteoinfo.table.DataRow> drs)
      Get data row list by date - hour
      java.util.List<org.meteoinfo.table.DataRow> getDataByDayOfWeek​(int dow)
      Get data row list by day of week
      java.util.List<org.meteoinfo.table.DataRow> getDataByHour​(int hour)
      Get data row list by hour
      java.util.List<org.meteoinfo.table.DataRow> getDataByMonth​(int month)
      Get data row list by month
      java.util.List<org.meteoinfo.table.DataRow> getDataBySeason​(java.lang.String season)
      Get data row list by year
      java.util.List<org.meteoinfo.table.DataRow> getDataByYear​(int year)
      Get data row list by year
      java.util.List<org.meteoinfo.table.DataRow> getDataByYearMonth​(int year, int month)
      Get data row list by year and month
      java.util.List<org.meteoinfo.table.DataRow> getDataByYearMonth​(java.lang.String yearMonth)
      Get data row list by year and month
      static java.util.List<java.time.LocalDateTime> getDateList​(java.time.LocalDateTime stdate, java.time.LocalDateTime enddate, java.lang.String tdtype, int timeDelt)
      Get date list - String
      java.util.List<java.time.LocalDateTime> getDates_Day()
      Get days
      java.util.List<java.time.LocalDateTime> getDates_Hour()
      Get date hours
      java.lang.String getTimeColName()
      Get time column name
      int getTimeIndex​(java.time.LocalDateTime t)
      Get time index
      java.util.List<java.lang.Integer> getTimeIndex​(java.time.LocalDateTime st, java.time.LocalDateTime et, int step)
      Get time index
      java.util.List<java.lang.Integer> getTimeIndex​(java.util.List<java.time.LocalDateTime> ts)
      Get time index list
      int getTimeIndex_Ex​(java.time.LocalDateTime t)
      Get time index
      java.util.List<java.lang.String> getYearMonths()
      Get year months
      java.util.List<java.lang.Integer> getYears()
      Get years
      void readASCIIFile​(java.lang.String fileName, int timeColIdx, java.lang.String formatStr)
      Read data table from ASCII file
      void readASCIIFile​(java.lang.String fileName, int timeColIdx, java.lang.String formatStr, java.util.List<org.meteoinfo.table.DataColumn> dataColumns)
      Read data table from ASCII file
      void setTimeColName​(java.lang.String value)
      Set time column name
      org.meteoinfo.table.DataTable sum_Day​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Summary daily
      org.meteoinfo.table.DataTable sum_DayOfWeek​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Summary by day of week
      org.meteoinfo.table.DataTable sum_Hour​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Summary Hourly
      org.meteoinfo.table.DataTable sum_HourOfDay​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Summary by hour of day
      org.meteoinfo.table.DataTable sum_Month​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Summary month by month
      org.meteoinfo.table.DataTable sum_MonthOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Summary month of year
      org.meteoinfo.table.DataTable sum_SeasonOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Summary seasonal
      org.meteoinfo.table.DataTable sum_Year​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average year by year
      org.meteoinfo.table.DataTable sum_YearMonth​(java.util.List<org.meteoinfo.table.DataColumn> cols, int month)
      Sum month by year
      TimeTableData timeOrder​(java.time.LocalDateTime stdate, java.time.LocalDateTime enddate, java.lang.String tdtype, int timeDelt)
      Time order for data
      • 从类继承的方法 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, setReadOnly, setRows, setTableName, setTag, setValue, setValue, setValues, tail, toString, toString, toString, toString
      • 从类继承的方法 java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 构造器详细资料

      • TimeTableData

        public TimeTableData()
        Constructor
      • TimeTableData

        public TimeTableData​(org.meteoinfo.table.DataTable dataTable,
                             java.lang.String timeColName)
        Constructor
        参数:
        dataTable - Data table
        timeColName - Time column name
    • 方法详细资料

      • getTimeColName

        public java.lang.String getTimeColName()
        Get time column name
        覆盖:
        getTimeColName 在类中 TableData
        返回:
        Time column name
      • setTimeColName

        public void setTimeColName​(java.lang.String value)
        Set time column name
        参数:
        value - Time column name
      • readASCIIFile

        public void readASCIIFile​(java.lang.String fileName,
                                  int timeColIdx,
                                  java.lang.String formatStr,
                                  java.util.List<org.meteoinfo.table.DataColumn> dataColumns)
                           throws java.io.FileNotFoundException,
                                  java.io.IOException,
                                  java.lang.Exception
        Read data table from ASCII file
        参数:
        fileName - File name
        timeColIdx - Time column index
        formatStr - Time format string
        dataColumns - Data columns
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • readASCIIFile

        public void readASCIIFile​(java.lang.String fileName,
                                  int timeColIdx,
                                  java.lang.String formatStr)
                           throws java.io.FileNotFoundException,
                                  java.io.IOException,
                                  java.lang.Exception
        Read data table from ASCII file
        参数:
        fileName - File name
        timeColIdx - Time column index
        formatStr - Time format string
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • getTimeIndex_Ex

        public int getTimeIndex_Ex​(java.time.LocalDateTime t)
        Get time index
        参数:
        t - Time
        返回:
        Index
      • getTimeIndex

        public int getTimeIndex​(java.time.LocalDateTime t)
        Get time index
        参数:
        t - Time
        返回:
        Index
      • getTimeIndex

        public java.util.List<java.lang.Integer> getTimeIndex​(java.util.List<java.time.LocalDateTime> ts)
        Get time index list
        参数:
        ts - Times
        返回:
        Index list
      • getTimeIndex

        public java.util.List<java.lang.Integer> getTimeIndex​(java.time.LocalDateTime st,
                                                              java.time.LocalDateTime et,
                                                              int step)
        Get time index
        参数:
        st - Start time
        et - End time
        step - Step
        返回:
        Time index
      • getYears

        public java.util.List<java.lang.Integer> getYears()
        Get years
        返回:
        Year list
      • getYearMonths

        public java.util.List<java.lang.String> getYearMonths()
        Get year months
        返回:
        Year month list
      • getDates_Day

        public java.util.List<java.time.LocalDateTime> getDates_Day()
        Get days
        返回:
        Date list
      • getDates_Hour

        public java.util.List<java.time.LocalDateTime> getDates_Hour()
        Get date hours
        返回:
        Date list
      • getDataByYear

        public java.util.List<org.meteoinfo.table.DataRow> getDataByYear​(int year)
        Get data row list by year
        参数:
        year - The year
        返回:
        Data row list
      • getDataBySeason

        public java.util.List<org.meteoinfo.table.DataRow> getDataBySeason​(java.lang.String season)
        Get data row list by year
        参数:
        season - The season
        返回:
        Data row list
      • getDataByYearMonth

        public java.util.List<org.meteoinfo.table.DataRow> getDataByYearMonth​(java.lang.String yearMonth)
        Get data row list by year and month
        参数:
        yearMonth - The year and month
        返回:
        Data row list
      • getDataByYearMonth

        public java.util.List<org.meteoinfo.table.DataRow> getDataByYearMonth​(int year,
                                                                              int month)
        Get data row list by year and month
        参数:
        year - The year
        month - The month
        返回:
        Data row list
      • getDataByDate

        public java.util.List<org.meteoinfo.table.DataRow> getDataByDate​(java.time.LocalDateTime date,
                                                                         java.util.List<org.meteoinfo.table.DataRow> drs)
        Get data row list by date
        参数:
        date - Date string
        drs - Data rows
        返回:
        Data row list
      • getDataByDate_Hour

        public java.util.List<org.meteoinfo.table.DataRow> getDataByDate_Hour​(java.time.LocalDateTime date,
                                                                              java.util.List<org.meteoinfo.table.DataRow> drs)
        Get data row list by date - hour
        参数:
        date - Date string
        drs - Data rows
        返回:
        Data row list
      • getDataByDate

        public java.util.List<org.meteoinfo.table.DataRow> getDataByDate​(int year,
                                                                         int month,
                                                                         int day)
        Get data row list by date
        参数:
        year - The year
        month - The month
        day - The day
        返回:
        Data row list
      • getDataByDate

        public java.util.List<org.meteoinfo.table.DataRow> getDataByDate​(int year,
                                                                         int month,
                                                                         int day,
                                                                         int hour)
        Get data row list by date
        参数:
        year - The year
        month - The month
        day - The day
        hour - The hour
        返回:
        Data row list
      • getDataByMonth

        public java.util.List<org.meteoinfo.table.DataRow> getDataByMonth​(int month)
        Get data row list by month
        参数:
        month - The month
        返回:
        Data row list
      • getDataByDayOfWeek

        public java.util.List<org.meteoinfo.table.DataRow> getDataByDayOfWeek​(int dow)
        Get data row list by day of week
        参数:
        dow - Day of week
        返回:
        Data row list
      • getDataByHour

        public java.util.List<org.meteoinfo.table.DataRow> getDataByHour​(int hour)
        Get data row list by hour
        参数:
        hour - The hour
        返回:
        Result data row list
      • ave_Year

        public org.meteoinfo.table.DataTable ave_Year​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                               throws java.lang.Exception
        Average year by year
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_Year

        public org.meteoinfo.table.DataTable ave_Year​(java.util.List<org.meteoinfo.table.DataColumn> cols,
                                                      int year)
                                               throws java.lang.Exception
        Average year
        参数:
        cols - The data columns
        year - The year
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_Year

        public org.meteoinfo.table.DataTable sum_Year​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                               throws java.lang.Exception
        Average year by year
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_YearMonth

        public org.meteoinfo.table.DataTable ave_YearMonth​(java.util.List<org.meteoinfo.table.DataColumn> cols,
                                                           int month)
                                                    throws java.lang.Exception
        Average month by year
        参数:
        cols - The data columns
        month - The month
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_YearMonth

        public org.meteoinfo.table.DataTable sum_YearMonth​(java.util.List<org.meteoinfo.table.DataColumn> cols,
                                                           int month)
                                                    throws java.lang.Exception
        Sum month by year
        参数:
        cols - The data columns
        month - The month
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_Month

        public org.meteoinfo.table.DataTable ave_Month​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                throws java.lang.Exception
        Average month by month
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_Month

        public org.meteoinfo.table.DataTable sum_Month​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                throws java.lang.Exception
        Summary month by month
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_Day

        public org.meteoinfo.table.DataTable ave_Day​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                              throws java.lang.Exception
        Average daily
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_Day

        public org.meteoinfo.table.DataTable sum_Day​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                              throws java.lang.Exception
        Summary daily
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_Hour

        public org.meteoinfo.table.DataTable ave_Hour​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                               throws java.lang.Exception
        Average Hourly
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_Hour

        public org.meteoinfo.table.DataTable sum_Hour​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                               throws java.lang.Exception
        Summary Hourly
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_MonthOfYear

        public org.meteoinfo.table.DataTable ave_MonthOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                      throws java.lang.Exception
        Average monthly
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_MonthOfYear

        public org.meteoinfo.table.DataTable sum_MonthOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                      throws java.lang.Exception
        Summary month of year
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_SeasonOfYear

        public org.meteoinfo.table.DataTable ave_SeasonOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                       throws java.lang.Exception
        Average seasonal
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_SeasonOfYear

        public org.meteoinfo.table.DataTable sum_SeasonOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                       throws java.lang.Exception
        Summary seasonal
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_DayOfWeek

        public org.meteoinfo.table.DataTable ave_DayOfWeek​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                    throws java.lang.Exception
        Average by day of week
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_DayOfWeek

        public org.meteoinfo.table.DataTable sum_DayOfWeek​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                    throws java.lang.Exception
        Summary by day of week
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • ave_HourOfDay

        public org.meteoinfo.table.DataTable ave_HourOfDay​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                    throws java.lang.Exception
        Average by hour of day
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • sum_HourOfDay

        public org.meteoinfo.table.DataTable sum_HourOfDay​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                    throws java.lang.Exception
        Summary by hour of day
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • getDateList

        public static java.util.List<java.time.LocalDateTime> getDateList​(java.time.LocalDateTime stdate,
                                                                          java.time.LocalDateTime enddate,
                                                                          java.lang.String tdtype,
                                                                          int timeDelt)
                                                                   throws java.io.FileNotFoundException,
                                                                          java.io.IOException,
                                                                          java.text.ParseException
        Get date list - String
        参数:
        stdate - Start date
        enddate - End date
        tdtype - Calendar type
        timeDelt - Time delta value
        返回:
        Date list
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.text.ParseException
      • timeOrder

        public TimeTableData timeOrder​(java.time.LocalDateTime stdate,
                                       java.time.LocalDateTime enddate,
                                       java.lang.String tdtype,
                                       int timeDelt)
                                throws java.io.IOException,
                                       java.io.FileNotFoundException,
                                       java.text.ParseException,
                                       java.lang.Exception
        Time order for data
        参数:
        stdate - Start date
        enddate - End date
        tdtype - Calendar type
        timeDelt - Time delta
        返回:
        Ordered data
        抛出:
        java.io.IOException
        java.io.FileNotFoundException
        java.text.ParseException
        java.lang.Exception