final Set<DegreeCurricularPlan> activeDegreeCurricularPlans =
new TreeSet<DegreeCurricularPlan>(
DegreeCurricularPlan.DEGREE_CURRICULAR_PLAN_COMPARATOR_BY_DEGREE_TYPE_AND_EXECUTION_DEGREE_AND_DEGREE_CODE);
for (final Coordinator coordinator : person.getCoordinatorsSet()) {
final ExecutionDegree executionDegree = coordinator.getExecutionDegree();
final DegreeCurricularPlan degreeCurricularPlan = executionDegree.getDegreeCurricularPlan();
if (degreeCurricularPlan.getState() == DegreeCurricularPlanState.ACTIVE) {
activeDegreeCurricularPlans.add(degreeCurricularPlan);
}
}
for (ScientificCommission commission : person.getScientificCommissionsSet()) {
ExecutionDegree executionDegree = commission.getExecutionDegree();
DegreeCurricularPlan degreeCurricularPlan = executionDegree.getDegreeCurricularPlan();
if (degreeCurricularPlan.getState() == DegreeCurricularPlanState.ACTIVE) {
activeDegreeCurricularPlans.add(degreeCurricularPlan);
}
}
return activeDegreeCurricularPlans;