Subversion Repositories eFlore/Applications.coel

Rev

Rev 706 | Rev 712 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.client.modeles;

import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONObject;

public class PublicationListe extends aDonneeListe<Publication> {

        private static final long serialVersionUID = 2600314321196345072L;

        public PublicationListe() {
                super();
        }
        
        public PublicationListe(int taille) {
                super(taille);
        }
        
        public PublicationListe(JSONArray publicationListe) {
                super(publicationListe.size());
                
                final int taillemax = publicationListe.size();
                for (int i = 0; i < taillemax; i++) {
                        JSONObject publicationCourante = publicationListe.get(i).isObject() ;
                        
                        if (publicationCourante != null)        {
                                Publication publication = new Publication(publicationCourante);
                                this.put(publication.getId(), publication);                             
                        }
                }
        }
}