22,7 → 22,6 |
import org.tela_botanica.client.modeles.ListeReferentielCommuneAsynchroneDAO; |
import org.tela_botanica.client.modeles.ListeReferentielNomAsynchroneDAO; |
import org.tela_botanica.client.modeles.MotsClesAsynchroneDAO; |
import org.tela_botanica.client.modeles.MotsClesObsAsynchronesDAO; |
import org.tela_botanica.client.modeles.NomRetenuAsynchroneDao; |
import org.tela_botanica.client.modeles.NombreObservationAsynchroneDAO; |
import org.tela_botanica.client.modeles.Observation; |
33,6 → 32,7 |
import com.google.gwt.json.client.JSONArray; |
import com.google.gwt.json.client.JSONObject; |
import com.google.gwt.maps.client.geom.LatLng; |
import com.google.gwt.user.client.Window; |
import com.gwtext.client.data.Node; |
import com.gwtext.client.data.Tree; |
import com.gwtext.client.widgets.map.LatLonPoint; |
132,7 → 132,6 |
|
|
// on les crée un DAO auquel on les transmet et qui demande le nombre d'images correspondantes (pour les pages) |
|
NombreObservationAsynchroneDAO noaDAO = new NombreObservationAsynchroneDAO(this) ; |
noaDAO.obtenirNombreObservation(r, observationMediateur.getIdentifiant(), criteres) ; |
|
370,25 → 369,6 |
|
} |
|
public void obtenirNuageMotsCles(Rafraichissable r) { |
|
MotsClesObsAsynchronesDAO mcoaDAO = new MotsClesObsAsynchronesDAO(this); |
mcoaDAO.obtenirMotsClesObservations(r); |
|
} |
|
|
|
public void ajouterMotsCles(Rafraichissable r, |
String numObsApl, String motsAAjouter) { |
|
MotsClesObsAsynchronesDAO moadDAO = new MotsClesObsAsynchronesDAO(this); |
moadDAO.ajouterMotsCles(r,numObsApl,motsAAjouter); |
|
} |
|
|
|
public void analyserHistorique(Rafraichissable r,String anum) { |
|
NomRetenuAsynchroneDao nraDAO = new NomRetenuAsynchroneDao(this); |
426,9 → 406,9 |
if (taillemax == 0) { |
// on crée un arbre vide |
TreeNode root = new TreeNode(); |
root.setId("racine"); |
root.setId("racine_obs"); |
root.setText("Tags"); |
String[] usObj = { "Tags", "racine" }; |
String[] usObj = { "Tags", "racine_obs" }; |
root.setUserObject(usObj); |
arbreMotsCles.setRootNode(root); |
} |
450,7 → 430,7 |
|
// et on construit l'arbre à partir de la racine (qui est |
// toujoursl e premier élément) |
if (id_noeud.equals("racine")) { |
if (id_noeud.equals("racine_obs")) { |
TreeNode root = new TreeNode(); |
root.setId(id_noeud); |
root.setText(mot_cle); |
470,8 → 450,9 |
} |
} |
} |
|
// enfin on met à jour l'arbre des mots clés contenu dans le modèle |
rafraichirArbreMotsCles(arbreMotsCles); |
//rafraichirArbreMotsCles(arbreMotsCles); |
// et on notifie le médiateur de la mise à jour en lui passant une |
// copie des données |
observationMediateur.rafraichirArbreMotsCles(arbreMotsCles); |
486,7 → 467,6 |
* le nouvel arbre de mots clés |
*/ |
public void rafraichirArbreMotsCles(Object o) { |
observationMediateur.transmettreDonnees(o); |
arbreMotsCles = (com.gwtext.client.data.Tree) o; |
} |
|
530,11 → 510,10 |
* @param arbreMC |
* l'arbre de mots clés en cours |
*/ |
public void mettreAjourMotsCles(String[] ids, String motsClesEnCours, |
com.gwtext.client.data.Tree arbreMC) { |
for (int i = 0; i < ids.length; i++) { |
if (cacheObservation.containsKey(ids[i])) { |
Observation o = (Observation) cacheObservation.get(ids[i]); |
public void mettreAjourMotsCles(String motsClesEnCours, String[] idsObsALier) { |
for (int i = 0; i < idsObsALier.length; i++) { |
if (cacheObservation.containsKey(idsObsALier[i])) { |
Observation o = (Observation) cacheObservation.get(idsObsALier[i]); |
o.setMotsCles(motsClesEnCours); |
|
ObservationAsynchroneDAO oDao = new ObservationAsynchroneDAO(this); |
541,8 → 520,6 |
oDao.modifier(this,observationMediateur.getIdentifiant(),o); |
} |
} |
|
rafraichirArbreMotsCles(arbreMC); |
} |
|
/** |
569,7 → 546,7 |
} else { |
parentId = "racine"; |
} |
|
|
rafraichirArbreMotsCles(arbreMC); |
|
String nouveauMotCle = "&identifiant=" + getIdentifiant() + "&motcle=" |
592,6 → 569,8 |
|
String[] usObj = (String[]) n.getUserObject(); |
String id = usObj[1]; |
|
rafraichirArbreMotsCles(arbreMC); |
|
MCDao.supprimerBaseDeDonnees(id); |
|
652,7 → 631,7 |
} else { |
parentId = "racine"; |
} |
|
|
rafraichirArbreMotsCles(arbreMC); |
|
String motCleModifie = "&motcle=" + motCle + "&id=" + id + "&parent=" |