406,10 → 406,11 |
// on crée un arbre vide |
TreeNode root = new TreeNode(); |
root.setId("racine_obs"); |
root.setText("Tags"); |
String[] usObj = { "Tags", "racine_obs" }; |
root.setText("Projets"); |
String[] usObj = { "Projets", "racine_obs" }; |
root.setUserObject(usObj); |
arbreMotsCles.setRootNode(root); |
|
} |
|
// pour chacun des élements du tableau |
445,6 → 446,7 |
node.setChecked(false); |
Node parentNode = arbreMotsCles.getNodeById(parent); |
node.setUserObject(usObj); |
|
parentNode.appendChild(node); |
} |
} |
457,6 → 459,10 |
observationMediateur.rafraichirArbreMotsCles(arbreMotsCles); |
} |
|
if(nouvelleDonnees instanceof Observation) { |
observationMediateur.obtenirNombreObservation(); |
} |
|
} |
|
/** |
499,7 → 505,7 |
} |
|
/** |
* Met à jour les mots clés associés à une image et appelle le DAO pour |
* Met à jour les mots clés associés à une obs et appelle le DAO pour |
* synchroniser la base de données |
* |
* @param ids |
513,7 → 519,15 |
for (int i = 0; i < idsObsALier.length; i++) { |
if (cacheObservation.containsKey(idsObsALier[i])) { |
Observation o = (Observation) cacheObservation.get(idsObsALier[i]); |
o.setMotsCles(motsClesEnCours); |
|
String motsCles = o.getMotsCles(); |
|
if(!motsClesEnCours.endsWith(";") && !motsClesEnCours.startsWith(";")) { |
motsCles += ";"; |
} |
motsCles += motsClesEnCours; |
|
o.setMotsCles(motsCles); |
|
ObservationAsynchroneDAO oDao = new ObservationAsynchroneDAO(this); |
oDao.modifier(this,observationMediateur.getIdentifiant(),o); |
539,11 → 553,11 |
String id = usObj[1]; |
String parentId = ""; |
|
if (!id.equals("racine")) { |
if (!id.equals("racine_obs")) { |
String[] parentUsObj = (String[]) n.getParentNode().getUserObject(); |
parentId = parentUsObj[1]; |
} else { |
parentId = "racine"; |
parentId = "racine_obs"; |
} |
|
rafraichirArbreMotsCles(arbreMC); |
624,11 → 638,11 |
String motCle = usObj[0]; |
String id = usObj[1]; |
String parentId = ""; |
if (!id.equals("racine")) { |
if (!id.equals("racine_obs")) { |
String[] parentUsObj = (String[]) n.getParentNode().getUserObject(); |
parentId = parentUsObj[1]; |
} else { |
parentId = "racine"; |
parentId = "racine_obs"; |
} |
|
rafraichirArbreMotsCles(arbreMC); |