1,8 → 1,5 |
package org.tela_botanica.client.modeles; |
|
import java.util.Iterator; |
import java.util.Set; |
|
import com.google.gwt.json.client.JSONObject; |
|
public class Publication extends aDonnee { |
15,25 → 12,8 |
} |
|
public Publication(JSONObject publication) { |
// l'objet JSON est une table de hachage |
Set<String> im = publication.keySet(); |
|
// Parcourt pour chaque clé |
for (Iterator<String> it = im.iterator(); it.hasNext();) { |
// Si elle est associée à une valeur, nous l'ajoutons |
String cle = it.next(); |
// Suppression de l'abréviation du champ. Inutile dans le contexte d'un objet |
String cleObjet = cle.replaceFirst("^"+PREFIXE+"_", ""); |
// Valeur vide par défaut |
String valeur = ""; |
if (publication.get(cle).isString() != null) { |
valeur = publication.get(cle).isString().stringValue(); |
this.set(cleObjet, valeur); |
} else { |
this.set(cleObjet, valeur); |
initialiserModele(publication); |
} |
} |
} |
|
@Override |
protected String getPrefixe() { |
40,92 → 20,92 |
return PREFIXE; |
} |
|
public Publication(String nom_complet, String uri, String auteur, String collection, String titre, String editeur, |
String dateParution, String indicationNvt, String fascicule, String pages) { |
this.set("fmt_nom_complet", nom_complet); |
this.set("ce_projet", ""); |
this.set("uri", uri); |
this.set("fmt_auteur", auteur); |
this.set("collection", collection); |
this.set("titre", titre); |
this.set("ce_truk_editeur", editeur); |
this.set("date_parution", dateParution); |
this.set("indication_nvt", indicationNvt); |
this.set("fascicule", fascicule); |
this.set("truk_pages", pages); |
this.set("ce_meta", ""); |
public String getNomEditeur() { |
return renvoyerValeurCorrecte("cs_nom"); |
} |
|
public Publication(String idPublication,String idProjet, String nom_complet, String uri, String auteur, String collection, String titre, String editeur, |
String dateParution, String indicationNvt, String fascicule, String pages) { |
public String getId() { |
return renvoyerValeurCorrecte("id_publication"); |
} |
public void setId(String idPublication) { |
this.set("id_publication", idPublication); |
this.set("ce_projet", idProjet); |
this.set("fmt_nom_complet", nom_complet); |
this.set("uri", uri); |
this.set("fmt_auteur", auteur); |
this.set("collection", collection); |
this.set("titre", titre); |
this.set("ce_truk_editeur", editeur); |
this.set("date_parution", dateParution); |
this.set("indication_nvt", indicationNvt); |
this.set("fascicule", fascicule); |
this.set("truk_pages", pages); |
this.set("ce_meta", ""); |
} |
|
public String getNomEditeur() { |
return (String) renvoyerValeurCorrecte("cs_nom"); |
public String getIdProjet() { |
return renvoyerValeurCorrecte("ce_projet"); |
} |
|
public String getId() { |
return (String) renvoyerValeurCorrecte("id_publication"); |
public void setIdProjet(String idProjet) { |
this.set("ce_projet", idProjet); |
} |
|
public String getProjet() { |
return (String) renvoyerValeurCorrecte("ce_projet"); |
} |
|
public String getNomComplet() { |
return (String) renvoyerValeurCorrecte("fmt_nom_complet"); |
return renvoyerValeurCorrecte("fmt_nom_complet"); |
} |
public void setNomComplet(String nomComplet) { |
this.set("fmt_nom_complet", nomComplet); |
} |
|
public String getURI() { |
return (String) renvoyerValeurCorrecte("uri"); |
return renvoyerValeurCorrecte("uri"); |
} |
public void setUri(String uri) { |
this.set("uri", uri); |
} |
|
public String getAuteur() { |
return (String) renvoyerValeurCorrecte("fmt_auteur"); |
return renvoyerValeurCorrecte("fmt_auteur"); |
} |
public void setAuteur(String auteurFormate) { |
this.set("fmt_auteur", auteurFormate); |
} |
|
public String getCollection() { |
return (String) renvoyerValeurCorrecte("collection"); |
return renvoyerValeurCorrecte("collection"); |
} |
public void setCollection(String collection) { |
this.set("collection", collection); |
} |
|
public String getTitre() { |
return (String) renvoyerValeurCorrecte("titre"); |
return renvoyerValeurCorrecte("titre"); |
} |
public void setTitre(String titre) { |
this.set("titre", titre); |
} |
|
public String getEditeur() { |
return (String) renvoyerValeurCorrecte("ce_truk_editeur"); |
return renvoyerValeurCorrecte("ce_truk_editeur"); |
} |
public void setEditeur(String editeur) { |
this.set("ce_truk_editeur", editeur); |
} |
|
public String getDateParution() { |
return (String) renvoyerValeurCorrecte("date_parution"); |
return renvoyerValeurCorrecte("date_parution"); |
} |
public void setDateParution(String date) { |
this.set("date_parution", date); |
} |
|
public String getIndicationNvt() { |
return (String) renvoyerValeurCorrecte("indication_nvt"); |
return renvoyerValeurCorrecte("indication_nvt"); |
} |
public void setIndicationNvt(String nvt) { |
this.set("indication_nvt", nvt); |
} |
|
public String getFascicule() { |
return (String) renvoyerValeurCorrecte("fascicule"); |
return renvoyerValeurCorrecte("fascicule"); |
} |
public void setFascicule(String fascicule) { |
this.set("fascicule", fascicule); |
} |
|
public String getPages() { |
return (String) renvoyerValeurCorrecte("truk_pages"); |
return renvoyerValeurCorrecte("truk_pages"); |
} |
public void setPages(String pages) { |
this.set("truk_pages", pages); |
} |
|
public String getMeta() { |
return (String) renvoyerValeurCorrecte("ce_meta"); |
} |
} |