private void procesarResoluciones() { this.lstPorcentajeCalificaciones = new ArrayList<>(); this.lstTemas = new ArrayList<>(); this.lstDificultad = new ArrayList<>(); this.lstPreguntas = new ArrayList<>(); intTotalResoluciones = 0; intTotalAprobados = 0; intTotalAnulados = 0; intTotalRespuestas = 0; intTotalNoCorregidos = 0; for (Resolucion resolucion : colResoluciones) { try { if (resolucion.isBlnAnulada()) { intTotalAnulados++; continue; } if (!resolucion.esCorreccionCompleta()) { intTotalNoCorregidos++; continue; } boolean esAprobada = resolucion.estaAprobada(); if ((esProcesarSoloAprobadas && !esAprobada) || (esProcesarSoloDesaprobadas && esAprobada)) { continue; } intTotalResoluciones++; lstPorcentajeCalificaciones.add(resolucion.getPorcentajeAprobacion()); if (esAprobada) { intTotalAprobados++; } for (Respuesta respuesta : resolucion.getColRespuestas()) { intTotalRespuestas++; Categoria pregunta = new Categoria(respuesta.getPregunta().getStrEnunciado()); int indexPregunta = lstPreguntas.indexOf(pregunta); if (indexPregunta != -1) { pregunta = lstPreguntas.get(indexPregunta); } else { lstPreguntas.add(pregunta); } Categoria tema = null; if (respuesta.getPregunta().getTema() != null && respuesta.getPregunta().getTema().getIntTemaId() > 0) { tema = new Categoria(respuesta.getPregunta().getTema().getStrNombre()); int indexTema = lstTemas.indexOf(tema); if (indexTema != -1) { tema = lstTemas.get(indexTema); } else { lstTemas.add(tema); } } Categoria dificultad = new Categoria(respuesta.getPregunta().getStrNivel()); int indexDificultad = lstDificultad.indexOf(dificultad); if (indexDificultad != -1) { dificultad = lstDificultad.get(indexDificultad); } else { lstDificultad.add(dificultad); } if (!respuesta.fueRespondida()) { if (tema != null) tema.cantNoRespondidas++; dificultad.cantNoRespondidas++; pregunta.cantNoRespondidas++; continue; } int esCorrecta = respuesta.esCorrecta(); // Datos para filtros de tema switch (esCorrecta) { case 1: // Contestó bien la pregunta if (tema != null) tema.cantCorrectas++; dificultad.cantCorrectas++; pregunta.cantCorrectas++; break; case 0: // Contestó mal if (tema != null) tema.cantIncorrectas++; dificultad.cantIncorrectas++; pregunta.cantIncorrectas++; break; case 2: // Pregunta de desarrollo incompleta if (tema != null) tema.cantIncompletas++; dificultad.cantIncompletas++; pregunta.cantIncompletas++; break; } } } catch (Exception ex) { ex.printStackTrace(); System.err.println(ex.getMessage()); } } }