Ignore:
Timestamp:
2010-11-06T18:39:07+01:00 (14 years ago)
Author:
oliverw
Message:

StreetNode -> OSMStreet

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  
    7474        private Collection<? extends OsmPrimitive> workingSet;
    7575        /** 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);
    7777       
    7878        /** The unresolved addresses list. */
     
    8383       
    8484        /** 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);
    8686        /** The shadow copy to assemble the unresolved addresses during update. */
    8787        private List<OSMAddress> shadowUnresolvedAddresses = new ArrayList<OSMAddress>(100);
     
    297297                                        if (StringUtils.isNullOrEmpty(name)) return false;
    298298
    299                                         StreetNode sNode = null;
     299                                        OSMStreet sNode = null;
    300300                                        if (shadowStreetDict.containsKey(name)) { // street exists?
    301301                                                sNode = shadowStreetDict.get(name);
    302302                                        } else { // new street name -> add to dict
    303                                                 sNode = new StreetNode(w);
     303                                                sNode = new OSMStreet(w);
    304304                                                shadowStreetDict.put(name, sNode);
    305305                                        }
     
    344344         * @return
    345345         */
    346         public HashMap<String, StreetNode> getStreetDict() {
     346        public HashMap<String, OSMStreet> getStreetDict() {
    347347                return streetDict;
    348348        }
     
    371371         * @return the street list
    372372         */
    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());
    375375                Collections.sort(sortedList);
    376376                return sortedList;
     
    463463               
    464464                if (streetName != null && shadowStreetDict.containsKey(streetName)) {
    465                         StreetNode sNode = shadowStreetDict.get(streetName);
     465                        OSMStreet sNode = shadowStreetDict.get(streetName);
    466466                        sNode.addAddress(aNode);
    467467                        return true;
     
    524524                        incompleteAddresses = new ArrayList<OSMAddress>(shadowIncompleteAddresses);
    525525                        unresolvedAddresses = new ArrayList<OSMAddress>(shadowUnresolvedAddresses);
    526                         streetDict = new HashMap<String, StreetNode>(shadowStreetDict);
     526                        streetDict = new HashMap<String, OSMStreet>(shadowStreetDict);
    527527                        // remove temp data
    528528                        shadowStreetDict.clear();
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OSMAddress.java

    r24091 r24093  
    320320         * @param node
    321321         */
    322         public void assignStreet(StreetNode node) {
     322        public void assignStreet(OSMStreet node) {
    323323                if (node == null || !node.hasName()) return;
    324324               
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditDialog.java

    r24091 r24093  
    5353import org.openstreetmap.josm.plugins.fixAddresses.IAddressEditContainerListener;
    5454import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
    55 import org.openstreetmap.josm.plugins.fixAddresses.StreetNode;
     55import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet;
    5656import org.openstreetmap.josm.plugins.fixAddresses.StringUtils;
    5757import org.openstreetmap.josm.tools.ImageProvider;
     
    260260               
    261261                clearMapViewer();
    262                 StreetNode sNode = ev.getSelectedStreet();
     262                OSMStreet sNode = ev.getSelectedStreet();
    263263                if (sNode != null) {
    264264                                               
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditModel.java

    r24091 r24093  
    2424import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress;
    2525import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
    26 import org.openstreetmap.josm.plugins.fixAddresses.StreetNode;
     26import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet;
    2727
    2828public class AddressEditModel {
    29         private List<StreetNode> streets;
     29        private List<OSMStreet> streets;
    3030        private List<OSMAddress> unresolvedAddresses;
    3131        private List<OSMAddress> incompleteAddresses = new ArrayList<OSMAddress>();
     
    3838         * @param unresolvedAddresses
    3939         */
    40         public AddressEditModel(List<StreetNode> streets,
     40        public AddressEditModel(List<OSMStreet> streets,
    4141                        List<OSMAddress> unresolvedAddresses) {
    4242                super();
     
    5050                if (streetRoot == null) {
    5151                        streetRoot = new DefaultMutableTreeNode();
    52                         for (StreetNode sNode : streets) {
     52                        for (OSMStreet sNode : streets) {
    5353                                DefaultMutableTreeNode treeStreetNode = new DefaultMutableTreeNode(sNode);
    5454                               
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AddressEditSelectionEvent.java

    r24091 r24093  
    2222import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer;
    2323import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress;
    24 import org.openstreetmap.josm.plugins.fixAddresses.StreetNode;
     24import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet;
    2525
    2626public class AddressEditSelectionEvent extends ActionEvent {
     
    7272         * @return
    7373         */
    74         public StreetNode getSelectedStreet() {
     74        public OSMStreet getSelectedStreet() {
    7575                if (streetTable != null && addressContainer != null && addressContainer.getStreetList() != null) {
    7676                        int selRows = streetTable.getSelectedRow();
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/AssignAddressToStreetAction.java

    r24091 r24093  
    1818import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer;
    1919import org.openstreetmap.josm.plugins.fixAddresses.OSMAddress;
    20 import org.openstreetmap.josm.plugins.fixAddresses.StreetNode;
     20import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet;
    2121
    2222/**
     
    4242        @Override
    4343        public void addressEditActionPerformed(AddressEditSelectionEvent ev) {         
    44                 StreetNode streetNode = ev.getSelectedStreet();
     44                OSMStreet streetNode = ev.getSelectedStreet();
    4545                                               
    4646                if (streetNode != null && ev.getSelectedUnresolvedAddresses() != null) {
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/StreetTableModel.java

    r24089 r24093  
    1818import org.openstreetmap.josm.plugins.fixAddresses.AddressEditContainer;
    1919import org.openstreetmap.josm.plugins.fixAddresses.IOSMEntity;
    20 import org.openstreetmap.josm.plugins.fixAddresses.StreetNode;
     20import org.openstreetmap.josm.plugins.fixAddresses.OSMStreet;
    2121
    2222public class StreetTableModel extends AddressEditTableModel {
     
    7979        @Override
    8080        public Object getValueAt(int row, int column) {         
    81                 StreetNode sNode = (StreetNode) getEntityOfRow(row);
     81                OSMStreet sNode = (OSMStreet) getEntityOfRow(row);
    8282               
    8383                if (sNode == null) {
Note: See TracChangeset for help on using the changeset viewer.