Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.DataContext


        return items;
    }


    private void writeTable() throws IOException {
        DataContext dataContext = getDataContext();
       
        // retrieve the heading and label the user wants displayed
        String heading = getParameter(HEADING_PARAM);
        String label = getParameter(LABEL_PARAM);

        // retrieve the list of columns the user wants to display
        List columns = new ArrayList();
        for (int i = 0; i < COLUMNS.length; i++) {
            if (COLUMNS[i].isShowing(parameters))
                columns.add(COLUMNS[i]);
        }
        if (dataContext.getSimpleValue("Rollup Tag") != null)
            columns.remove(MetricsTableColumn.TO_DATE);
        if (columns.isEmpty()) {
            out.write("<!-- no columns selected;  no table to display -->\n\n");
            return;
        }
View Full Code Here


    private static final Resources resources = Resources
            .getDashBundle("Analysis.MetricsPhaseTable");

    protected void writeContents() throws IOException {
        DataContext dataContext = getDataContext();

        // retrieve the heading and label the user wants displayed
        String heading = getParameter(HEADING_PARAM);
        String label = getParameter(LABEL_PARAM);

        // retrieve the list of columns the user wants to display
        List columns = new ArrayList();
        for (int i = 0; i < COLUMNS.length; i++) {
            if (COLUMNS[i].isShowing(parameters))
                columns.add(COLUMNS[i]);
        }
        if (dataContext.getSimpleValue("Rollup Tag") != null) {
            columns.remove(MetricsTableColumn.TO_DATE);
            columns.remove(MetricsTableColumn.TO_DATE_PCT);
        }
        if (columns.isEmpty()) {
            out.write("<!-- no columns selected;  no table to display -->\n\n");
View Full Code Here

    @Override
    protected void writeContents() throws IOException {
        out.println(HEADER);
       
        DataContext data = getDataContext();
        ProcessUtil process = new ProcessUtil(data);
        List phases = process.getProcessListPlain("Phase_List");
        phases = process.filterPhaseList(phases);

        List<String> missingPhases = new ArrayList<String>();
        for (Iterator i = phases.iterator(); i.hasNext();) {
            String phase = (String) i.next();
            if (getBoolParam("Check" + phase)) {
                SimpleData phaseTime = data.getSimpleValue(phase + "/Time");
                if (phaseTime == null || !phaseTime.test())
                    missingPhases.add(phase);
            }
        }
       
View Full Code Here

    private void writeXmlFile(File outputFile, List projectPaths,
            ResultSet data) throws IOException {
        OutputStream out = new BufferedOutputStream(new FileOutputStream(
                outputFile));
        DataContext profileData = getDataRepository().getSubcontext(
            getStudentProfilePath());
        StudataExporterXml.writeXmlData(out, profileData, projectPaths, data);
        out.close();
    }
View Full Code Here

    @Override
    protected void buildData() {
        int[] histogram = new int[SIZE_NAMES.size()];

        DataContext data = getDataContext();
        ListData partsAdditions = ListData.asListData(data
                .getSimpleValue(PARTS_LIST));
        if (partsAdditions != null) {
            for (int i = 0; i < partsAdditions.size(); i++) {
                String path = asString(partsAdditions.get(i));
                double itemCount = asDoubleData(data.getSimpleValue(path
                        + METHODS));
                String relSize = asString(data.getSimpleValue(path + REL_SIZE));
                if (!StringUtils.hasValue(relSize) && itemCount == 0)
                    continue;

                int relSizePos = SIZE_NAMES.indexOf(relSize);
                if (relSizePos == -1)
View Full Code Here

    @Override
    protected void writeContents() throws IOException {
        // First, look at the project which is invoking this script, and see
        // if it is preceded by a PSP0 program. If not, print nothing and exit.
        DataContext data = getDataContext();
        SimpleData prevProgramVal = data.getSimpleValue("Previous_Program");
        if (!hasValue(prevProgramVal))
            return;

        String prevProgram = prevProgramVal.format();
        SimpleData psp0tag = data.getSimpleValue(prevProgram + "/PSP0");
        if (!hasValue(psp0tag))
            return;

        // Next, check to see if size data has been entered for the preceding
        // PSP0 program. If it has, print nothing and exit.
        SimpleData psp0size = data.getSimpleValue(prevProgram
                + "/New & Changed LOC");
        if (hasValue(psp0size))
            return;

        // At this point, we know this project is preceded by a PSP0 program
        // that has no size data. However, we don't want to print any warnings
        // during the Planning phase of this project, because that would
        // confuse students unnecessarily.  So we look for several signs
        // indicating that they might be in or approaching the Postmortem
        // phase of this project.
        if (hasValue(data.getSimpleValue("Test/Time"))
                || hasValue(data.getSimpleValue("Postmortem/Time"))
                || hasValue(data.getSimpleValue("New & Changed LOC"))) {
            printSizeWarningBlock(prevProgram);
        }
    }
View Full Code Here

    private boolean checkValues() {
        String owner = getOwner();
        if (owner == null || owner.trim().length() == 0)
            return false;

        DataContext c = getDataContext();
        for (String name : NAMES_TO_CHECK) {
            SimpleData sd = c.getSimpleValue(name);
            if (sd == null || !sd.test() || sd.format().trim().length() == 0)
                return false;
        }

        c.putValue("../Student_Profile_Complete", ImmutableDoubleData.TRUE);
        if (c.getSimpleValue("Completed") == null)
            c.putValue("Completed", new DateData());

        return true;
    }
View Full Code Here

public class ProbeConsistencyCheck extends PspForEngBase {

    @Override
    protected void writeContents() throws IOException {
        DataContext data = getDataContext();
       
        out.println(HEADER);
        maybePrintOutputMismatch(data, "PROBE_Size_Output_Mismatch",
            "Estimated Added & Modified Size", SIZE_FMT, "Size_Mismatch_FMT");
        maybePrintOutputMismatch(data, "PROBE_Time_Output_Mismatch",
View Full Code Here

        else
            return null;
    }

    private String getPspLevel() {
        DataContext data = getDataContext();
        for (String level : PSP_LEVELS) {
            if (data.getSimpleValue(level) != null)
                return level.toLowerCase();
        }
        return null;
    }
View Full Code Here

       
        out.write("</td></tr></table>\n\n");
    }

    private TreeSet getSortedSnippets() {
        DataContext ctx = getDataContext();
        String[] deny = (String[]) parameters.get("deny_ALL");
       
        Set allSnippets = SnippetDefinitionManager.getAllSnippets();
        TreeSet snippets = new TreeSet();
        for (Iterator i = allSnippets.iterator(); i.hasNext();) {
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.data.DataContext

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.