Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 783 Rev 962
Line 98... Line 98...
98
	private String departement = null;
98
	private String departement = null;
99
	private ComboBox  espece = null;
99
	private ComboBox  espece = null;
100
	private String numeroNom = null;
100
	private String numeroNom = null;
101
	private String numeroOrdre = null;
101
	private String numeroOrdre = null;
Line -... Line 102...
-
 
102
	
-
 
103
	private String codeInseeCommune = null;
102
	
104
	
Line 103... Line 105...
103
	private String referentielGeo = null;
105
	private String referentielGeo = null;
Line 104... Line 106...
104
 
106
 
Line 1087... Line 1089...
1087
	
1089
	
1088
	private void afficherIndicationCommune(
1090
	private void afficherIndicationCommune(
Line 1089... Line 1091...
1089
			final EntiteGeographiqueObservation infosCom) {
1091
			final EntiteGeographiqueObservation infosCom) {
1090
		
1092
		
1091
		String nCommune = "";
1093
		String nCommune = "";
1092
		if(infosCom != null && !infosCom.getCommune().trim().equals("")){
1094
		if(infosCom != null && !infosCom.getZoneGeo().trim().equals("")){
1093
			nCommune += infosCom.getCommune();
1095
			nCommune += infosCom.getZoneGeo();
Line 1094... Line 1096...
1094
			if(!infosCom.getIdLocalite().trim().equals(""))
1096
			if(!infosCom.getIdZoneGeo().trim().equals(""))
1095
			nCommune += " ("+infosCom.getIdLocalite()+")";
1097
			nCommune += " ("+Util.convertirChaineZoneGeoVersCodeInsee(infosCom.getIdZoneGeo())+")";
Line 1096... Line 1098...
1096
			
1098
			
Line 1137... Line 1139...
1137
	
1139
	
1138
	private void rafraichirCommune(EntiteGeographiqueObservation infosCom) {
1140
	private void rafraichirCommune(EntiteGeographiqueObservation infosCom) {
Line 1139... Line 1141...
1139
		String nCommune = "";
1141
		String nCommune = "";
1140
 
1142
 
1141
		
1143
		
Line 1142... Line 1144...
1142
		if(infosCom.getCommune() != null && !infosCom.getCommune().equals("")) {
1144
		if(infosCom.getZoneGeo() != null && !infosCom.getZoneGeo().equals("")) {
-
 
1145
			nCommune += infosCom.getZoneGeo();
1143
			nCommune += infosCom.getCommune();
1146
		}
1144
		}
1147
		
1145
		
1148
		if(infosCom.getIdZoneGeo() != null && !infosCom.getIdZoneGeo().equals("")) {
1146
		if(infosCom.getIdLocalite() != null && !infosCom.getIdLocalite().equals("")) {
1149
			String codeGeoFormate = Util.convertirChaineZoneGeoVersCodeInsee(infosCom.getIdZoneGeo());
1147
			nCommune += " ("+infosCom.getIdLocalite()+")";
1150
			nCommune += " ("+codeGeoFormate+")";
1148
			departement = infosCom.getIdLocalite();
1151
			departement = Util.convertirChaineZoneGeoVersCodeInsee(infosCom.getIdZoneGeo());;
Line 1465... Line 1468...
1465
 
1468
 
Line 1466... Line 1469...
1466
			comment.setRawValue(Util.remplacerSautsDeligneMalEncodes(obs.getCommentaire()));
1469
			comment.setRawValue(Util.remplacerSautsDeligneMalEncodes(obs.getCommentaire()));
1467
			
1470
			
1468
		}
1471
		}
1469
		if(!obs.getLocalite().equals("null") && !obs.getLocalite().equals("000null")) {
1472
		if(!obs.getLocalite().equals("null") && !obs.getLocalite().equals("000null")) {
1470
			if(!idLoc.equals("000null")) {
1473
			if(!idLoc.equals("000null") && !idLoc.equals("")) {
1471
				if(!idLoc.equals(VALEURS_MULTIPLES)) {
1474
				if(!idLoc.equals(VALEURS_MULTIPLES)) {
1472
					commune.setValue(obs.getLocalite()+" ("+idLoc+")") ;
1475
					commune.setValue(obs.getLocalite()+" ("+idLoc+")") ;
1473
				} else {
1476
				} else {
Line 1490... Line 1493...
1490
		}
1493
		}
1491
		if(!obs.getNumeroOrdre().equals("null") && !obs.getNumeroOrdre().equals("000nu2ll")) {
1494
		if(!obs.getNumeroOrdre().equals("null") && !obs.getNumeroOrdre().equals("000nu2ll")) {
1492
			numeroOrdre = obs.getNumeroOrdre() ;
1495
			numeroOrdre = obs.getNumeroOrdre() ;
1493
		}
1496
		}
Line 1494... Line 1497...
1494
		
1497
		
1495
		if(!obs.getCoordonneeX().equals("null") && !obs.getCoordonneeX().equals("000null")
1498
		if(!obs.getLatitude().equals("null") && !obs.getLatitude().equals("000null")
1496
				&& !obs.getCoordonneeY().equals("null") && !obs.getCoordonneeY().equals("000null")) {
1499
				&& !obs.getLongitude().equals("null") && !obs.getLongitude().equals("000null")) {
1497
			latitude.setValue(obs.getCoordonneeX()) ;
1500
			latitude.setValue(obs.getLatitude()) ;
1498
			longitude.setValue(obs.getCoordonneeY()) ;
1501
			longitude.setValue(obs.getLongitude()) ;
1499
		}
1502
		}
Line 1500... Line 1503...
1500
	}
1503
	}
Line 1658... Line 1661...
1658
			station = comparerDifferencesChamps(station, obsEnCours.getStation());
1661
			station = comparerDifferencesChamps(station, obsEnCours.getStation());
1659
			milieu = comparerDifferencesChamps(milieu, obsEnCours.getMilieu());
1662
			milieu = comparerDifferencesChamps(milieu, obsEnCours.getMilieu());
1660
			espece = comparerDifferencesChamps(espece, obsEnCours.getNomSaisi()); 
1663
			espece = comparerDifferencesChamps(espece, obsEnCours.getNomSaisi()); 
1661
			date = comparerDifferencesChamps(date, obsEnCours.getDate());
1664
			date = comparerDifferencesChamps(date, obsEnCours.getDate());
1662
			notes = comparerDifferencesChamps(notes, obsEnCours.getCommentaire());
1665
			notes = comparerDifferencesChamps(notes, obsEnCours.getCommentaire());
1663
			lat = comparerDifferencesChamps(lat, obsEnCours.getCoordonneeX());
1666
			lat = comparerDifferencesChamps(lat, obsEnCours.getLatitude());
1664
			lon = comparerDifferencesChamps(lon, obsEnCours.getCoordonneeY());
1667
			lon = comparerDifferencesChamps(lon, obsEnCours.getLongitude());
Line 1665... Line 1668...
1665
			
1668
			
1666
			ordreObs += obsEnCours.getNumeroOrdre()+",";
1669
			ordreObs += obsEnCours.getNumeroOrdre()+",";
Line 1667... Line 1670...
1667
		}
1670
		}
Line 1741... Line 1744...
1741
		}
1744
		}
Line 1742... Line 1745...
1742
 
1745
 
Line 1743... Line 1746...
1743
	}
1746
	}
1744
	
1747
	
1745
	private void obtenirInformationCommune() {
1748
	private void obtenirInformationCommune() {
Line 1746... Line 1749...
1746
		observationMediateur.obtenirInformationCommune(getCommune(), obtenirDepartementAPartirChampCommune());
1749
		observationMediateur.obtenirInformationCommune(getCommuneSansDepartement(), obtenirDepartementAPartirChampCommune());
Line 1747... Line 1750...
1747
	}
1750
	}
Line 1803... Line 1806...
1803
			int nDep = Integer.parseInt(dep);
1806
			int nDep = Integer.parseInt(dep);
1804
			if(nDep > 0 && nDep < 110) {
1807
			if(nDep > 0 && nDep < 110) {
1805
				departement = dep ;
1808
				departement = dep ;
1806
			}
1809
			}
Line 1807... Line 1810...
1807
			
1810
			
1808
			if(departement.length() == 1) {
1811
			if(departement.length() == 4) {
1809
				departement = "0"+departement;
1812
				departement = "0"+departement;
-
 
1813
			}
-
 
1814
			
1810
			}
1815
			departement = departement.substring(0,2);
1811
		}
1816
		}
1812
		catch(NumberFormatException e)
1817
		catch(NumberFormatException e)
1813
		{
1818
		{
1814
			departement = "" ;
1819
			departement = "" ;