Package net.sourceforge.processdash.data.util

Examples of net.sourceforge.processdash.data.util.ResultSet$RSXYDataSource


    @Override
    protected void writeHeader() {}

    @Override
    protected void writeContents() throws IOException {
        ResultSet resultSet = getResultSet();

        String format = getParameter(FORMAT_PARAM);
        if (FORMAT_XML.equals(format))
            writeXml(resultSet);
        else
View Full Code Here


    private ResultSet getResultSet() {
        // get the data
        if (parameters.get("h0") == null)
            parameters.put("h0", "Project/Task");
        ResultSet tableData = ResultSet.get(getDataRepository(), parameters,
            getPrefix(), getPSPProperties());
        if (parameters.get("transpose") != null)
            tableData = tableData.transpose();

        return tableData;
    }
View Full Code Here

            return;
        }

        List projectPaths = getProjectPaths();
       
        ResultSet data = ResultSet.get(getDataRepository(), parameters,
                "/To Date/PSP/All", getPSPProperties());
       
        adjustDataAndPaths(projectPaths, data);
       
        String studentName = getOwner();
View Full Code Here

        // if no items were present in the "[BLANK]" category, don't show it.
        int len = histogram.length;
        if (histogram[len-1] == 0)
            len--;
       
        ResultSet result = new ResultSet(len, 1);
        result.setColName(0, "");
        result.setColName(1, "Total # Items");

        for (int i = 0; i < len; i++) {
            result.setRowName(i + 1, SIZE_NAMES.get(i));
            result.setData(i + 1, 1, new DoubleData(histogram[i]));
        }
        this.data = result;
    }
View Full Code Here

    }



    private void printDataTable(ProbeData histData, boolean full) {
        ResultSet resultSet = histData.getResultSet();
        int numRows = resultSet.numRows();

        if (numRows == 0) {
            out.print("<p>");
            out.print(resources.getHTML("HistData.No_Data_Message"));
            out.println("</p>");
            return;
        }

        if (full) {
            out.print("<p>");
            out.print(resources.getString("HistData.Data_Table_Header_HTML"));
            out.print("</p>");
        }

        String timeFootnote = getTimeFootnote(histData);
        out.print("<table id='histData' border style='margin-left:1cm'><tr><th>");
        out.print(resources.getHTML("Project_Task"));
        for (int c = 1;  c <= ProbeData.EXCLUDE;   c++) {
            out.print("</th><th>");
            String colName = resultSet.getColName(c);
            String displayName;
            try {
                String key = "HistData.Columns."+colName.replace(' ', '_');
                displayName = resources.getString(key);
            } catch (Exception e) {
                displayName = Translator.translate(colName);
            }
            out.print(esc(displayName));
            if (c == ProbeData.EST_TIME || c == ProbeData.ACT_TIME)
                out.print(timeFootnote);
            else if (c == ProbeData.EXCLUDE && !histData.isReportMode())
                out.print(EXCLUDE_ALL_CHECKBOX);
        }
        out.println("</th></tr>");

        for (int r = 1;   r <= resultSet.numRows();   r++) {
            out.print("<tr>");
            out.print("<td nowrap>");
            out.print(esc(resultSet.getRowName(r)));
            for (int c = 1;   c < ProbeData.EXCLUDE;   c++) {
                out.print("</td><td align=center>");
                out.print(resultSet.format(r, c));
            }
            out.println("<td align=center>");
            if (histData.isReportMode()) {
                if (resultSet.getData(r, ProbeData.EXCLUDE) != null)
                    out.print("<b style='font-family: sans-serif'>X</b>");
                else
                    out.print("&nbsp;");
            } else {
                printField(TASK_FIELD+r, histData.getRowId(r));
                out.println("<input type=checkbox name='"+EXCLUDE_FIELD+r+"'");
                if (resultSet.getData(r, ProbeData.EXCLUDE) != null)
                    out.print(" checked");
                out.print(">");
            }
            out.println("</td></tr>");
        }
View Full Code Here


    @Override
    protected String buildXYChartParams() {
        if (getRating() > CANNOT_CALCULATE) {
            ResultSet chartData = getChartData();
            String chartDataName = histData.storeChartData(chartData, this);

            StringBuffer url = new StringBuffer();
            addParam(url, "useData", chartDataName);
            addParam(url, "title", getMethodName());
View Full Code Here

            return null;
    }

    protected ResultSet getChartData() {
        // make a copy of the data that only includes the columns of interest
        ResultSet chartData = histData.getResultSet().pluckColumns(xColumn,
            methodPurpose.getYColumn());
        // discard any rows that have zeros in the X or Y value
        for (int row = chartData.numRows(); row > 0; row--) {
            if (!goodChartData(chartData.getData(row, 1))
                    || !goodChartData(chartData.getData(row, 2)))
                chartData.removeRow(row);
        }
        return chartData;
    }
View Full Code Here

    protected void addTrendParam(StringBuffer url) {
        url.append("&trend=average");
    }

    protected String getTutorialLink() {
        ResultSet rs = histData.getResultSet();
        return Tutorial.getAverageLink
            (getPurposeLabel(), getMethodLetter(),
             rs.getColName(xColumn),
             rs.getColName(methodPurpose.getYColumn()),
             rs.getColName(inputColumn),
             rs.getColName(methodPurpose.getTargetColumn()));
    }
View Full Code Here

    protected void addTrendParam(StringBuffer url) {
        url.append("&trend=regress");
    }

    protected String getTutorialLink() {
        ResultSet rs = histData.getResultSet();
        return Tutorial.getRegressLink
            (getPurposeLabel(), getMethodLetter(),
             rs.getColName(xColumn),
             rs.getColName(methodPurpose.getYColumn()),
             rs.getColName(inputColumn),
             rs.getColName(methodPurpose.getTargetColumn()),
             RANGE_PERCENT);
    }
View Full Code Here

        DefectAnalyzer.refineParams(parameters, getDataContext());
        DefectAnalyzer.run(getPSPProperties(), getDataRepository(),
                           getPrefix(), parameters, this);

        int numRows = defectData.size();
        data = new ResultSet(numRows, 1);
        data.setColName(0, resources.getString("Defect_Type"));
        data.setColName(1, resources.getString(KEYS[reportType] + "_Axis"));
        if (parameters.get("title") == null)
            parameters.put
                ("title", resources.getString(KEYS[reportType] + "_Title"));
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.data.util.ResultSet$RSXYDataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.