类 TableData

    • 字段概要

      字段 
      修饰符和类型 字段 说明
      protected double missingValue  
      • 从类继承的字段 org.meteoinfo.table.DataTable

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

      构造器 
      构造器 说明
      TableData()
      Constructor
      TableData​(org.meteoinfo.table.DataTable dataTable)
      Constructor
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void addColumnData​(int index, java.lang.String colName, java.lang.String dt, java.util.List<java.lang.Object> colData)
      Add column data
      void addColumnData​(java.lang.String colName, java.lang.String dt, java.util.List<java.lang.Object> colData)
      Add column data
      org.meteoinfo.table.DataTable ave_DayOfWeek​(java.util.List<org.meteoinfo.table.DataColumn> cols, java.lang.String tColName)
      Average by day of week
      org.meteoinfo.table.DataTable ave_HourOfDay​(java.util.List<org.meteoinfo.table.DataColumn> cols, java.lang.String tColName)
      Average by hour of day
      org.meteoinfo.table.DataTable ave_Month​(java.util.List<org.meteoinfo.table.DataColumn> cols, java.lang.String tColName)
      Average month by month
      org.meteoinfo.table.DataTable ave_MonthOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols, java.lang.String tColName)
      Average monthly
      org.meteoinfo.table.DataTable ave_SeasonOfYear​(java.util.List<org.meteoinfo.table.DataColumn> cols, java.lang.String tColName)
      Average seasonal
      org.meteoinfo.table.DataTable ave_stdev​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average data and calculate standard deviation
      org.meteoinfo.table.DataTable ave_Year​(java.util.List<org.meteoinfo.table.DataColumn> cols, java.lang.String tColName)
      Average year by year
      org.meteoinfo.table.DataTable average​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Average data
      java.lang.Object clone()
      Clone
      void columnToDouble​(java.lang.String colName)
      Convert a data column to double data type
      java.util.List<org.meteoinfo.table.DataRow> getDataByDayOfWeek​(int dow, java.lang.String tColName)
      Get data row list by day of week
      java.util.List<org.meteoinfo.table.DataRow> getDataByHour​(int hour, java.lang.String tColName)
      Get data row list by hour
      java.util.List<org.meteoinfo.table.DataRow> getDataByMonth​(int month, java.lang.String tColName)
      Get data row list by month
      java.util.List<org.meteoinfo.table.DataRow> getDataBySeason​(java.lang.String season, java.lang.String tColName)
      Get data row list by year
      java.util.List<org.meteoinfo.table.DataRow> getDataByYear​(int year, java.lang.String tColName)
      Get data row list by year
      java.util.List<org.meteoinfo.table.DataRow> getDataByYearMonth​(int year, int month, java.lang.String tColName)
      Get data row list by year and month
      java.util.List<org.meteoinfo.table.DataRow> getDataByYearMonth​(java.lang.String yearMonth, java.lang.String tColName)
      Get data row list by year and month
      java.util.List<org.meteoinfo.table.DataColumn> getDataColumns()
      Get data columns
      double getMissingValue()
      Get missing value
      org.meteoinfo.table.DataRow getRow​(int idx)
      Get data row
      java.lang.String getTimeColName()
      Get time column name
      java.util.List<java.lang.Double> getValidColumnValues​(java.util.List<org.meteoinfo.table.DataRow> rows, org.meteoinfo.table.DataColumn col)
      Get column values
      java.util.List<java.lang.Double> getValidColumnValues​(org.meteoinfo.table.DataColumn col)
      Get column values
      java.util.List<java.lang.String> getYearMonths​(java.lang.String tColName)
      Get year months
      java.util.List<java.lang.Integer> getYears​(java.lang.String tColName)
      Get years
      void join​(TableData tableData, java.lang.String colName)
      Join data table
      void join​(TableData tableData, java.lang.String thisColName, java.lang.String otherColName)
      Join data table
      void readASCIIFile​(java.lang.String fileName)
      Read data table from ASCII file
      void readASCIIFile​(java.lang.String fileName, java.lang.String formatSpec)
      Read data table from ASCII file
      void readASCIIFile​(java.lang.String fileName, java.lang.String delimiter, int headerLines, java.lang.String formatSpec, java.lang.String encoding)
      Read data table from ASCII file
      void readASCIIFile​(java.lang.String fileName, java.util.List<org.meteoinfo.table.DataColumn> dataColumns)
      Read data table from ASCII file
      void removeColumn​(java.lang.String colName)
      Remove a column
      void setColumnData​(java.lang.String colName, java.util.List<java.lang.Object> values)
      Set column data
      void setMissingValue​(double value)
      Set missing value
      TableData sqlSelect​(java.lang.String expression)
      SQL select
      org.meteoinfo.table.DataTable statistics()
      Get average data table
      org.meteoinfo.table.DataTable statistics​(java.util.List<org.meteoinfo.table.DataColumn> dataColumns)
      Get average data table
      org.meteoinfo.table.DataTable sum​(java.util.List<org.meteoinfo.table.DataColumn> cols)
      Summary data
      org.meteoinfo.table.DataTable toSingleRowTable()
      Convert a multi rows data table to single row data table
      org.meteoinfo.table.DataTable toSingleRowTable​(org.meteoinfo.table.DataTable inTable)
      Convert a multi rows data table to single row data table
      org.meteoinfo.table.DataTable toSingleRowTable​(org.meteoinfo.table.DataTable inTable, java.lang.String firstColName, java.lang.String firstColValue)
      Convert a multi rows data table to single row data table
      • 从类继承的方法 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
    • 字段详细资料

      • missingValue

        protected double missingValue
    • 构造器详细资料

      • TableData

        public TableData()
        Constructor
      • TableData

        public TableData​(org.meteoinfo.table.DataTable dataTable)
        Constructor
        参数:
        dataTable - The data table
    • 方法详细资料

      • getTimeColName

        public java.lang.String getTimeColName()
        Get time column name
        返回:
        Time column name
      • getMissingValue

        public double getMissingValue()
        Get missing value
        返回:
        Missing value
      • setMissingValue

        public void setMissingValue​(double value)
        Set missing value
        参数:
        value - Missing value
      • addColumnData

        public void addColumnData​(java.lang.String colName,
                                  java.lang.String dt,
                                  java.util.List<java.lang.Object> colData)
                           throws java.lang.Exception
        Add column data
        覆盖:
        addColumnData 在类中 org.meteoinfo.table.DataTable
        参数:
        colName - Column name
        dt - Data type string
        colData - The column data
        抛出:
        java.lang.Exception
      • addColumnData

        public void addColumnData​(int index,
                                  java.lang.String colName,
                                  java.lang.String dt,
                                  java.util.List<java.lang.Object> colData)
                           throws java.lang.Exception
        Add column data
        参数:
        index - Column index
        colName - Column name
        dt - Data type string
        colData - The column data
        抛出:
        java.lang.Exception
      • removeColumn

        public void removeColumn​(java.lang.String colName)
        Remove a column
        参数:
        colName - Column name
      • getRow

        public org.meteoinfo.table.DataRow getRow​(int idx)
        Get data row
        参数:
        idx - Index
        返回:
        Data row
      • getDataColumns

        public java.util.List<org.meteoinfo.table.DataColumn> getDataColumns()
        Get data columns
        返回:
        Data columns
      • getValidColumnValues

        public java.util.List<java.lang.Double> getValidColumnValues​(org.meteoinfo.table.DataColumn col)
        Get column values
        参数:
        col - The data column
        返回:
        Value list
      • getValidColumnValues

        public java.util.List<java.lang.Double> getValidColumnValues​(java.util.List<org.meteoinfo.table.DataRow> rows,
                                                                     org.meteoinfo.table.DataColumn col)
        Get column values
        参数:
        rows - The data row list
        col - The data column
        返回:
        Column values
      • setColumnData

        public void setColumnData​(java.lang.String colName,
                                  java.util.List<java.lang.Object> values)
        Set column data
        覆盖:
        setColumnData 在类中 org.meteoinfo.table.DataTable
        参数:
        colName - Column name
        values - Values
      • columnToDouble

        public void columnToDouble​(java.lang.String colName)
        Convert a data column to double data type
        参数:
        colName - The data column name
      • average

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

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

        public org.meteoinfo.table.DataTable ave_stdev​(java.util.List<org.meteoinfo.table.DataColumn> cols)
                                                throws java.lang.Exception
        Average data and calculate standard deviation
        参数:
        cols - The data columns
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • statistics

        public org.meteoinfo.table.DataTable statistics​(java.util.List<org.meteoinfo.table.DataColumn> dataColumns)
                                                 throws java.lang.Exception
        Get average data table
        参数:
        dataColumns -
        返回:
        Average data table
        抛出:
        java.lang.Exception
      • statistics

        public org.meteoinfo.table.DataTable statistics()
                                                 throws java.lang.Exception
        Get average data table
        返回:
        Average data table
        抛出:
        java.lang.Exception
      • readASCIIFile

        public void readASCIIFile​(java.lang.String fileName,
                                  java.lang.String formatSpec)
                           throws java.io.FileNotFoundException,
                                  java.io.IOException,
                                  java.lang.Exception
        Read data table from ASCII file
        参数:
        fileName - File name
        formatSpec - Format specifiers string
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • readASCIIFile

        public void readASCIIFile​(java.lang.String fileName,
                                  java.lang.String delimiter,
                                  int headerLines,
                                  java.lang.String formatSpec,
                                  java.lang.String encoding)
                           throws java.io.FileNotFoundException,
                                  java.io.IOException,
                                  java.lang.Exception
        Read data table from ASCII file
        参数:
        fileName - File name
        delimiter - Delimiter
        headerLines - Number of lines to skip at begining of the file
        formatSpec - Format specifiers string
        encoding - Fle encoding
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • readASCIIFile

        public void readASCIIFile​(java.lang.String fileName,
                                  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
        dataColumns - Data columns
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • readASCIIFile

        public void readASCIIFile​(java.lang.String fileName)
                           throws java.io.FileNotFoundException,
                                  java.io.IOException,
                                  java.lang.Exception
        Read data table from ASCII file
        参数:
        fileName - File name
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • toSingleRowTable

        public org.meteoinfo.table.DataTable toSingleRowTable​(org.meteoinfo.table.DataTable inTable,
                                                              java.lang.String firstColName,
                                                              java.lang.String firstColValue)
                                                       throws java.lang.Exception
        Convert a multi rows data table to single row data table
        参数:
        inTable - Input data table - multi rows
        firstColName - The new first column name
        firstColValue - The new first column value
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • toSingleRowTable

        public org.meteoinfo.table.DataTable toSingleRowTable​(org.meteoinfo.table.DataTable inTable)
                                                       throws java.lang.Exception
        Convert a multi rows data table to single row data table
        参数:
        inTable - Input data table - multi rows
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • toSingleRowTable

        public org.meteoinfo.table.DataTable toSingleRowTable()
                                                       throws java.lang.Exception
        Convert a multi rows data table to single row data table
        返回:
        Result data table
        抛出:
        java.lang.Exception
      • join

        public void join​(TableData tableData,
                         java.lang.String colName)
        Join data table
        参数:
        tableData - The input table data
        colName - The column name for join
      • join

        public void join​(TableData tableData,
                         java.lang.String thisColName,
                         java.lang.String otherColName)
        Join data table
        参数:
        tableData - The input table data
        thisColName - The column name for join
        otherColName - The other column name for join
      • clone

        public java.lang.Object clone()
        Clone
        覆盖:
        clone 在类中 org.meteoinfo.table.DataTable
        返回:
        Cloned TableData object
      • getYears

        public java.util.List<java.lang.Integer> getYears​(java.lang.String tColName)
        Get years
        参数:
        tColName - Time column name
        返回:
        Year list
      • getYearMonths

        public java.util.List<java.lang.String> getYearMonths​(java.lang.String tColName)
        Get year months
        参数:
        tColName - Time column name
        返回:
        Year month list
      • getDataByYear

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

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

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

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

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

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

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

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

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

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

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

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

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

        public TableData sqlSelect​(java.lang.String expression)
        SQL select
        覆盖:
        sqlSelect 在类中 org.meteoinfo.table.DataTable
        参数:
        expression - SQL expression
        返回:
        Result TableData