Subversion Repositories eFlore/Applications.coel

Rev

Rev 1327 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1327 Rev 1339
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 23... Line 26...
23
	public Collection() {
26
	public Collection() {
24
	}
27
	}
Line 25... Line 28...
25
	
28
	
26
	public Collection(ModelData model)
29
	public Collection(ModelData model)
27
	{		
30
	{		
-
 
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) {
28
		this.set("id_collection", model.get("cc_id_collection"));
38
				String cleObjet = cle.replaceFirst("^"+getPrefixe()+"_", "");
-
 
39
				this.set(cleObjet, a.get(cle));
-
 
40
			}
29
		this.set("nom", model.get("cc_nom"));
41
		}
Line 30... Line 42...
30
	}
42
	}
31
	
43
	
32
	public Collection(JSONObject collection) {
44
	public Collection(JSONObject collection) {