}
measuresToDelete.clear();
}
public boolean createTreeFromPreservationCase(PreservationCase preservationCase) {
ObjectiveTree newTree = new ObjectiveTree();
Node root = new Node();
root.setName(preservationCase.getName());
newTree.setRoot(root);
for (ControlPolicy cp : preservationCase.getControlPolicies()) {
Measure m = criteriaManager.getMeasure(cp.getMeasure().getUri());
List<String> criteriaHierarchy = criteriaManager.getCategoryHierachy(m.getUri());
Leaf leaf = createLeafInCriteriaHierarchy(newTree.getRoot(), criteriaHierarchy);
if (leaf != null) {
assignMeasureToLeaf(m, leaf);
}
log.info(criteriaHierarchy.toString());
}
nodesToDelete.add(plan.getTree().getRoot());
// set new tree as plan tree
plan.getTree().setRoot(newTree.getRoot());
// make sure all scales are set according to measurement infos
plan.getTree().adjustScalesToMeasurements();
plan.getTree().setWeightsInitialized(false);