abstract static class MapCSSTagChecker.FixCommand extends Object
Command
can be obtained by createCommand(OsmPrimitive, Selector)
.Constructor and Description |
---|
FixCommand() |
Modifier and Type | Method and Description |
---|---|
private static void |
checkObject(Object obj) |
(package private) abstract Command |
createCommand(OsmPrimitive p,
Selector matchingSelector)
Creates the fixing
Command for the given primitive. |
private static String |
evaluateObject(Object obj,
OsmPrimitive p,
Selector matchingSelector)
|
(package private) static MapCSSTagChecker.FixCommand |
fixAdd(Object obj)
Creates a fixing command which executes a
ChangePropertyCommand on the specified tag. |
(package private) static MapCSSTagChecker.FixCommand |
fixChangeKey(String oldKey,
String newKey)
Creates a fixing command which executes a
ChangePropertyKeyCommand on the specified keys. |
(package private) static MapCSSTagChecker.FixCommand |
fixRemove(Object obj)
Creates a fixing command which executes a
ChangePropertyCommand to delete the specified key. |
FixCommand()
abstract Command createCommand(OsmPrimitive p, Selector matchingSelector)
Command
for the given primitive. The matchingSelector
is used to evaluate placeholders
(cf. MapCSSTagChecker.TagCheck.insertArguments(Selector, String, OsmPrimitive)
).p
- OSM primitivematchingSelector
- matching selectorprivate static void checkObject(Object obj)
private static String evaluateObject(Object obj, OsmPrimitive p, Selector matchingSelector)
obj
- object to evaluate (Expression
or String
)p
- OSM primitivematchingSelector
- matching selectorstatic MapCSSTagChecker.FixCommand fixAdd(Object obj)
ChangePropertyCommand
on the specified tag.obj
- object to evaluate (Expression
or String
)static MapCSSTagChecker.FixCommand fixRemove(Object obj)
ChangePropertyCommand
to delete the specified key.obj
- object to evaluate (Expression
or String
)static MapCSSTagChecker.FixCommand fixChangeKey(String oldKey, String newKey)
ChangePropertyKeyCommand
on the specified keys.oldKey
- old keynewKey
- new key