}
log.debug("Adding potential and range of node " + selectedCriteriaSet.getName());
// Create data object
PotentialToRangeData data = new PotentialToRangeData();
// Title
data.setTitle("Potential Impact Range to Actual Impact of " + selectedCriteriaSet.getName());
data.setSourcesTitle("Structural nodes");
data.setFormatString("%.3f");
// Label of series
ArrayList<String> seriesLabels = new ArrayList<String>();
seriesLabels.add("Potential Impact Range");
seriesLabels.add("Actual Impact");
// Data lists for structural nodes
ArrayList<String> sourceLabels = new ArrayList<String>();
ArrayList<Double> potentialSeries = new ArrayList<Double>();
ArrayList<Double> rangeSeries = new ArrayList<Double>();
// Get root of tree
CriteriaNode treeRoot = selectedCriteriaSet.getCriteriaTreeRoot();
// Add data of root
sourceLabels.add(treeRoot.getName());
potentialSeries.add(treeRoot.getImportanceFactorSIF4());
rangeSeries.add(treeRoot.getImportanceFactorSIF6());
// Add data of other structural nodes
for (CriteriaTreeNode criteriaTreeNode : treeRoot.getAllSuccessiveTreeNodes()) {
if (criteriaTreeNode instanceof CriteriaNode) {
CriteriaNode criteriaNode = (CriteriaNode) criteriaTreeNode;
sourceLabels.add(criteriaNode.getName());
potentialSeries.add(criteriaNode.getImportanceFactorSIF4());
rangeSeries.add(criteriaNode.getImportanceFactorSIF6());
}
}
// Set data
data.setSeriesLabels(seriesLabels);
data.setSourceLabels(sourceLabels);
data.setPotentialSeries(potentialSeries);
data.setRangeSeries(rangeSeries);
return data;
}