Subversion Repositories eFlore/Applications.coel

Rev

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

package org.tela_botanica.client.modeles;

import java.util.LinkedHashMap;

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

public class PublicationListe extends LinkedHashMap<String, Publication> {

        /**
         * 
         */
        private static final long serialVersionUID = 2600314321196345072L;

        public PublicationListe(int taille)
        {
                super(taille);
        }
        /**
         * Constructeur pour une liste d'institutions
         * @param dates
         */
        public PublicationListe(JSONArray publications) 
        {
                super(publications.size()) ;
                final int taillemax = publications.size();
                
                for (int i = 0; i < taillemax; i++) {
                        JSONObject publicationCourante = publications.get(i).isObject() ;
                        
                        if (publicationCourante != null)        {
                                Publication publication = new Publication(publicationCourante);
                                this.put(publication.getId(), publication);
                        }
                }
        }
        
}