Changeset 32556 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java
- Timestamp:
- 2016-07-04T14:18:17+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java
r30737 r32556 1 // License: GPL. v2 and later. Copyright 2008-2009 by Pieren <pieren3@gmail.com> and others1 // License: GPL. For details, see LICENSE file. 2 2 package cadastre_fr; 3 3 … … 30 30 * automatically a tag "source"="Cadastre..." as defined in the plugin preferences. 31 31 */ 32 public class CheckSourceUploadHook implements UploadHook 33 { 32 public class CheckSourceUploadHook implements UploadHook { 34 33 35 34 /** 36 35 * Add the tag "source" if it doesn't exist for all new Nodes and Ways before uploading 37 36 */ 38 public boolean checkUpload(APIDataSet apiDataSet)39 { 37 @Override 38 public boolean checkUpload(APIDataSet apiDataSet) { 40 39 if (CadastrePlugin.autoSourcing && CadastrePlugin.pluginUsed && !apiDataSet.getPrimitivesToAdd().isEmpty()) { 41 40 Collection<OsmPrimitive> sel = new HashSet<>(); … … 55 54 /** 56 55 * Check whenever one of the keys of the object is "source" 57 * @param OsmPrimitive58 56 * @return true if one of keys is "source" 59 57 */ 60 58 private boolean tagSourceExist(OsmPrimitive osm) { 61 59 for (String key : osm.keySet()) { 62 if (key.equals("source") ) {60 if (key.equals("source")) { 63 61 return true; 64 62 } … … 72 70 * @param sel the list of elements added without a key "source" 73 71 */ 74 private void displaySource(Collection<OsmPrimitive> sel) 75 { 72 private void displaySource(Collection<OsmPrimitive> sel) { 76 73 if (!sel.isEmpty()) { 77 74 JPanel p = new JPanel(new GridBagLayout());
Note:
See TracChangeset
for help on using the changeset viewer.
