Changeset 12019 in josm for trunk/src/org
- Timestamp:
- 2017-04-29T17:35:29+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmWriter.java
r11878 r12019 33 33 34 34 /** 35 * Save the dataset into a stream as osm intern xml format. This is not using any 36 * xml library for storing. 35 * Save the dataset into a stream as osm intern xml format. This is not using any xml library for storing. 37 36 * @author imi 37 * @since 59 38 38 */ 39 39 public class OsmWriter extends XmlWriter implements PrimitiveVisitor { 40 40 41 /** Default OSM API version */ 41 42 public static final String DEFAULT_API_VERSION = "0.6"; 42 43 43 44 private final boolean osmConform; 44 45 private boolean withBody = true; 46 private boolean withVisible = true; 45 47 private boolean isOsmChange; 46 48 private String version; … … 60 62 } 61 63 64 /** 65 * Sets whether body must be written. 66 * @param wb if {@code true} body will be written. 67 */ 62 68 public void setWithBody(boolean wb) { 63 69 this.withBody = wb; 70 } 71 72 /** 73 * Sets whether 'visible' attribute must be written. 74 * @param wv if {@code true} 'visible' attribute will be written. 75 * @since 12019 76 */ 77 public void setWithVisible(boolean wv) { 78 this.withVisible = wv; 64 79 } 65 80 … … 127 142 */ 128 143 public void writeContent(DataSet ds) { 144 setWithVisible(UploadPolicy.NORMAL.equals(ds.getUploadPolicy())); 129 145 writeNodes(ds.getNodes()); 130 146 writeWays(ds.getWays()); … … 322 338 } 323 339 } 324 out.print(" visible='"+osm.isVisible()+'\''); 340 if (withVisible) { 341 out.print(" visible='"+osm.isVisible()+'\''); 342 } 325 343 } 326 344 if (osm.getVersion() != 0) {
Note:
See TracChangeset
for help on using the changeset viewer.