Changeset 24088 in osm


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

Added documentation / removed some compiler warnings.

Location:
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressFinderThread.java

    r24028 r24088  
    3333import org.xml.sax.SAXException;
    3434
     35/**
     36 * The class AddressFinderThread scans the data set to find the best guess for a missing address field.
     37 *
     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, but
     40 * adds the guessed value to a shadowed field by calling {@link AddressNode#setGuessedValue(String, String)}. 
     41 */
    3542public class AddressFinderThread extends PleaseWaitRunnable implements Visitor {
    3643        private List<AddressNode> addressesToGuess;
     
    3845        private double minDist;
    3946        private AddressNode curAddressNode;
    40         private boolean isRunning = false;
    41         private String nearestName = null;
    42         private String currentName = null;
     47        private boolean isRunning = false;     
    4348        private boolean cancelled;
    4449       
     
    110115                if (dist < minDist) {
    111116                        minDist = dist;
    112                         nearestName = currentName;
    113117                }
    114118        }
     
    123127                if (!TagUtils.hasNameTag(w)) return;
    124128               
    125                 currentName = TagUtils.getNameValue(w);
    126129                for (Node node : w.getNodes()) {
    127130                        visit(node);
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressNode.java

    r24028 r24088  
    1818import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1919
     20/**
     21 * The class AddressNode represents a single address node of OSM. It is a lightweight
     22 * wrapper for a OSM node in order to simplify tag handling.
     23 */
    2024public class AddressNode extends NodeEntityBase {
    2125        public static final String MISSING_TAG = "?";
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/FixAddressesPlugin.java

    r23964 r24088  
    1818import org.openstreetmap.josm.plugins.PluginInformation;
    1919
     20/**
     21 * The Class FixAddressesPlugin is the main entry point for the plugin.
     22 */
    2023public class FixAddressesPlugin extends Plugin {
    2124
    2225        /**
    23          * Constructor for the AddressEdit plugin.
     26         * Constructor for the AddressEdit plugin. Called by JOSM when loading the plugin.
    2427         * @param info Context information of the plugin.
    2528         */
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/FixUnresolvedStreetsAction.java

    r24028 r24088  
    1616
    1717/**
    18  * Action to find and fix addresses without (valid) streets.
     18 * Action to find and fix addresses without (valid) streets. It launches an dialog
     19 * instance of {@link AddressEditDialog}.
     20 *
    1921 * @author Oliver Wieland <oliver.wieland@online.de>
    20  *
    2122 */
    2223
     24@SuppressWarnings("serial")
    2325public class FixUnresolvedStreetsAction extends JosmAction implements SelectionChangedListener {
    24 
    25         /**
    26          *
    27          */
    28         private static final long serialVersionUID = 1L;
    2926        private AddressEditContainer addressEditContainer;
    3027        private Collection<? extends OsmPrimitive> newSelection;
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessedValueHandler.java

    r24028 r24088  
    2424 * The guess is determined by finding the closest way/node with the given tag. If no appropriate node
    2525 * is found within maximum distance, no guess is made.
    26 
     26 *
     27 * The default maximum distance is 100m.
    2728 */
    2829public class GuessedValueHandler implements Visitor {
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/ICommandListener.java

    r23970 r24088  
    2020         * Called by a node entity if a command has been created. Clients may collect
    2121         * these commands to define a sequence command.
    22          * @param entity
    23          * @param command
     22         * @param entity The entity which created/used the command.
     23         * @param command The command instance to process by the enclosing command listener.
    2424         */
    2525        public void commandIssued(INodeEntity entity, Command command);
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/NodeEntityBase.java

    r23971 r24088  
    2727import org.openstreetmap.josm.data.osm.Way;
    2828
     29/**
     30 * The class NodeEntityBase provides a base implementation for the {@link INodeEntity} interface.
     31 *
     32 * The implementation comprises
     33 * <ol>
     34 * <li>Handle change listeners
     35 * <li>Links the corresponding OSM object
     36 * <li>Tag handling
     37 * </ol>
     38 */
    2939public class NodeEntityBase implements INodeEntity, Comparable<INodeEntity> {
    3040        public static final String ANONYMOUS = tr("No name");
Note: See TracChangeset for help on using the changeset viewer.