Subversion Repositories eFlore/Applications.cel

Rev

Rev 2568 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.client.modeles.objets;

/**
 * 
 * Classe representant un element du referentiel de localites
 * 
 */

public class ReferentielLocalite {

        private String localite = null;
        private String codeLocalite = null;
        private String codeInsee = null;        

        /**
         * @param localite
         * @param code
         */
        public ReferentielLocalite(String localite, String code) {
                
                this.localite = localite;
                if(code.length() == 5) {
                        codeInsee = code;
                        codeLocalite = code.substring(0,2);
                } else {
                        codeLocalite = code;
                }
        }

        public String getLocalite() {
                return localite;
        }

        public String getCodeLocalite() {
                return codeLocalite;
        }

        public String getCodeInsee() {
                return codeInsee;
        }
}