Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1383 Rev 1470
Line 1... Line 1...
1
package org.tela_botanica.client.modeles.publication;
1
package org.tela_botanica.client.modeles.publication;
Line -... Line 2...
-
 
2
 
-
 
3
import java.util.Iterator;
-
 
4
import java.util.Map;
-
 
5
import java.util.Set;
2
 
6
 
3
import org.tela_botanica.client.modeles.aDonnee;
7
import org.tela_botanica.client.modeles.aDonnee;
4
import org.tela_botanica.client.modeles.structure.Structure;
8
import org.tela_botanica.client.modeles.structure.Structure;
Line -... Line 9...
-
 
9
import org.tela_botanica.client.util.UtilString;
5
import org.tela_botanica.client.util.UtilString;
10
 
Line 6... Line 11...
6
 
11
import com.extjs.gxt.ui.client.data.ModelData;
Line 7... Line 12...
7
import com.google.gwt.json.client.JSONObject;
12
import com.google.gwt.json.client.JSONObject;
Line 20... Line 25...
20
	public Publication(JSONObject publication) {
25
	public Publication(JSONObject publication) {
21
		initialiserModele(publication);
26
		initialiserModele(publication);
22
		editeur = new Structure(publication);
27
		editeur = new Structure(publication);
23
	}
28
	}
Line -... Line 29...
-
 
29
	
-
 
30
	public Publication(ModelData model)
-
 
31
	{		
-
 
32
		Map<String, Object> a = model.getProperties();
-
 
33
 
-
 
34
		Set<String> cles = a.keySet();
-
 
35
		Iterator<String> it = cles.iterator();
-
 
36
		while (it.hasNext()) {
-
 
37
			String cle = it.next();			
-
 
38
			if (a.get(cle) != null) {
-
 
39
				String cleObjet = cle.replaceFirst("^"+getPrefixe()+"_", "");
-
 
40
				this.set(cleObjet, a.get(cle));
-
 
41
			}
-
 
42
		}
-
 
43
	}
24
	
44
	
25
	@Override
45
	@Override
26
	protected String getPrefixe() {
46
	protected String getPrefixe() {
27
		return PREFIXE;
47
		return PREFIXE;