Search in sources :

Example 11 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class UserDataWriter method getDiscrepancyList.

private ListData getDiscrepancyList() throws IOException {
    ListData discrepancies = ListData.asListData(getData(SyncDiscrepancy.DISCREPANCIES_DATANAME));
    if (needsRefresh(discrepancies)) {
        refreshDiscrepancyList();
        discrepancies = ListData.asListData(getData(SyncDiscrepancy.DISCREPANCIES_DATANAME));
    }
    return discrepancies;
}
Also used : ListData(net.sourceforge.processdash.data.ListData)

Example 12 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class SelectLabelFilter method getDefinedLabelsArray.

private JSONArray getDefinedLabelsArray(String projectRoot) {
    String dataName = DataRepository.createDataName(projectRoot, LABELS_DATA_NAME);
    SimpleData labelsValue = getDataRepository().getSimpleValue(dataName);
    ListData list = ListData.asListData(labelsValue);
    JSONArray result = new JSONArray();
    try {
        result.addAll(Globsearch.getTags(list));
        Collections.sort(result, String.CASE_INSENSITIVE_ORDER);
    } catch (Throwable t) {
    // the Globsearch.getTags() method was added in PD 1.14.5.  In
    // earlier versions, this will throw an exception.  Gracefully
    // degrade and diable autocompletion support.
    }
    return result;
}
Also used : JSONArray(org.json.simple.JSONArray) SimpleData(net.sourceforge.processdash.data.SimpleData) ListData(net.sourceforge.processdash.data.ListData)

Example 13 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class UserDataWriter method writeDiscrepancies.

private void writeDiscrepancies(XmlSerializer ser) throws IOException {
    ListData discrepancies = getDiscrepancyList();
    if (discrepancies != null && discrepancies.size() > 1) {
        DiscrepancyWriter dw = new DiscrepancyWriter(ser);
        for (int i = 1; i < discrepancies.size(); i++) {
            SyncDiscrepancy d = (SyncDiscrepancy) discrepancies.get(i);
            d.visit(dw);
        }
    }
}
Also used : ListData(net.sourceforge.processdash.data.ListData)

Example 14 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class DefectAnalysisPage method writeCumulativePercentArgs.

private void writeCumulativePercentArgs(String listName, String titleKey, String dataName) {
    ListData allPhases = getProcessList("Phase_List");
    ListData developmentPhases = getProcessList(listName);
    out.println("qf=" + PATH_TO_REPORTS + "compProj.rpt");
    out.print("title=");
    out.println(resources.getString(titleKey));
    out.print("units=");
    out.println(resources.getString("Percent_Units"));
    for (int i = 0; i < developmentPhases.size(); i++) {
        String num = Integer.toString(developmentPhases.size() - i);
        String phaseName = (String) developmentPhases.get(i);
        String displayName = Translator.translate(phaseName);
        out.print("h" + num + "=");
        out.println(displayName);
        out.println("f" + num + "=100%");
        out.print("d" + num + "=");
        out.println(getCumPhaseSumPct(allPhases, phaseName, dataName));
    }
}
Also used : ListData(net.sourceforge.processdash.data.ListData)

Example 15 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class DefectAnalysisPage method writeDRLArgs.

public void writeDRLArgs() {
    ListData qualityPhases = getProcessList("Quality_Phase_List");
    String lastFailurePhase = Translator.translate((String) qualityPhases.get(qualityPhases.size() - 1));
    out.println("qf=" + PATH_TO_REPORTS + "compProj.rpt");
    out.print("title=");
    out.println(resources.getString("Defects.Leverage.Title"));
    out.print("headerComment=");
    out.println(resources.format("Defects.Leverage.Comment_FMT", lastFailurePhase));
    out.print("h1=");
    out.println(lastFailurePhase);
    out.println("d1=1.0  /* [ignored but necessary] */");
    for (int i = 0; i < qualityPhases.size() - 1; i++) {
        String num = Integer.toString(qualityPhases.size() - i);
        String phaseName = (String) qualityPhases.get(i);
        String displayName = Translator.translate(phaseName);
        out.println("h" + num + "=" + displayName);
        out.println("d" + num + "=" + phaseName + "/DRL");
    }
}
Also used : ListData(net.sourceforge.processdash.data.ListData)

Aggregations

ListData (net.sourceforge.processdash.data.ListData)129 SimpleData (net.sourceforge.processdash.data.SimpleData)20 ArrayList (java.util.ArrayList)18 List (java.util.List)16 Iterator (java.util.Iterator)15 StringData (net.sourceforge.processdash.data.StringData)15 EVTaskListData (net.sourceforge.processdash.ev.EVTaskListData)9 Map (java.util.Map)8 HashSet (java.util.HashSet)7 DashHierarchy (net.sourceforge.processdash.hier.DashHierarchy)6 IOException (java.io.IOException)5 HashMap (java.util.HashMap)5 LinkedList (java.util.LinkedList)5 DoubleData (net.sourceforge.processdash.data.DoubleData)5 PropertyKey (net.sourceforge.processdash.hier.PropertyKey)5 LocalizedString (net.sourceforge.processdash.util.LocalizedString)5 NodeList (org.w3c.dom.NodeList)5 Date (java.util.Date)4 EVTaskList (net.sourceforge.processdash.ev.EVTaskList)4 Element (org.w3c.dom.Element)4