Ignore:
Timestamp:
2009-07-27T21:09:44+02:00 (15 years ago)
Author:
jttt
Message:

Way refactoring - added method that will in future replace public field nodes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/PurgePrimitivesCommand.java

    r1814 r1862  
    2121import org.openstreetmap.josm.data.osm.RelationMember;
    2222import org.openstreetmap.josm.data.osm.Way;
    23 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2423import org.openstreetmap.josm.tools.ImageProvider;
    2524
     
    2827 * layer and disconnects any references from {@see Way}s or {@see Relation}s
    2928 * to this primitive.
    30  * 
     29 *
    3130 * This command is necessary if a local {@see OsmPrimitive} has been deleted on
    3231 * the server by another user and if the local user decides to delete his version
    3332 * too. If he only deleted it "logically" JOSM would try to delete it on the server
    3433 * which would result in an non resolvable conflict.
    35  * 
     34 *
    3635 */
    3736public class PurgePrimitivesCommand extends ConflictResolveCommand{
     
    4443     * because a {@see Relation} refers to any other {@see OsmPrimitive}
    4544     * via a relation member.
    46      * 
     45     *
    4746     */
    4847    static class OsmParentChildPair {
     
    10099     * as child and given set of parents. We don't use {@see CollectBackReferencesVisitor}
    101100     * because it seems quite inefficient.
    102      * 
     101     *
    103102     * @param parents  the set of potential parents
    104103     * @param child the child
     
    110109            if (parent instanceof Way) {
    111110                Way w = (Way)parent;
    112                 for (OsmPrimitive node : w.nodes) {
     111                for (OsmPrimitive node : w.getNodes()) {
    113112                    if (node == child) {
    114113                        OsmParentChildPair pair = new OsmParentChildPair(parent, node);
     
    170169    /**
    171170     * Purges an {@see OsmPrimitive} <code>toPurge</code> from a {@see DataSet}.
    172      * 
     171     *
    173172     * @param toPurge the primitive to purge
    174173     * @param ds  the dataset to purge from
    175174     * @param hive the hive of {@see OsmPrimitive}s we remember other {@see OsmPrimitive}
    176175     * we have to purge because we purge <code>toPurge</code>.
    177      * 
     176     *
    178177     */
    179178    protected void purge(OsmPrimitive toPurge, DataSet ds, ArrayList<OsmPrimitive> hive) {
Note: See TracChangeset for help on using the changeset viewer.