- Timestamp:
- 2008-05-12T10:14:29+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r627 r633 85 85 osm.user = user; 86 86 osm.visible = visible; 87 osm.version = version; 87 88 osm.checkTagged(); 88 89 osm.checkDirectionTagged(); … … 249 250 if (visible != null) { 250 251 current.visible = Boolean.parseBoolean(visible); 252 } 253 254 // oldversion attribute added in 0.6 API 255 256 // Note there is an asymmetry here: the server will send 257 // the version as "version" the client sends it as 258 // "oldversion". So we take both since which we receive will 259 // depend on reading from a file or reading from the server 260 261 String version = atts.getValue("version"); 262 if (version != null) { 263 current.version = Integer.parseInt(version); 264 } 265 version = atts.getValue("old_version"); 266 if (version != null) { 267 current.version = Integer.parseInt(version); 251 268 } 252 269 -
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r627 r633 149 149 Main.pleaseWaitDlg.currentAction.setText(tr("Opening changeset...")); 150 150 changeset = new Changeset(); 151 changeset.put( "created_by", " josm" );151 changeset.put( "created_by", "JOSM" ); 152 152 changeset.put( "comment", comment ); 153 153 try { … … 303 303 */ 304 304 public void visit(Node n) { 305 if (n.id == 0 && !n.deleted && n.get("created_by") == null) { 306 n.put("created_by", "JOSM"); 307 sendRequest("PUT", "node", n, true); 308 } else if (n.deleted) { 305 if (n.deleted) { 309 306 sendRequest("DELETE", "node", n, true); 310 307 } else { … … 318 315 */ 319 316 public void visit(Way w) { 320 if (w.id == 0 && !w.deleted && w.get("created_by") == null) { 321 w.put("created_by", "JOSM"); 322 sendRequest("PUT", "way", w, true); 323 } else if (w.deleted) { 317 if (w.deleted) { 324 318 sendRequest("DELETE", "way", w, true); 325 319 } else { … … 333 327 */ 334 328 public void visit(Relation e) { 335 if (e.id == 0 && !e.deleted && e.get("created_by") == null) { 336 e.put("created_by", "JOSM"); 337 sendRequest("PUT", "relation", e, true); 338 } else if (e.deleted) { 329 if (e.deleted) { 339 330 sendRequest("DELETE", "relation", e, true); 340 331 } else { … … 398 389 if (retCode == 200) 399 390 if(osm.id == 0) 391 { 400 392 osm.id = readId(activeConnection.getInputStream()); 393 osm.version = 1; 394 } 401 395 else 402 396 {
Note:
See TracChangeset
for help on using the changeset viewer.