use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.
the class DirectTimeMemberTrendChartData method recalc.
public void recalc() {
clearSeries();
// see if the user has permission to view personal data in this chart
UserFilter f = GroupPermission.getGrantedMembers(permissionID);
if (f == null)
return;
EVTaskListFilter pf = new EVTaskListGroupFilter(f);
EVSchedule schedule = rollup.getSchedule();
series.add(schedule.getPlanTrendChartSeries());
MemberChartNameHelper nameHelper = new MemberChartNameHelper(rollup);
for (int i = 0; i < rollup.getSubScheduleCount(); i++) {
EVTaskList tl = rollup.getSubSchedule(i);
String personalDataID = tl.getPersonalDataID();
if (personalDataID != null && !pf.include(personalDataID))
continue;
EVSchedule subschedule = tl.getSchedule();
String seriesName = nameHelper.get(tl);
maybeAddSeries(subschedule.getActualTimeTrendChartSeries(seriesName));
}
}
use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.
the class EarnedValueMemberTrendChartData method recalc.
public void recalc() {
clearSeries();
// see if the user has permission to view personal data in this chart
UserFilter f = GroupPermission.getGrantedMembers(permissionID);
if (f == null)
return;
EVTaskListFilter pf = new EVTaskListGroupFilter(f);
EVSchedule schedule = rollup.getSchedule();
double mult = 100.0 / schedule.getMetrics().totalPlan();
series.add(schedule.getPlanTrendChartSeries());
MemberChartNameHelper nameHelper = new MemberChartNameHelper(rollup);
for (int i = 0; i < rollup.getSubScheduleCount(); i++) {
EVTaskList tl = rollup.getSubSchedule(i);
String personalDataID = tl.getPersonalDataID();
if (personalDataID != null && !pf.include(personalDataID))
continue;
EVSchedule subschedule = tl.getSchedule();
String seriesName = nameHelper.get(tl);
maybeAddSeries(subschedule.getActualValueTrendChartSeries(seriesName, mult));
}
}
use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.
the class EVConfidenceIntervalUtils method makeHistoricalConfidenceIntervals.
/**
* Analyze the data in a list of earned value schedules, produce confidence
* intervals representing this historical dataset, and return the results of
* this analysis as a simple string that can be persisted for later use.
*
* @param ctx
* the dashboard context
* @param taskListNames
* the names of earned value schedules that should be
* included in the analysis
* @return a string for persistently storing the results of this analysis
*/
public static String makeHistoricalConfidenceIntervals(DashboardContext ctx, Iterable<String> taskListNames) {
if (taskListNames == null)
return null;
StringBuffer result = new StringBuffer();
result.append(//
"<" + HIST_INTERVALS_TAG + " " + VERSION_ATTR + "='1'>");
List<EVTaskList> taskLists = new ArrayList<EVTaskList>();
for (String taskListName : taskListNames) {
EVTaskList tl = EVTaskList.openExisting(taskListName, ctx.getData(), ctx.getHierarchy(), ctx.getCache(), false);
if (tl == null)
continue;
tl.setDependencyCalculator(null);
tl.recalc();
taskLists.add(tl);
result.append("<" + HIST_TASK_LIST_TAG + " " + NAME_ATTR + "='").append(//
XMLUtils.escapeAttribute(taskListName)).append("' />");
}
if (taskLists.isEmpty())
return null;
EVTimeErrConfidenceInterval time = new EVTimeErrConfidenceInterval(taskLists);
if (time.getViability() >= ConfidenceInterval.ACCEPTABLE)
time.saveToXML(TIME_ERR_INTERVAL_TAG, result);
EVCostConfidenceInterval cost = new EVCostConfidenceInterval(taskLists.toArray());
if (cost.getViability() >= ConfidenceInterval.ACCEPTABLE)
cost.saveToXML(COST_INTERVAL_TAG, result);
result.append("</" + HIST_INTERVALS_TAG + ">");
return result.toString();
}
use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.
the class EVCostConfidenceInterval method getTasksForTaskLists.
private static List getTasksForTaskLists(Object[] taskLists) {
Map<String, EVTaskList> uniqueLists = new HashMap<String, EVTaskList>();
getUniqueTaskLists(taskLists, uniqueLists);
ArrayList result = new ArrayList();
for (EVTaskList taskList : uniqueLists.values()) {
List<EVTask> evLeaves = taskList.getFilteredLeaves(null);
result.addAll(evLeaves);
}
return result;
}
use of net.sourceforge.processdash.ev.EVTaskList in project processdash by dtuma.
the class EVTimeErrConfidenceInterval method getUniqueSchedules.
private static void getUniqueSchedules(Collection<EVTaskList> taskLists, Map<String, EVSchedule> results) {
for (EVTaskList taskList : taskLists) {
if (taskList instanceof EVTaskListRollup) {
EVTaskListRollup rollup = (EVTaskListRollup) taskList;
Collection<EVTaskList> subTaskLists = rollup.getSubSchedules();
getUniqueSchedules(subTaskLists, results);
} else {
String key = taskList.getID();
if (!StringUtils.hasValue(key))
key = taskList.getTaskListName();
results.put(key, taskList.getSchedule());
}
}
}
Aggregations