Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 736 Rev 741
Line 28... Line 28...
28
	/**
28
	/**
29
	 * Constructeur avec un objet JSON
29
	 * Constructeur avec un objet JSON
30
	 * 
30
	 * 
31
	 * @param image
31
	 * @param image
32
	 */
32
	 */
33
	public Publication(JSONObject institution) {
33
	public Publication(JSONObject publication) {
34
		// l'objet JSON est une table de hachage
34
		// l'objet JSON est une table de hachage
35
		Set<String> im = institution.keySet();
35
		Set<String> im = publication.keySet();
Line 36... Line 36...
36
 
36
 
37
		// Parcourt pour chaque clé
37
		// Parcourt pour chaque clé
38
		for (Iterator<String> it = im.iterator(); it.hasNext();) {
38
		for (Iterator<String> it = im.iterator(); it.hasNext();) {
39
			// Si elle est associée à une valeur, nous l'ajoutons
39
			// Si elle est associée à une valeur, nous l'ajoutons
40
			String cle = it.next();
40
			String cle = it.next();
41
			// Suppression de l'abréviation du champ. Inutile dans le contexte d'un objet
41
			// Suppression de l'abréviation du champ. Inutile dans le contexte d'un objet
42
			String cleObjet = cle.replaceFirst("^"+prefixe, "");
42
			String cleObjet = cle.replaceFirst("^"+prefixe, "");
43
			if (institution.get(cle).isString() != null) {
43
			if (publication.get(cle).isString() != null) {
44
				String valeur = institution.get(cle).isString().stringValue();
44
				String valeur = publication.get(cle).isString().stringValue();
45
				this.set(cleObjet, valeur);
45
				this.set(cleObjet, valeur);
46
			} else {
46
			} else {
47
				// Sinon, nous ajoutons la clé avec une valeur vide
47
				// Sinon, nous ajoutons la clé avec une valeur vide
48
				String valeur = " ";
48
				String valeur = " ";
Line 141... Line 141...
141
	public String getMeta() {
141
	public String getMeta() {
142
		return (String) renvoyerValeurCorrecte("ce_meta");
142
		return (String) renvoyerValeurCorrecte("ce_meta");
143
	}
143
	}
Line 144... Line 144...
144
	
144
	
145
	public String getIdAuteur() {
145
	public String getIdAuteur() {
146
		return (String) renvoyerValeurCorrecte("id_auteur");
146
		return (String) renvoyerValeurCorrecte("cpuap_id_personne");
Line 147... Line 147...
147
	}
147
	}
148
	
148