public class PurgeCommand extends Command
Command.OldNodeState
Modifier and Type | Field and Description |
---|---|
protected DataSet |
ds |
protected Storage<PrimitiveData> |
makeIncompleteData |
protected Map<PrimitiveId,PrimitiveData> |
makeIncompleteData_byPrimId |
protected ConflictCollection |
purgedConflicts |
protected List<OsmPrimitive> |
toPurge |
Constructor and Description |
---|
PurgeCommand(OsmDataLayer layer,
Collection<OsmPrimitive> toPurge,
Collection<OsmPrimitive> makeIncomplete)
This command relies on a number of consistency conditions:
- makeIncomplete must be a subset of toPurge.
|
Modifier and Type | Method and Description |
---|---|
boolean |
executeCommand()
Executes the command on the dataset.
|
void |
fillModifiedData(Collection<OsmPrimitive> modified,
Collection<OsmPrimitive> deleted,
Collection<OsmPrimitive> added)
Fill in the changed data this command operates on.
|
Icon |
getDescriptionIcon()
Provides a descriptive icon of this command.
|
String |
getDescriptionText()
Provides a description text representing this command.
|
Collection<? extends OsmPrimitive> |
getParticipatingPrimitives()
Return the primitives that take part in this command.
|
protected void |
saveIncomplete(Collection<OsmPrimitive> makeIncomplete) |
static List<OsmPrimitive> |
topoSort(Collection<OsmPrimitive> sel)
Sorts a collection of primitives such that for each object
its referrers come later in the sorted collection.
|
void |
undoCommand()
Undoes the command.
|
checkAndConfirmOutlyingOperation, getLayer, getOrig, invalidBecauselayerRemoved
getChildren
protected List<OsmPrimitive> toPurge
protected Storage<PrimitiveData> makeIncompleteData
protected Map<PrimitiveId,PrimitiveData> makeIncompleteData_byPrimId
protected final ConflictCollection purgedConflicts
public PurgeCommand(OsmDataLayer layer, Collection<OsmPrimitive> toPurge, Collection<OsmPrimitive> makeIncomplete)
protected final void saveIncomplete(Collection<OsmPrimitive> makeIncomplete)
public boolean executeCommand()
Command
executeCommand
in class Command
public void undoCommand()
Command
undoCommand
in class Command
public static List<OsmPrimitive> topoSort(Collection<OsmPrimitive> sel)
public String getDescriptionText()
PseudoCommand
getDescriptionText
in class PseudoCommand
public Icon getDescriptionIcon()
PseudoCommand
getDescriptionIcon
in class PseudoCommand
public Collection<? extends OsmPrimitive> getParticipatingPrimitives()
Command
getParticipatingPrimitives
in class Command
public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added)
Command
fillModifiedData
in class Command
modified
- The modified primitivesdeleted
- The deleted primitivesadded
- The added primitives