Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 888 → Rev 889

/trunk/src/org/tela_botanica/del/client/utils/UtilitairesServiceResultat.java
76,7 → 76,7
}
public static List<InterventionForum> parserInterventions(JSONObject interventions, Observation observation) {
List<InterventionForum> interventionsNonTypees = new ArrayList<InterventionForum>();
HashMap<String, InterventionForum> interventionsNonTypees = new HashMap<String, InterventionForum>();
//parcourir les interventions et en faire un tableau
Iterator<String> itInterventions = interventions.keySet().iterator();
117,24 → 117,30
}
intervention.setDate(date);
interventionsNonTypees.add(intervention);
interventionsNonTypees.put(intervention.getId(), intervention);
} else {
Commentaire intervention = new Commentaire(contributeur, date, texte);
intervention.setDate(date);
interventionsNonTypees.add(intervention);
interventionsNonTypees.put(intervention.getId(), intervention);
}
}
 
Iterator<InterventionForum> itIntervention = interventionsNonTypees.iterator();
/*while (itIntervention ) {
}*/
Iterator<String> itIntervention = interventionsNonTypees.keySet().iterator();
while (itIntervention.hasNext()) {
String id = itIntervention.next();
InterventionForum intervention = interventionsNonTypees.get(id);
String idParent = intervention.getIdParent();
if (idParent != null && !idParent.equals("")) {
intervention.setParent(interventionsNonTypees.get(idParent));
}
}
return interventionsNonTypees;
List<InterventionForum> retour = new ArrayList<InterventionForum>();
retour.addAll(interventionsNonTypees.values());
return retour;
}