Ignore:
Timestamp:
2010-09-15T18:54:18+02:00 (14 years ago)
Author:
stoecker
Message:

remove tabs

Location:
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java

    r22915 r23190  
    8686
    8787    public CzechAddressPlugin(PluginInformation info) {
    88         super(info);
     88        super(info);
    8989
    9090        /*boolean x;
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/DatabaseLoadException.java

    r15166 r23190  
    66/**
    77 * Exception occuring during parsing the database.
    8  * 
     8 *
    99 * <p>This exception is used during <i>download</i>, <i>extraction</i> or
    1010 * <i>parsing</i> of the database. It can set a message to be displayed
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/NotNullList.java

    r15585 r23190  
    66/**
    77 * ArrayList, which refuses to add {@code null}.
    8  * 
     8 *
    99 * @author Radomír Černoch, radomir.cernoch@gmail.com
    1010 */
     
    3939        if (c == null)
    4040            return false;
    41        
     41
    4242        if (c instanceof NotNullList)
    4343            return super.addAll(c);
     
    4646        return true;
    4747    }
    48    
     48
    4949}
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/PrimUtils.java

    r16743 r23190  
    66/**
    77 * Utilities for handling {@link OsmPrimitive}s.
    8  * 
     8 *
    99 * @author Radomír Černoch, radomir.cernoch@gmail.com
    1010 */
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/StatusListener.java

    r15585 r23190  
    2121 *
    2222 * @see CzechAddressPlugin
    23  * 
     23 *
    2424 * @author Radomír Černoch, radomir.cernoch@gmail.com
    2525 */
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/StringUtils.java

    r18894 r23190  
    107107                return false;
    108108        }
    109        
     109
    110110        return true;
    111111    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ManagerAction.java

    r15585 r23190  
    1111 *
    1212 * @author Radomír Černoch, radomir.cernoch@gmail.com
    13  * 
     13 *
    1414 * @see ManagerDialog
    1515 */
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java

    r21860 r23190  
    6363                if (!(prim2 instanceof Way)) continue;
    6464                if (prim2.equals(prim))      continue;
    65                 Way border = (Way) prim2;
     65                Way border = (Way) prim2;
    6666                if (border.getNodes().size() == 0)   continue;
    6767                if (border.keySet().size() > 0) continue;
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java

    r19943 r23190  
    1414 *
    1515 * <p>Every element must have a <i>name</i> and may have a <i>parent</i>.</p>
    16  * 
     16 *
    1717 * @author Radomír Černoch radomir.cernoch@gmail.com
    1818 */
     
    9999            Node node = (Node) prim;
    100100            result += " " + StringUtils.latLonToString(node.getCoor());
    101            
     101
    102102        } else if (prim instanceof Way) {
    103103            Way way = (Way) prim;
     
    135135    /**
    136136     * Compares 2 elements.
    137      * 
     137     *
    138138     * <p>Basic criterion to comparing elements is their <i>name</i> and the
    139139     * </i>parent</i>. Notice that this behaviour might be changed
     
    217217    }
    218218
    219    
     219
    220220    protected int[] getFieldMatchList(OsmPrimitive primitive) {
    221         int[] result = {0};       
     221        int[] result = {0};
    222222        return result;
    223223    }
     
    242242     */
    243243    public int getQ(OsmPrimitive primitive) {
    244        
     244
    245245        // Firstly get integers representing a match of every matchable field.
    246246        int[] fieldMatches = getFieldMatchList(primitive);
    247247        assert fieldMatches.length > 0;
    248        
     248
    249249        // Now find the max and min of this array.
    250250        int minVal = fieldMatches[0];
     
    260260        assert Math.abs(minVal) <= 1;
    261261        assert Math.abs(maxVal) <= 1;
    262        
     262
    263263        // If the best among all fields is 'neutral' match, the given primitive
    264264        // has nothing to do with our field.
    265265        if (maxVal <= 0)
    266266            return Reasoner.MATCH_NOMATCH;
    267        
     267
    268268        // If all fields are 1    --> ROCKSOLID MATCH
    269269        // If some are 1, none -1 --> PARTIAL MATCH
     
    274274            case +1 : return Reasoner.MATCH_ROCKSOLID;
    275275        }
    276        
     276
    277277        return 0; // <-- just to make compilers happy. We cannot get here.
    278278    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Database.java

    r15585 r23190  
    99 * <p>Contains the tree of all regions, municipalities, suburbs, streets
    1010 * and houses in the Czech republic.</p>
    11  * 
     11 *
    1212 * @see AddressElement
    1313 * @see DatabaseParser
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithHouses.java

    r15763 r23190  
    4747    /**
    4848     * Returns all houses directly contained in this element.
    49      * 
     49     *
    5050     * NOTICE: If a subclass element contains other data structured capable
    5151     * of storing houses, they are not included in the returned set.
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithStreets.java

    r15585 r23190  
    2424    public void addStreet(Street streetToAdd) {
    2525        //if (streetToAdd.getParent() instanceof ElementWithStreets)
    26        
     26
    2727        streetToAdd.setParent(this);
    2828        streets.add(streetToAdd);
     
    7979        // We make an conservative estimate...
    8080        List<House> result = new ArrayList<House>(20 * streets.size());
    81        
     81
    8282        result.addAll(this.houses);
    83        
     83
    8484        for (Street street : streets)
    8585            result.addAll(street.getHouses());
    86        
     86
    8787        return result;
    8888    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java

    r16743 r23190  
    2020 * {@link ElementWithHouses}. The {@code setParent()} method should
    2121 * be called immediatelly after the constructor.</p>
    22  * 
     22 *
    2323 * @author Radomír Černoch, radomir.cernoch@gmail.com
    2424 */
     
    4444
    4545        assert (co != null) || (cp != null);
    46        
     46
    4747        //... but the the name is overwritten.
    4848        this.name = generateName(this.cp, this.co);
    4949    }
    50    
     50
    5151    /**
    5252     * Returns the number unique in a suburb (číslo popisné)
     
    128128        super.setParent(parent);
    129129    }
    130    
     130
    131131    /**
    132132     * Returns the parent of this house with type-checking.
     
    159159        result[0] = matchField(this.cp, prim.get(PrimUtils.KEY_ADDR_CP));
    160160        result[2] = matchField(name,    prim.get(PrimUtils.KEY_ADDR_HOUSE_N));
    161        
     161
    162162        // Second field is the Housenumber
    163163        if (parent instanceof Street)
     
    178178    }
    179179
    180    
     180
    181181
    182182    /**
     
    188188    @Override
    189189    public List<Proposal> getDiff(OsmPrimitive prim) {
    190        
     190
    191191        List<Proposal> props = new NotNullList<Proposal>();
    192192        ParentResolver resolver = new ParentResolver(this);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Region.java

    r15585 r23190  
    1010 */
    1111public class Region extends ElementWithStreets {
    12    
     12
    1313    private ArrayList<ViToCi> vitocis
    1414            = new ArrayList<ViToCi>();
    15    
     15
    1616    /**
    1717     * Adds a single municipality into this element.
     
    2121        vitocis.add(municipality);
    2222    }
    23    
     23
    2424    /**
    2525     * Replaces the list of municipalities of this element.
     
    3030            obec.setParent(this);
    3131    }
    32    
     32
    3333    /**
    3434     * Returns the list of all municipalities in this region.
     
    5353    String nuts3name = null;
    5454    String nuts4name = null;
    55    
     55
    5656    /**
    5757     * Default constructor setting the name of this region.
     
    6161        super(name);
    6262    }
    63    
     63
    6464    /**
    6565     * Constructor which sets the region's name together with higher
     
    7171        if (nuts4name != null) this.nuts4name = nuts4name;
    7272    }
    73    
     73
    7474    public String getNuts3Name() {
    7575        return nuts3name;
    7676    }
    77    
     77
    7878    public String getNuts4Name() {
    7979        return nuts4name;
    8080    }
    81    
     81
    8282    /**
    8383     * Returns the name of this region. If the NUTS3 name was entered,
     
    8686    @Override
    8787    public String toString() {
    88        
     88
    8989        String thisString = name;
    90        
     90
    9191        if (nuts3name != null)
    9292            thisString += " (kraj " + nuts3name + ")";
    93        
     93
    9494        return thisString;
    9595    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Street.java

    r15582 r23190  
    2525        super.setParent(parent);
    2626    }
    27    
     27
    2828    @Override
    2929    public ElementWithStreets getParent() {
     
    3636        int[] result = {0};
    3737        if (!isMatchable(primitive)) return result;
    38        
     38
    3939        result[0] = matchFieldAbbrev(name, primitive.get("name"));
    4040        return result;
     
    4444    public List<Proposal> getDiff(OsmPrimitive prim) {
    4545        List<Proposal> props = new NotNullList<Proposal>();
    46        
     46
    4747        props.add(getStringFieldDiff(PrimUtils.KEY_NAME, prim.get(PrimUtils.KEY_NAME), getName()));
    4848        return props;
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Suburb.java

    r15582 r23190  
    66/**
    77 * Suburb is a part of a {@link Municipality}.
    8  * 
     8 *
    99 * @author Radomír Černoch radomir.cernoch@gmail.com
    1010 */
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ViToCi.java

    r15582 r23190  
    66/**
    77 * ViToCi is either a village, town or a city.
    8  * 
     8 *
    99 * @author Radomír Černoch radomir.cernoch@gmail.com
    1010 */
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java

    r18408 r23190  
    234234                if (r.translate(prim) != null)
    235235                    r.unOverwrite(prim, r.translate(prim));
    236                
     236
    237237                ComboBoxModel model = candField.getModel();
    238238                for (int i = 0; i < model.getSize(); i++) {
     
    242242                        r.unOverwrite(r.translate(elem), elem);
    243243                }
    244                
     244
    245245                r.doOverwrite(prim, (AddressElement) model.getSelectedItem());
    246246            }
     
    358358                                        +AddressElement.getName(prim) + "“");
    359359                primitives.add(-index-1, prim);
    360                
     360
    361361                ListDataEvent evt = new ListDataEvent(this,
    362362                        ListDataEvent.INTERVAL_ADDED,
     
    364364                for (ListDataListener listener : listeners)
    365365                    listener.intervalAdded(evt);
    366                
     366
    367367                if (mainField.getSelectedItem() == null)
    368368                    mainField.setSelectedIndex(-index-1);
     
    378378                                        + elem.getName() + "“");
    379379                elements.remove(index);
    380                
     380
    381381                if (selected == elem)
    382382                    setSelectedItem(null);
     
    401401                if (selected == prim)
    402402                    setSelectedItem(null);
    403                
     403
    404404                ListDataEvent evt = new ListDataEvent(this,
    405405                        ListDataEvent.INTERVAL_REMOVED,
     
    419419            elements.clear();
    420420            primitives.clear();
    421            
     421
    422422            for (ListDataListener listener : listeners)
    423423                listener.contentsChanged(evt);
    424424        }
    425        
     425
    426426        public void setSelectedItem(Object anItem) {
    427427
     
    447447            if (index< elements.size())
    448448                return elements.get(index);
    449            
     449
    450450            index -= elements.size();
    451451
    452452            if (index< primitives.size())
    453453                return primitives.get(index);
    454            
     454
    455455            return null;
    456456        }
     
    466466
    467467    private void updateCandidatesModel(Object selected) {
    468        
     468
    469469        if (selected instanceof AddressElement) {
    470470            AddressElement selElem = (AddressElement) selected;
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java

    r18896 r23190  
    5252    private HouseListModel  houseModel  = new HouseListModel();
    5353    private StreetListModel streetModel = new StreetListModel();
    54    
     54
    5555    private FactoryDialog() {
    5656
     
    8989            return;
    9090        }
    91        
     91
    9292        if (message == MESSAGE_LOCATION_CHANGED) {
    9393            DataSet.selListeners.add(this);
     
    9999            keepOddityCheckBox.setEnabled(true);
    100100            return;
    101         }       
     101        }
    102102    }
    103103
     
    174174            do {
    175175                selectNextUnmatchedHouse();
    176                    
     176
    177177                String newStr = StringUtils.extractNumber(getSelectedHouse().getCO());
    178178
     
    360360                setFont(getFont().deriveFont(Font.PLAIN));
    361361                setText(((Street) value).getName());
    362                
     362
    363363            } else if (value instanceof ElementWithHouses) {
    364364                setFont(getFont().deriveFont(Font.BOLD));
    365365                setText("[" + ((ElementWithHouses) value).getName() + "]");
    366366            }
    367            
     367
    368368            return c;
    369369        }
     
    435435            House house = (House) elem;
    436436            int index = Collections.binarySearch(houses, house);
    437            
     437
    438438            if (Reasoner.getInstance().translate(house) != null) {
    439439                if (index >= 0) houses.remove(index);
     
    441441                if (index < 0)  houses.add(-index-1, house);
    442442            }
    443            
     443
    444444            houseModel.notifyAllListeners();
    445445        }
     
    472472            this.selected = parent;
    473473            this.parent   = parent;
    474            
     474
    475475            metaElem.set(0, parent);
    476476            metaElem.get(1).setHouses(parent.getAllHouses());
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/GroupManipulatorDialog.java

    r22015 r23190  
    124124
    125125        proposalTree.addKeyListener(new java.awt.event.KeyAdapter() {
    126                 @Override
     126            @Override
    127127            public void keyReleased(java.awt.event.KeyEvent evt) {
    128128                proposalTreeKeyReleased(evt);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java

    r22915 r23190  
    7979     *
    8080     */
    81         private void initLocationHints() {
     81    private void initLocationHints() {
    8282        boolean assertions = false;
    8383        assert  assertions = true;
     
    177177        int curHlIndex = 0;
    178178
    179         for (int i = 0; i < list.getSize(); i++) 
     179        for (int i = 0; i < list.getSize(); i++)
    180180            for (int j = 0; j < hlList.size(); j++) {
    181181                Object t = list.getElementAt(i);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java

    r22015 r23190  
    207207
    208208        alternateNumberEdit.addKeyListener(new java.awt.event.KeyAdapter() {
    209                 @Override
     209            @Override
    210210            public void keyReleased(java.awt.event.KeyEvent evt) {
    211211                PointManipulatorDialog.this.keyReleased(evt);
     
    228228        proposalList.addKeyListener(new java.awt.event.KeyAdapter() {
    229229            @Override
    230                         public void keyReleased(java.awt.event.KeyEvent evt) {
     230            public void keyReleased(java.awt.event.KeyEvent evt) {
    231231                proposalListKeyReleased(evt);
    232232            }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/SuburbEditor.java

    r18408 r23190  
    2828        this.parent = suburb.getParent();
    2929        nameField.setText(suburb.getName());
    30        
     30
    3131        if (parent != null)
    3232            parentField.setText(parent.getName());
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/UniversalListRenderer.java

    r15585 r23190  
    1515    public Component getListCellRendererComponent(JList list, Object value,
    1616                          int index, boolean isSelected, boolean cellHasFocus) {
    17        
     17
    1818        Component c = super.getListCellRendererComponent(list, value, index,
    1919                                                      isSelected, cellHasFocus);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/UniversalRenderer.java

    r15585 r23190  
    3434
    3535    public static ImageIcon getIcon(Object value) {
    36        
     36
    3737             if (value instanceof AddKeyValueProposal)    return iconAdd;
    3838        else if (value instanceof KeyValueChangeProposal) return iconEdit;
     
    6969        if (value instanceof AddressElement)
    7070            return ((AddressElement) value).getName();
    71                
     71
    7272        if (value instanceof OsmPrimitive)
    7373            return AddressElement.getName(value);
     
    7575        if (value == null)
    7676            return "";
    77        
     77
    7878        return value.toString();
    7979    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Reasoner.java

    r18896 r23190  
    9999     * modify the data in the reasoner.
    100100     * The only exception is {@code reset()}.</p>
    101      * 
     101     *
    102102     * <p>When there's an open transaction, the result of most output methods
    103103     * undefined. Exceptions to this rules are indicated.</p>
     
    387387        if (getStrictlyBest(elem) == prim)
    388388            return elem;
    389        
     389
    390390        return null;
    391391    }
     
    417417        if (getStrictlyBest(prim) == elem)
    418418            return prim;
    419        
     419
    420420        return null;
    421421    }
     
    515515                best = cand;
    516516        }
    517        
     517
    518518        for (OsmPrimitive prim : elemMatchIndex.get(elem).keySet()) {
    519519            int cand = elemMatchIndex.get(elem).get(prim);
     
    542542     */
    543543    public AddressElement getStrictlyBest(OsmPrimitive prim) {
    544        
     544
    545545        AddressElement result = null;
    546546        try {
     
    563563                }
    564564            }
    565            
     565
    566566        } catch (NullPointerException except) {
    567567            System.err.println("Strange exception occured." +
     
    601601                return null;
    602602            }
    603            
     603
    604604            int bestQ = MATCH_NOMATCH;
    605605            for (OsmPrimitive prim : matches.keySet()) {
     
    683683            ProposalContainer container = new ProposalContainer(prim);
    684684            container.addProposals(elem.getDiff(prim));
    685            
     685
    686686            if (container.getProposals().size() > 0)
    687687                database.addContainer(container);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/parser/DatabaseParser.java

    r19964 r23190  
    1414/**
    1515 * General superclass for any parser capable of filling the database.
    16  * 
     16 *
    1717 * @see Database
    1818 *
     
    4343    /**
    4444     * The ultimate method, which starts filling the database.
    45      * 
     45     *
    4646     * @throws DatabaseLoadException if anything goes wrong...
    4747     */
     
    6060    /**
    6161     * The internal method, which does the actual parsing.
    62      * 
     62     *
    6363     * @throws DatabaseLoadException should be thrown if anything gets wrong...
    6464     */
     
    8787     *
    8888     * The URL is provided by {@code getDatabaseUrl()} method.
    89      * 
     89     *
    9090     * @throws DatabaseLoadException if any error occurs during the download.
    9191     */
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/parser/MvcrParser.java

    r19964 r23190  
    5757            return;
    5858        }
    59        
     59
    6060        // ========== PARSING STREET ========== //
    6161        if (name.equals("ulice")) {
     
    245245        ZipEntry zipEntry = null;
    246246        try {
    247             zis = new ZipInputStream(new FileInputStream(getDatabasePath()));
    248 
    249             while ((zipEntry = zis.getNextEntry()) != null)
    250                 if (zipEntry.getName().equals("adresy.xml"))
    251                         break;
     247        zis = new ZipInputStream(new FileInputStream(getDatabasePath()));
     248
     249        while ((zipEntry = zis.getNextEntry()) != null)
     250            if (zipEntry.getName().equals("adresy.xml"))
     251                break;
    252252
    253253        } catch (IOException ioexp) {
     
    256256
    257257        if (zipEntry == null)
    258             throw new DatabaseLoadException(
     258        throw new DatabaseLoadException(
    259259                    "ZIP archiv s databází neobsahuje soubor 'adresy.xml'.");
    260260
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalDatabase.java

    r15166 r23190  
    8585    public void addProposals(OsmPrimitive primitive,
    8686                             Collection<Proposal> proposal) {
    87        
     87
    8888        ProposalContainer container = findContainer(primitive);
    8989        if (container == null) {
     
    114114    /**
    115115     * Gives a reference to the internal list of {@link ProposalContainer}s.
    116      * 
     116     *
    117117     * @return the refernence to internal changeset.
    118118     */
Note: See TracChangeset for help on using the changeset viewer.