Changeset 24091 in osm for applications/editors/josm/plugins/FixAddresses
- Timestamp:
- 2010-11-06T18:37:31+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses
- Files:
-
- 16 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressEditContainer.java
r24090 r24091 77 77 78 78 /** The unresolved addresses list. */ 79 private List< AddressNode> unresolvedAddresses = new ArrayList<AddressNode>(100);79 private List<OSMAddress> unresolvedAddresses = new ArrayList<OSMAddress>(100); 80 80 81 81 /** The incomplete addresses list. */ 82 private List< AddressNode> incompleteAddresses = new ArrayList<AddressNode>(100);82 private List<OSMAddress> incompleteAddresses = new ArrayList<OSMAddress>(100); 83 83 84 84 /** The shadow copy to assemble the street dict during update. */ 85 85 private HashMap<String, StreetNode> shadowStreetDict = new HashMap<String, StreetNode>(100); 86 86 /** The shadow copy to assemble the unresolved addresses during update. */ 87 private List< AddressNode> shadowUnresolvedAddresses = new ArrayList<AddressNode>(100);87 private List<OSMAddress> shadowUnresolvedAddresses = new ArrayList<OSMAddress>(100); 88 88 /** The shadow copy to assemble the incomplete addresses during update. */ 89 private List< AddressNode> shadowIncompleteAddresses = new ArrayList<AddressNode>(100);89 private List<OSMAddress> shadowIncompleteAddresses = new ArrayList<OSMAddress>(100); 90 90 91 91 /** The visited nodes cache to increase iteration speed. */ … … 208 208 } 209 209 210 AddressNodeaNode = null;210 OSMAddress aNode = null; 211 211 // Address nodes are recycled in order to keep instance variables like guessed names 212 212 aNode = NodeFactory.createNode(n); … … 239 239 * @param aNode the address node to add and check 240 240 */ 241 private void addAndClassifyAddress( AddressNodeaNode) {241 private void addAndClassifyAddress(OSMAddress aNode) { 242 242 if (!assignAddressToStreet(aNode)) { 243 243 // Assignment failed: Street is not known (yet) -> add to 'unresolved' list … … 317 317 318 318 // Node is an address 319 if (ne instanceof AddressNode) {320 AddressNode aNode = (AddressNode) ne;319 if (ne instanceof OSMAddress) { 320 OSMAddress aNode = (OSMAddress) ne; 321 321 addAndClassifyAddress(aNode); 322 322 return true; … … 353 353 * @return the unresolved addresses 354 354 */ 355 public List< AddressNode> getUnresolvedAddresses() {355 public List<OSMAddress> getUnresolvedAddresses() { 356 356 return unresolvedAddresses; 357 357 } … … 362 362 * @return the incomplete addresses 363 363 */ 364 public List< AddressNode> getIncompleteAddresses() {364 public List<OSMAddress> getIncompleteAddresses() { 365 365 return incompleteAddresses; 366 366 } … … 381 381 * @return 382 382 */ 383 public List< AddressNode> getUnresolvedItems() {383 public List<OSMAddress> getUnresolvedItems() { 384 384 return unresolvedAddresses; 385 385 } … … 431 431 int sum = 0; 432 432 433 for ( AddressNodeaNode : getAllAddressesToFix()) {433 for (OSMAddress aNode : getAllAddressesToFix()) { 434 434 if (aNode.hasGuesses()) { 435 435 sum++; … … 443 443 * @return 444 444 */ 445 public List< AddressNode> getAllAddressesToFix() {446 List< AddressNode> all = new ArrayList<AddressNode>(incompleteAddresses);447 448 for ( AddressNodeaNode : unresolvedAddresses) {445 public List<OSMAddress> getAllAddressesToFix() { 446 List<OSMAddress> all = new ArrayList<OSMAddress>(incompleteAddresses); 447 448 for (OSMAddress aNode : unresolvedAddresses) { 449 449 if (!all.contains(aNode)) { 450 450 all.add(aNode); … … 459 459 * @param aNode 460 460 */ 461 private boolean assignAddressToStreet( AddressNodeaNode) {461 private boolean assignAddressToStreet(OSMAddress aNode) { 462 462 String streetName = aNode.getStreetName(); 463 463 … … 475 475 */ 476 476 public void resolveAddresses() { 477 List< AddressNode> resolvedAddresses = new ArrayList<AddressNode>();478 for ( AddressNodenode : shadowUnresolvedAddresses) {477 List<OSMAddress> resolvedAddresses = new ArrayList<OSMAddress>(); 478 for (OSMAddress node : shadowUnresolvedAddresses) { 479 479 if (assignAddressToStreet(node)) { 480 480 resolvedAddresses.add(node); … … 483 483 484 484 /* Remove all resolves nodes from unresolved list */ 485 for ( AddressNoderesolved : resolvedAddresses) {485 for (OSMAddress resolved : resolvedAddresses) { 486 486 shadowUnresolvedAddresses.remove(resolved); 487 487 } … … 522 522 523 523 // put results from shadow copy into real lists 524 incompleteAddresses = new ArrayList< AddressNode>(shadowIncompleteAddresses);525 unresolvedAddresses = new ArrayList< AddressNode>(shadowUnresolvedAddresses);524 incompleteAddresses = new ArrayList<OSMAddress>(shadowIncompleteAddresses); 525 unresolvedAddresses = new ArrayList<OSMAddress>(shadowUnresolvedAddresses); 526 526 streetDict = new HashMap<String, StreetNode>(shadowStreetDict); 527 527 // remove temp data -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressFinderThread.java
r24088 r24091 37 37 * 38 38 * The guessing procedure itself is implemented by defining "guessers" using the {@link GuessedValueHandler} 39 * class. A guessed field does not modify the corresponding property of {@link AddressNode} itself, but40 * adds the guessed value to a shadowed field by calling {@link AddressNode#setGuessedValue(String, String)}.39 * class. A guessed field does not modify the corresponding property of {@link OSMAddress} itself, but 40 * adds the guessed value to a shadowed field by calling {@link OSMAddress#setGuessedValue(String, String)}. 41 41 */ 42 42 public class AddressFinderThread extends PleaseWaitRunnable implements Visitor { 43 private List< AddressNode> addressesToGuess;43 private List<OSMAddress> addressesToGuess; 44 44 private List<IProgressMonitorFinishedListener> finishListeners = new ArrayList<IProgressMonitorFinishedListener>(); 45 45 private double minDist; 46 private AddressNodecurAddressNode;46 private OSMAddress curAddressNode; 47 47 private boolean isRunning = false; 48 48 private boolean cancelled; … … 51 51 * @param nodes 52 52 */ 53 public AddressFinderThread(List< AddressNode> nodes, String title) {53 public AddressFinderThread(List<OSMAddress> nodes, String title) { 54 54 super(title != null ? title : tr("Searching")); 55 55 setAddressEditContainer(nodes); 56 56 } 57 57 58 public void setAddressEditContainer(List< AddressNode> nodes) {58 public void setAddressEditContainer(List<OSMAddress> nodes) { 59 59 if (isRunning) { 60 60 throw new ConcurrentModificationException(); … … 63 63 } 64 64 65 public List< AddressNode> getAddressesToGuess() {65 public List<OSMAddress> getAddressesToGuess() { 66 66 return addressesToGuess; 67 67 } … … 182 182 183 183 184 List< AddressNode> shadowCopy = new ArrayList<AddressNode>(addressesToGuess);185 for ( AddressNodeaNode : shadowCopy) {184 List<OSMAddress> shadowCopy = new ArrayList<OSMAddress>(addressesToGuess); 185 for (OSMAddress aNode : shadowCopy) { 186 186 minDist = Double.MAX_VALUE; 187 187 curAddressNode = aNode; … … 235 235 private class GuessStreetValueHandler extends GuessedValueHandler { 236 236 237 public GuessStreetValueHandler(String tag, AddressNodeaNode) {237 public GuessStreetValueHandler(String tag, OSMAddress aNode) { 238 238 super(tag, aNode); 239 239 } … … 253 253 public void visit(Way w) { 254 254 if (TagUtils.isStreetSupportingHousenumbers(w)) { 255 AddressNodeaNode = getAddressNode();255 OSMAddress aNode = getAddressNode(); 256 256 double dist = OsmUtils.getMinimumDistanceToWay(aNode.getCoor(), w); 257 257 if (dist < minDist && dist < getMaxDistance()) { -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessedValueHandler.java
r24088 r24091 35 35 protected double minDist; 36 36 protected String currentValue; 37 private AddressNodeaNode;37 private OSMAddress aNode; 38 38 private double maxDist = DEFAULT_MAX_DIST; 39 39 … … 45 45 * @param maxDist the maximum distance for a node/way to be considered as guessed value. 46 46 */ 47 public GuessedValueHandler(String tag, AddressNodeaNode) {47 public GuessedValueHandler(String tag, OSMAddress aNode) { 48 48 this(tag, aNode, DEFAULT_MAX_DIST); 49 49 } … … 56 56 * @param maxDist the maximum distance for a node/way to be considered as guessed value. 57 57 */ 58 public GuessedValueHandler(String tag, AddressNodeaNode, double maxDist) {58 public GuessedValueHandler(String tag, OSMAddress aNode, double maxDist) { 59 59 super(); 60 60 … … 82 82 * @return the aNode 83 83 */ 84 protected AddressNodegetAddressNode() {84 protected OSMAddress getAddressNode() { 85 85 return aNode; 86 86 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/NodeFactory.java
r24089 r24091 20 20 21 21 public class NodeFactory { 22 private static HashMap<String, AddressNode> addressCache = new HashMap<String, AddressNode>();22 private static HashMap<String, OSMAddress> addressCache = new HashMap<String, OSMAddress>(); 23 23 24 24 /** … … 27 27 * @return 28 28 */ 29 public static AddressNodecreateNode(Node node) {29 public static OSMAddress createNode(Node node) { 30 30 if (TagUtils.isAddress(node)) { 31 31 String aid = "" + node.getId(); 32 32 33 AddressNodeaNode = lookup(aid);33 OSMAddress aNode = lookup(aid); 34 34 if (aNode == null) { 35 aNode = new AddressNode(node);35 aNode = new OSMAddress(node); 36 36 addressCache.put(aid, aNode); 37 37 } else { … … 58 58 String aid = "" + way.getId(); 59 59 60 AddressNodeaNode = lookup(aid);60 OSMAddress aNode = lookup(aid); 61 61 if (aNode == null) { 62 aNode = new AddressNode(way);62 aNode = new OSMAddress(way); 63 63 addressCache.put(aid, aNode); 64 64 } else { … … 71 71 } 72 72 73 private static AddressNodelookup(String aid) {73 private static OSMAddress lookup(String aid) { 74 74 if (addressCache.containsKey(aid)) { 75 75 return addressCache.get(aid); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMAddress.java
r24090 r24091 19 19 20 20 /** 21 * The class AddressNoderepresents a single address node of OSM. It is a lightweight21 * The class OSMAddress represents a single address node of OSM. It is a lightweight 22 22 * wrapper for a OSM node in order to simplify tag handling. 23 23 */ 24 public class AddressNodeextends OSMEntityBase {24 public class OSMAddress extends OSMEntityBase { 25 25 public static final String MISSING_TAG = "?"; 26 26 … … 30 30 private HashMap<String, String> derivedValues = new HashMap<String, String>(); 31 31 32 public AddressNode(OsmPrimitive osmObject) {32 public OSMAddress(OsmPrimitive osmObject) { 33 33 super(osmObject); 34 34 } … … 276 276 @Override 277 277 public int compareTo(IOSMEntity o) { 278 if (o == null || !(o instanceof AddressNode)) {278 if (o == null || !(o instanceof OSMAddress)) { 279 279 return -1; 280 280 } 281 AddressNode other = (AddressNode) o;281 OSMAddress other = (OSMAddress) o; 282 282 283 283 int cc = 0; … … 467 467 @Override 468 468 public String toString() { 469 return AddressNode.getFormatString(this);470 } 471 472 public static String getFormatString( AddressNodenode) {469 return OSMAddress.getFormatString(this); 470 } 471 472 public static String getFormatString(OSMAddress node) { 473 473 // TODO: Add further countries here 474 474 // DE -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/SelectIncompleteAddressesAction.java
r23967 r24091 42 42 List<OsmPrimitive> osms = new ArrayList<OsmPrimitive>(); 43 43 44 for ( AddressNodeaNode : addressEditContainer.getIncompleteAddresses()) {44 for (OSMAddress aNode : addressEditContainer.getIncompleteAddresses()) { 45 45 osms.add(aNode.getOsmObject()); 46 46 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/StreetNode.java
r24090 r24091 28 28 public class StreetNode extends OSMEntityBase { 29 29 private List<IOSMEntity> children; 30 private List< AddressNode> addresses;30 private List<OSMAddress> addresses; 31 31 32 32 /** … … 58 58 } 59 59 60 public void addAddress( AddressNodeaNode) {60 public void addAddress(OSMAddress aNode) { 61 61 lazyCreateAddresses(); 62 62 addresses.add(aNode); … … 65 65 private void lazyCreateAddresses() { 66 66 if (addresses == null) { 67 addresses = new ArrayList< AddressNode>();67 addresses = new ArrayList<OSMAddress>(); 68 68 } 69 69 } … … 73 73 } 74 74 75 public List< AddressNode> getAddresses() {75 public List<OSMAddress> getAddresses() { 76 76 return addresses; 77 77 } 78 78 79 public void setAddresses(List< AddressNode> addresses) {79 public void setAddresses(List<OSMAddress> addresses) { 80 80 this.addresses = addresses; 81 81 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditDialog.java
r24089 r24091 50 50 import org.openstreetmap.josm.gui.SideButton; 51 51 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 52 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;52 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 53 53 import org.openstreetmap.josm.plugins.fixAddresses.IAddressEditContainerListener; 54 54 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; … … 275 275 // show addresses as blue marker 276 276 if (sNode.hasAddresses()) { 277 for ( AddressNodeaNode : sNode.getAddresses()) {277 for (OSMAddress aNode : sNode.getAddresses()) { 278 278 Color markerCol = Color.BLUE; 279 279 if (!aNode.isComplete()) { … … 285 285 } 286 286 287 List< AddressNode> unrAddresses = ev.getSelectedUnresolvedAddresses();287 List<OSMAddress> unrAddresses = ev.getSelectedUnresolvedAddresses(); 288 288 if (unrAddresses != null) { 289 for ( AddressNodeaNode : unrAddresses) {289 for (OSMAddress aNode : unrAddresses) { 290 290 mapViewer.addMapMarker(new MapMarkerDot(Color.ORANGE, aNode.getCoor().lat(), aNode.getCoor().lon())); 291 291 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditModel.java
r24089 r24091 22 22 import javax.swing.tree.TreeNode; 23 23 24 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;24 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 25 25 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 26 26 import org.openstreetmap.josm.plugins.fixAddresses.StreetNode; … … 28 28 public class AddressEditModel { 29 29 private List<StreetNode> streets; 30 private List< AddressNode> unresolvedAddresses;31 private List< AddressNode> incompleteAddresses = new ArrayList<AddressNode>();30 private List<OSMAddress> unresolvedAddresses; 31 private List<OSMAddress> incompleteAddresses = new ArrayList<OSMAddress>(); 32 32 private DefaultMutableTreeNode streetRoot; 33 33 private DefaultMutableTreeNode unresolvedRoot; … … 39 39 */ 40 40 public AddressEditModel(List<StreetNode> streets, 41 List< AddressNode> unresolvedAddresses) {41 List<OSMAddress> unresolvedAddresses) { 42 42 super(); 43 43 this.streets = streets; … … 66 66 treeStreetNode.add(addressNode); 67 67 68 for ( AddressNodeaddr : sNode.getAddresses()) {68 for (OSMAddress addr : sNode.getAddresses()) { 69 69 addressNode.add(new DefaultMutableTreeNode(addr)); 70 70 if (!addr.isComplete()) { … … 90 90 unresolvedRoot = new DefaultMutableTreeNode(); 91 91 92 for ( AddressNodeaddr : unresolvedAddresses) {92 for (OSMAddress addr : unresolvedAddresses) { 93 93 // Add address nodes 94 94 unresolvedRoot.add(new DefaultMutableTreeNode(addr)); … … 109 109 incompleteRoot = new DefaultMutableTreeNode(); 110 110 111 for ( AddressNodeaddr : incompleteAddresses) {111 for (OSMAddress addr : incompleteAddresses) { 112 112 // Add address nodes 113 113 incompleteRoot.add(new DefaultMutableTreeNode(addr)); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditSelectionEvent.java
r23941 r24091 21 21 22 22 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 23 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;23 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 24 24 import org.openstreetmap.josm.plugins.fixAddresses.StreetNode; 25 25 … … 89 89 * @return 90 90 */ 91 public List< AddressNode> getSelectedUnresolvedAddresses() {91 public List<OSMAddress> getSelectedUnresolvedAddresses() { 92 92 if (unresolvedAddressTable != null && 93 93 addressContainer != null && … … 96 96 int[] selRows = unresolvedAddressTable.getSelectedRows(); 97 97 98 List< AddressNode> nodes = new ArrayList<AddressNode>();98 List<OSMAddress> nodes = new ArrayList<OSMAddress>(); 99 99 for (int i = 0; i < selRows.length; i++) { 100 100 if (selRows[i] >= 0 && selRows[i] < addressContainer.getNumberOfUnresolvedAddresses()) { -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/ApplyAllGuessesAction.java
r24089 r24091 25 25 26 26 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 27 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;27 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 28 28 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 29 29 … … 46 46 if (ev == null || ev.getSelectedUnresolvedAddresses() == null) return; 47 47 // fix SELECTED items only 48 List< AddressNode> addrToFix = ev.getSelectedUnresolvedAddresses();48 List<OSMAddress> addrToFix = ev.getSelectedUnresolvedAddresses(); 49 49 applyGuesses(addrToFix); 50 50 } … … 55 55 } 56 56 57 private void applyGuesses(List< AddressNode> addrToFix) {57 private void applyGuesses(List<OSMAddress> addrToFix) { 58 58 beginTransaction(tr("Applied guessed values")); 59 List< AddressNode> addrToFixShadow = new ArrayList<AddressNode>(addrToFix);60 for ( AddressNodeaNode : addrToFixShadow) {59 List<OSMAddress> addrToFixShadow = new ArrayList<OSMAddress>(addrToFix); 60 for (OSMAddress aNode : addrToFixShadow) { 61 61 beginObjectTransaction(aNode); 62 62 aNode.applyAllGuesses(); … … 75 75 if (container == null || container.getUnresolvedAddresses() == null) return; 76 76 77 List< AddressNode> addrToFix = container.getUnresolvedAddresses();77 List<OSMAddress> addrToFix = container.getUnresolvedAddresses(); 78 78 applyGuesses(addrToFix); 79 79 } … … 88 88 int row = table.rowAtPoint(p); 89 89 IOSMEntity node = model.getEntityOfRow(row); 90 if (node instanceof AddressNode) {90 if (node instanceof OSMAddress) { 91 91 beginTransaction(tr("Applied guessed values for ") + node.getOsmObject()); 92 92 beginObjectTransaction(node); 93 AddressNode aNode = (AddressNode) node;93 OSMAddress aNode = (OSMAddress) node; 94 94 if (aNode.hasGuessedStreetName()) { 95 95 aNode.applyAllGuesses(); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AssignAddressToStreetAction.java
r23970 r24091 17 17 18 18 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 19 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;19 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 20 20 import org.openstreetmap.josm.plugins.fixAddresses.StreetNode; 21 21 … … 46 46 if (streetNode != null && ev.getSelectedUnresolvedAddresses() != null) { 47 47 beginTransaction(tr("Set street name") + " '" + streetNode.getName() + "'"); 48 for ( AddressNodeaddrNode : ev.getSelectedUnresolvedAddresses()) {48 for (OSMAddress addrNode : ev.getSelectedUnresolvedAddresses()) { 49 49 beginObjectTransaction(addrNode); 50 50 addrNode.assignStreet(streetNode); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/GuessAddressDataAction.java
r24023 r24091 21 21 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 22 22 import org.openstreetmap.josm.plugins.fixAddresses.AddressFinderThread; 23 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;23 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 24 24 import org.openstreetmap.josm.plugins.fixAddresses.IProgressMonitorFinishedListener; 25 25 … … 80 80 * @param addrNodes 81 81 */ 82 private void internalGuessAddresses(List< AddressNode> nodes) {82 private void internalGuessAddresses(List<OSMAddress> nodes) { 83 83 AddressFinderThread aft = new AddressFinderThread(nodes, tr("Guess street names")); 84 84 aft.addFinishListener(this); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/IncompleteAddressesTableModel.java
r24089 r24091 17 17 18 18 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 19 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;19 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 20 20 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 21 21 … … 60 60 @Override 61 61 public Object getValueAt(int row, int column) { 62 AddressNode aNode = (AddressNode) getEntityOfRow(row);62 OSMAddress aNode = (OSMAddress) getEntityOfRow(row); 63 63 64 64 if (aNode == null) { -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/RemoveAddressTagsAction.java
r23970 r24091 17 17 18 18 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 19 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;19 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 20 20 21 21 @SuppressWarnings("serial") … … 29 29 public void addressEditActionPerformed(AddressEditSelectionEvent ev) { 30 30 beginTransaction(tr("Remove address tags")); 31 for ( AddressNodeaNode : ev.getSelectedUnresolvedAddresses()) {31 for (OSMAddress aNode : ev.getSelectedUnresolvedAddresses()) { 32 32 beginObjectTransaction(aNode); 33 33 aNode.removeAllAddressTags(); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/SelectAddressesInMapAction.java
r23933 r24091 36 36 import org.openstreetmap.josm.data.osm.OsmPrimitive; 37 37 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 38 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;38 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 39 39 40 40 /** … … 87 87 * @param addrToSel 88 88 */ 89 private void internalSelectAddresses(List< AddressNode> addrToSel) {89 private void internalSelectAddresses(List<OSMAddress> addrToSel) { 90 90 if (addrToSel == null) return; 91 91 92 92 List<OsmPrimitive> sel = new ArrayList<OsmPrimitive>(); 93 93 94 for ( AddressNodeaNode : addrToSel) {94 for (OSMAddress aNode : addrToSel) { 95 95 sel.add(aNode.getOsmObject()); 96 96 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/UnresolvedAddressesTableModel.java
r24089 r24091 32 32 33 33 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 34 import org.openstreetmap.josm.plugins.fixAddresses. AddressNode;34 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 35 35 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 36 36 import org.openstreetmap.josm.plugins.fixAddresses.StringUtils; … … 96 96 @Override 97 97 public Object getValueAt(int row, int column) { 98 AddressNode aNode = (AddressNode) getEntityOfRow(row);98 OSMAddress aNode = (OSMAddress) getEntityOfRow(row); 99 99 100 100 if (aNode == null) {
Note:
See TracChangeset
for help on using the changeset viewer.