Changeset 33217 in osm for applications/editors/josm/plugins/sds/src
- Timestamp:
- 2017-04-08T00:59:43+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java
r32705 r33217 4 4 import java.util.ArrayList; 5 5 import java.util.HashMap; 6 import java.util.List; 7 import java.util.Map; 6 8 7 9 import org.openstreetmap.josm.Main; … … 28 30 public class SeparateDataStorePlugin extends Plugin { 29 31 30 public HashMap<Long, IPrimitive> originalNodes = new HashMap<>();31 public HashMap<Long, IPrimitive> originalWays = new HashMap<>();32 public HashMap<Long, IPrimitive> originalRelations = new HashMap<>();32 public final Map<Long, IPrimitive> originalNodes = new HashMap<>(); 33 public final Map<Long, IPrimitive> originalWays = new HashMap<>(); 34 public final Map<Long, IPrimitive> originalRelations = new HashMap<>(); 33 35 34 public ArrayList<QueueItem> uploadQueue = new ArrayList<>();36 public List<QueueItem> uploadQueue = new ArrayList<>(); 35 37 36 38 private PrimitiveVisitor learnVisitor = new PrimitiveVisitor() { … … 52 54 53 55 static class QueueItem { 54 public IPrimitive primitive;55 public HashMap<String, String> tags;56 public boolean sdsOnly;56 public final IPrimitive primitive; 57 public final Map<String, String> tags; 58 public final boolean sdsOnly; 57 59 public boolean processed; 58 60 QueueItem(IPrimitive p, HashMap<String, String> t, boolean s) { … … 69 71 public SeparateDataStorePlugin(PluginInformation info) { 70 72 super(info); 71 System.out.println("initializing SDS plugin");72 73 73 // this lets us see what JOSM load from the server, and augment it with our data :74 // this lets us see what JOSM load from the server, and augment it with our data 74 75 OsmReader.registerPostprocessor(new ReadPostprocessor(this)); 75 76 76 // this makes sure that our data is never written to the OSM server on a low level ;77 OsmWriterFactory. theFactory = new SdsOsmWriterFactory(this);77 // this makes sure that our data is never written to the OSM server on a low level 78 OsmWriterFactory.setDefaultFactory(new SdsOsmWriterFactory(this)); 78 79 79 // this lets us see what JOSM is planning to upload, and prepare our own uploads 80 // accordingly 80 // this lets us see what JOSM is planning to upload, and prepare our own uploads accordingly 81 81 UploadAction.registerUploadHook(new DetermineSdsModificationsUploadHook(this)); 82 82 83 // this lets us perform our own uploads after JOSM has succeeded :83 // this lets us perform our own uploads after JOSM has succeeded 84 84 OsmServerWriter.registerPostprocessor(new WritePostprocessor(this)); 85 85 … … 141 141 return new SdsPluginPreferences(); 142 142 } 143 144 143 } 145
Note:
See TracChangeset
for help on using the changeset viewer.