Changeset 24093 in osm for applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap
- Timestamp:
- 2010-11-06T18:39:07+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressEditContainer.java
r24091 r24093 74 74 private Collection<? extends OsmPrimitive> workingSet; 75 75 /** The street dictionary collecting all streets to a set of unique street names. */ 76 private HashMap<String, StreetNode> streetDict = new HashMap<String, StreetNode>(100);76 private HashMap<String, OSMStreet> streetDict = new HashMap<String, OSMStreet>(100); 77 77 78 78 /** The unresolved addresses list. */ … … 83 83 84 84 /** The shadow copy to assemble the street dict during update. */ 85 private HashMap<String, StreetNode> shadowStreetDict = new HashMap<String, StreetNode>(100);85 private HashMap<String, OSMStreet> shadowStreetDict = new HashMap<String, OSMStreet>(100); 86 86 /** The shadow copy to assemble the unresolved addresses during update. */ 87 87 private List<OSMAddress> shadowUnresolvedAddresses = new ArrayList<OSMAddress>(100); … … 297 297 if (StringUtils.isNullOrEmpty(name)) return false; 298 298 299 StreetNodesNode = null;299 OSMStreet sNode = null; 300 300 if (shadowStreetDict.containsKey(name)) { // street exists? 301 301 sNode = shadowStreetDict.get(name); 302 302 } else { // new street name -> add to dict 303 sNode = new StreetNode(w);303 sNode = new OSMStreet(w); 304 304 shadowStreetDict.put(name, sNode); 305 305 } … … 344 344 * @return 345 345 */ 346 public HashMap<String, StreetNode> getStreetDict() {346 public HashMap<String, OSMStreet> getStreetDict() { 347 347 return streetDict; 348 348 } … … 371 371 * @return the street list 372 372 */ 373 public List< StreetNode> getStreetList() {374 ArrayList< StreetNode> sortedList = new ArrayList<StreetNode>(streetDict.values());373 public List<OSMStreet> getStreetList() { 374 ArrayList<OSMStreet> sortedList = new ArrayList<OSMStreet>(streetDict.values()); 375 375 Collections.sort(sortedList); 376 376 return sortedList; … … 463 463 464 464 if (streetName != null && shadowStreetDict.containsKey(streetName)) { 465 StreetNodesNode = shadowStreetDict.get(streetName);465 OSMStreet sNode = shadowStreetDict.get(streetName); 466 466 sNode.addAddress(aNode); 467 467 return true; … … 524 524 incompleteAddresses = new ArrayList<OSMAddress>(shadowIncompleteAddresses); 525 525 unresolvedAddresses = new ArrayList<OSMAddress>(shadowUnresolvedAddresses); 526 streetDict = new HashMap<String, StreetNode>(shadowStreetDict);526 streetDict = new HashMap<String, OSMStreet>(shadowStreetDict); 527 527 // remove temp data 528 528 shadowStreetDict.clear(); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMAddress.java
r24091 r24093 320 320 * @param node 321 321 */ 322 public void assignStreet( StreetNodenode) {322 public void assignStreet(OSMStreet node) { 323 323 if (node == null || !node.hasName()) return; 324 324 -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditDialog.java
r24091 r24093 53 53 import org.openstreetmap.josm.plugins.fixAddresses.IAddressEditContainerListener; 54 54 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 55 import org.openstreetmap.josm.plugins.fixAddresses. StreetNode;55 import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet; 56 56 import org.openstreetmap.josm.plugins.fixAddresses.StringUtils; 57 57 import org.openstreetmap.josm.tools.ImageProvider; … … 260 260 261 261 clearMapViewer(); 262 StreetNodesNode = ev.getSelectedStreet();262 OSMStreet sNode = ev.getSelectedStreet(); 263 263 if (sNode != null) { 264 264 -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditModel.java
r24091 r24093 24 24 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 25 25 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 26 import org.openstreetmap.josm.plugins.fixAddresses. StreetNode;26 import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet; 27 27 28 28 public class AddressEditModel { 29 private List< StreetNode> streets;29 private List<OSMStreet> streets; 30 30 private List<OSMAddress> unresolvedAddresses; 31 31 private List<OSMAddress> incompleteAddresses = new ArrayList<OSMAddress>(); … … 38 38 * @param unresolvedAddresses 39 39 */ 40 public AddressEditModel(List< StreetNode> streets,40 public AddressEditModel(List<OSMStreet> streets, 41 41 List<OSMAddress> unresolvedAddresses) { 42 42 super(); … … 50 50 if (streetRoot == null) { 51 51 streetRoot = new DefaultMutableTreeNode(); 52 for ( StreetNodesNode : streets) {52 for (OSMStreet sNode : streets) { 53 53 DefaultMutableTreeNode treeStreetNode = new DefaultMutableTreeNode(sNode); 54 54 -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditSelectionEvent.java
r24091 r24093 22 22 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 23 23 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 24 import org.openstreetmap.josm.plugins.fixAddresses. StreetNode;24 import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet; 25 25 26 26 public class AddressEditSelectionEvent extends ActionEvent { … … 72 72 * @return 73 73 */ 74 public StreetNodegetSelectedStreet() {74 public OSMStreet getSelectedStreet() { 75 75 if (streetTable != null && addressContainer != null && addressContainer.getStreetList() != null) { 76 76 int selRows = streetTable.getSelectedRow(); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AssignAddressToStreetAction.java
r24091 r24093 18 18 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 19 19 import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress; 20 import org.openstreetmap.josm.plugins.fixAddresses. StreetNode;20 import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet; 21 21 22 22 /** … … 42 42 @Override 43 43 public void addressEditActionPerformed(AddressEditSelectionEvent ev) { 44 StreetNodestreetNode = ev.getSelectedStreet();44 OSMStreet streetNode = ev.getSelectedStreet(); 45 45 46 46 if (streetNode != null && ev.getSelectedUnresolvedAddresses() != null) { -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/StreetTableModel.java
r24089 r24093 18 18 import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer; 19 19 import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity; 20 import org.openstreetmap.josm.plugins.fixAddresses. StreetNode;20 import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet; 21 21 22 22 public class StreetTableModel extends AddressEditTableModel { … … 79 79 @Override 80 80 public Object getValueAt(int row, int column) { 81 StreetNode sNode = (StreetNode) getEntityOfRow(row);81 OSMStreet sNode = (OSMStreet) getEntityOfRow(row); 82 82 83 83 if (sNode == null) {
Note:
See TracChangeset
for help on using the changeset viewer.