Changeset 17215 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
- Timestamp:
- 2009-08-23T21:23:13+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
r17181 r17215 246 246 rd.close(); 247 247 urlConn.disconnect(); 248 if (lines.indexOf(cImageFormat) != -1) { 249 int i = lines.indexOf(cImageFormat); 250 int j = lines.indexOf(".", i); 251 wmsLayer.setRaster(lines.substring(i+cImageFormat.length(), j).equals("image")); 252 } 253 if (!wmsLayer.isRaster() && lines.indexOf(cInterfaceVector) != -1) { // "afficherCarteCommune.do" 254 // shall be something like: interfaceRef = "afficherCarteCommune.do?c=X2269"; 255 lines = lines.substring(lines.indexOf(cInterfaceVector),lines.length()); 256 lines = lines.substring(0, lines.indexOf("'")); 257 System.out.println("interface ref.:"+lines); 258 return lines; 259 } else if (wmsLayer.isRaster() && lines.indexOf(cInterfaceRasterTA) != -1) { // "afficherCarteTa.do" 260 // list of values parsed in listOfFeuilles (list all non-georeferenced images) 261 lines = getFeuillesList(); 262 if (!downloadCancelled) { 263 parseFeuillesList(lines); 264 if (listOfFeuilles.size() > 0) { 265 int res = selectFeuilleDialog(); 266 if (res != -1) { 267 wmsLayer.setCodeCommune(listOfFeuilles.elementAt(res).name); 268 checkLayerDuplicates(wmsLayer); 269 interfaceRef = buildRasterFeuilleInterfaceRef(wmsLayer.getCodeCommune()); 270 wmsLayer.setCodeCommune(listOfFeuilles.elementAt(res).ref); 271 lines = buildRasterFeuilleInterfaceRef(listOfFeuilles.elementAt(res).ref); 272 System.out.println("interface ref.:"+lines); 273 return lines; 274 } 275 } 276 } 277 return null; 278 } else if (lines.indexOf(cCommuneListStart) != -1 && lines.indexOf(cCommuneListEnd) != -1) { 279 // list of values parsed in listOfCommunes 280 int i = lines.indexOf(cCommuneListStart); 281 int j = lines.indexOf(cCommuneListEnd, i); 282 parseCommuneList(lines.substring(i, j)); 248 if (lines != null) { 249 if (lines.indexOf(cImageFormat) != -1) { 250 int i = lines.indexOf(cImageFormat); 251 int j = lines.indexOf(".", i); 252 wmsLayer.setRaster(lines.substring(i+cImageFormat.length(), j).equals("image")); 253 } 254 if (!wmsLayer.isRaster() && lines.indexOf(cInterfaceVector) != -1) { // "afficherCarteCommune.do" 255 // shall be something like: interfaceRef = "afficherCarteCommune.do?c=X2269"; 256 lines = lines.substring(lines.indexOf(cInterfaceVector),lines.length()); 257 lines = lines.substring(0, lines.indexOf("'")); 258 System.out.println("interface ref.:"+lines); 259 return lines; 260 } else if (wmsLayer.isRaster() && lines.indexOf(cInterfaceRasterTA) != -1) { // "afficherCarteTa.do" 261 // list of values parsed in listOfFeuilles (list all non-georeferenced images) 262 lines = getFeuillesList(); 263 if (!downloadCancelled) { 264 parseFeuillesList(lines); 265 if (listOfFeuilles.size() > 0) { 266 int res = selectFeuilleDialog(); 267 if (res != -1) { 268 wmsLayer.setCodeCommune(listOfFeuilles.elementAt(res).name); 269 checkLayerDuplicates(wmsLayer); 270 interfaceRef = buildRasterFeuilleInterfaceRef(wmsLayer.getCodeCommune()); 271 wmsLayer.setCodeCommune(listOfFeuilles.elementAt(res).ref); 272 lines = buildRasterFeuilleInterfaceRef(listOfFeuilles.elementAt(res).ref); 273 System.out.println("interface ref.:"+lines); 274 return lines; 275 } 276 } 277 } 278 return null; 279 } else if (lines.indexOf(cCommuneListStart) != -1 && lines.indexOf(cCommuneListEnd) != -1) { 280 // list of values parsed in listOfCommunes 281 int i = lines.indexOf(cCommuneListStart); 282 int j = lines.indexOf(cCommuneListEnd, i); 283 parseCommuneList(lines.substring(i, j)); 284 } 283 285 } 284 286 } catch (MalformedURLException e) {
Note:
See TracChangeset
for help on using the changeset viewer.
