org.openstreetmap.josm.command
Class TagConflictResolveCommand

java.lang.Object
  extended by org.openstreetmap.josm.command.PseudoCommand
      extended by org.openstreetmap.josm.command.Command
          extended by org.openstreetmap.josm.command.ConflictResolveCommand
              extended by org.openstreetmap.josm.command.TagConflictResolveCommand

public class TagConflictResolveCommand
extends ConflictResolveCommand

Represents a the resolution of a tag conflict in an OsmPrimitive


Field Summary
private  Conflict<? extends OsmPrimitive> conflict
          the conflict to resolve
private  java.util.List<TagMergeItem> mergeItems
          the list of merge decisions, represented as TagMergeItems
 
Constructor Summary
TagConflictResolveCommand(Conflict<? extends OsmPrimitive> conflict, java.util.List<TagMergeItem> mergeItems)
          constructor
 
Method Summary
 boolean executeCommand()
          Executes the command on the dataset.
 void fillModifiedData(java.util.Collection<OsmPrimitive> modified, java.util.Collection<OsmPrimitive> deleted, java.util.Collection<OsmPrimitive> added)
          Fill in the changed data this command operates on.
 javax.swing.Icon getDescriptionIcon()
          Provides a descriptive icon of this command.
 java.lang.String getDescriptionText()
          Provides a description text representing this command.
 int getNumDecidedConflicts()
          replies the number of decided conflicts
 
Methods inherited from class org.openstreetmap.josm.command.ConflictResolveCommand
reconstituteConflicts, rememberConflict, undoCommand
 
Methods inherited from class org.openstreetmap.josm.command.Command
checkAndConfirmOutlyingOperation, getLayer, getOrig, getParticipatingPrimitives, invalidBecauselayerRemoved
 
Methods inherited from class org.openstreetmap.josm.command.PseudoCommand
getChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conflict

private Conflict<? extends OsmPrimitive> conflict
the conflict to resolve


mergeItems

private final java.util.List<TagMergeItem> mergeItems
the list of merge decisions, represented as TagMergeItems

Constructor Detail

TagConflictResolveCommand

public TagConflictResolveCommand(Conflict<? extends OsmPrimitive> conflict,
                                 java.util.List<TagMergeItem> mergeItems)
constructor

Parameters:
my - my primitive
their - their primitive
mergeItems - the list of merge decisions, represented as TagMergeItems
Method Detail

getNumDecidedConflicts

public int getNumDecidedConflicts()
replies the number of decided conflicts

Returns:
the number of decided conflicts

getDescriptionText

public java.lang.String getDescriptionText()
Description copied from class: PseudoCommand
Provides a description text representing this command.

Specified by:
getDescriptionText in class PseudoCommand

getDescriptionIcon

public javax.swing.Icon getDescriptionIcon()
Description copied from class: PseudoCommand
Provides a descriptive icon of this command.

Overrides:
getDescriptionIcon in class PseudoCommand

executeCommand

public boolean executeCommand()
Description copied from class: Command
Executes the command on the dataset. This implementation will remember all primitives returned by fillModifiedData for restoring them on undo.

Overrides:
executeCommand in class Command

fillModifiedData

public void fillModifiedData(java.util.Collection<OsmPrimitive> modified,
                             java.util.Collection<OsmPrimitive> deleted,
                             java.util.Collection<OsmPrimitive> added)
Description copied from class: Command
Fill in the changed data this command operates on. Add to the lists, don't clear them.

Specified by:
fillModifiedData in class Command
Parameters:
modified - The modified primitives
deleted - The deleted primitives
added - The added primitives


JOSM