Subversion Repositories eFlore/Applications.coel

Rev

Rev 1329 | Rev 1415 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1329 Rev 1369
Line 1... Line 1...
1
package org.tela_botanica.client.modeles.collection;
1
package org.tela_botanica.client.modeles.collection;
Line -... Line 2...
-
 
2
 
2
 
3
import java.util.Iterator;
3
import java.util.LinkedList;
4
import java.util.LinkedList;
-
 
5
import java.util.List;
-
 
6
import java.util.Map;
Line 4... Line 7...
4
import java.util.List;
7
import java.util.Set;
5
 
8
 
Line 6... Line 9...
6
import org.tela_botanica.client.modeles.aDonnee;
9
import org.tela_botanica.client.modeles.aDonnee;
Line 18... Line 21...
18
	private CollectionAPersonneListe personnesLiees = null;
21
	private CollectionAPersonneListe personnesLiees = null;
19
	private CollectionAPublicationListe publicationsLiees = null;
22
	private CollectionAPublicationListe publicationsLiees = null;
20
	private CollectionACommentaireListe commentairesLiees = null;
23
	private CollectionACommentaireListe commentairesLiees = null;
21
	public static String[] champsObligatoires = {"cc_id_collection","cc_ce_type"};
24
	public static String[] champsObligatoires = {"cc_id_collection","cc_ce_type"};
Line 22... Line 25...
22
	
25
	
23
	public Collection(){
-
 
24
		
26
	public Collection() {
25
	}
27
	}
26
 
28
	
27
	public Collection(ModelData model)
29
	public Collection(ModelData model)
28
	{		
30
	{		
29
		this.set("id_collection", model.get("cc_id_collection"));
-
 
30
		this.set("nom", model.get("cc_nom"));
-
 
Line -... Line 31...
-
 
31
		Map<String, Object> a = model.getProperties();
-
 
32
 
-
 
33
		Set<String> cles = a.keySet();
-
 
34
		Iterator<String> it = cles.iterator();
-
 
35
		while (it.hasNext()) {
-
 
36
			String cle = it.next();			
-
 
37
			if (a.get(cle) != null) {
-
 
38
				String cleObjet = cle.replaceFirst("^"+getPrefixe()+"_", "");
-
 
39
				this.set(cleObjet, a.get(cle));
-
 
40
			}
-
 
41
		}
31
	}
42
	}
32
 
43
	
33
	public Collection(JSONObject collection){
44
	public Collection(JSONObject collection){
Line 34... Line 45...
34
		initialiserModele(collection);
45
		initialiserModele(collection);