Changeset 2598 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-12-09T21:24:32+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/APIDataSet.java
r2512 r2598 14 14 import java.util.logging.Logger; 15 15 16 import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException; 16 17 import org.openstreetmap.josm.data.osm.DataSet; 17 18 import org.openstreetmap.josm.data.osm.Node; … … 21 22 import org.openstreetmap.josm.data.osm.Way; 22 23 23 import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException;24 25 24 /** 26 25 * Represents a collection of {@see OsmPrimitive}s which should be uploaded to the 27 26 * API. 28 * The collection is derived from the modified primitives of an {@see DataSet}. 27 * The collection is derived from the modified primitives of an {@see DataSet} and it provides methods 28 * for sorting the objects in upload order. 29 29 * 30 30 */ … … 212 212 213 213 /** 214 * Replies the number of objects to upload 215 * 216 * @return the number of objects to upload 217 */ 218 public int getSize() { 219 return toAdd.size() + toUpdate.size() + toDelete.size(); 220 } 221 222 public void removeProcessed(Collection<OsmPrimitive> processed) { 223 if (processed == null) return; 224 toAdd.removeAll(processed); 225 toUpdate.removeAll(processed); 226 toDelete.removeAll(processed); 227 } 228 229 /** 214 230 * Adjusts the upload order for new relations. Child relations are uploaded first, 215 231 * parent relations second. -
trunk/src/org/openstreetmap/josm/data/osm/Changeset.java
r2512 r2598 1 1 // License: GPL. Copyright 2007 by Martijn van Oosterhout and others 2 2 package org.openstreetmap.josm.data.osm; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import java.util.Collection; … … 100 98 } 101 99 102 public String getLocalName(){103 return tr("Changeset {0}",getId());104 }105 106 100 public String getDisplayName(NameFormatter formatter) { 107 101 return formatter.format(this); … … 308 302 return tags.keySet(); 309 303 } 304 305 public boolean isNew() { 306 return id <= 0; 307 } 310 308 } -
trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
r2512 r2598 173 173 } 174 174 175 public boolean isNew() { 176 return id <= 0; 177 } 175 178 } -
trunk/src/org/openstreetmap/josm/data/osm/PrimitiveId.java
r2399 r2598 5 5 6 6 long getUniqueId(); 7 8 7 OsmPrimitiveType getType(); 9 8 9 /** 10 * Replies true if this id represents a new primitive. 11 * 12 * @return true if this id represents a new primitive. 13 */ 14 boolean isNew(); 15 10 16 } -
trunk/src/org/openstreetmap/josm/data/osm/RelationMember.java
r2399 r2598 171 171 return member.getUniqueId(); 172 172 } 173 174 public boolean isNew() { 175 return member.isNew(); 176 } 173 177 } -
trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java
r2404 r2598 51 51 } 52 52 53 public boolean isNew() { 54 return memberId <= 0; 55 } 53 56 } -
trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java
r2448 r2598 18 18 public long getUniqueId() { 19 19 return id; 20 } 21 22 public boolean isNew() { 23 return id <= 0; 20 24 } 21 25
Note:
See TracChangeset
for help on using the changeset viewer.