public class MapCSSTagChecker extends Test.TagTest
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
MapCSSTagChecker.FixCommand
Represents a fix to a validation test.
|
static class |
MapCSSTagChecker.GroupedMapCSSRule
A grouped MapCSSRule with multiple selectors for a single declaration.
|
(package private) static class |
MapCSSTagChecker.MapCSSTagCheckerAndRule |
static class |
MapCSSTagChecker.ParseResult
|
static class |
MapCSSTagChecker.TagCheck
Tag check.
|
Test.TagTest
Modifier and Type | Field and Description |
---|---|
(package private) MultiMap<java.lang.String,MapCSSTagChecker.TagCheck> |
checks |
static java.lang.String |
ENTRIES_PREF_KEY
The preference key for tag checker source entries.
|
checkBeforeUpload, checkEnabled, description, enabled, errors, IN_DOWNLOADED_AREA, IN_DOWNLOADED_AREA_STRICT, isBeforeUpload, name, partialSelection, progressMonitor, startTime, testBeforeUpload
Constructor and Description |
---|
MapCSSTagChecker()
Constructs a new
MapCSSTagChecker . |
Modifier and Type | Method and Description |
---|---|
MapCSSTagChecker.ParseResult |
addMapCSS(java.lang.String url)
Adds a new MapCSS config file from the given URL.
|
void |
check(OsmPrimitive p)
Visiting call for primitives.
|
java.util.Set<java.lang.String> |
checkAsserts(java.util.Collection<MapCSSTagChecker.TagCheck> schecks)
Checks that rule assertions are met for the given set of TagChecks.
|
boolean |
equals(java.lang.Object obj) |
java.util.Collection<TestError> |
getErrorsForPrimitive(OsmPrimitive p,
boolean includeOtherSeverity)
|
private static java.util.Collection<TestError> |
getErrorsForPrimitive(OsmPrimitive p,
boolean includeOtherSeverity,
java.util.Collection<java.util.Set<MapCSSTagChecker.TagCheck>> checksCol) |
int |
hashCode() |
void |
initialize()
Initializes any global data used this tester.
|
static void |
reloadRule(SourceEntry rule)
Reload tagchecker rule.
|
visit, visit, visit
addGui, compareTo, deletePrimitivesIfNeeded, endTest, fixError, getErrors, getName, isBuilding, isCanceled, isFixable, isPrimitiveUsable, ok, setBeforeUpload, setPartialSelection, startTest, testBeforeUpload, visit
public static final java.lang.String ENTRIES_PREF_KEY
final MultiMap<java.lang.String,MapCSSTagChecker.TagCheck> checks
public MapCSSTagChecker()
MapCSSTagChecker
.public java.util.Collection<TestError> getErrorsForPrimitive(OsmPrimitive p, boolean includeOtherSeverity)
p
- The OSM primitiveincludeOtherSeverity
- if true
, errors of severity Severity.OTHER
(info) will also be returnedprivate static java.util.Collection<TestError> getErrorsForPrimitive(OsmPrimitive p, boolean includeOtherSeverity, java.util.Collection<java.util.Set<MapCSSTagChecker.TagCheck>> checksCol)
public void check(OsmPrimitive p)
check
in class Test.TagTest
p
- The primitive to inspect.public MapCSSTagChecker.ParseResult addMapCSS(java.lang.String url) throws ParseException, java.io.IOException
url
- The unique URL of the MapCSS config fileParseException
- if the config file does not match MapCSS syntaxjava.io.IOException
- if any I/O error occurspublic void initialize() throws java.lang.Exception
Test
initialize
in class Test
java.lang.Exception
- When cannot initialize the testpublic java.util.Set<java.lang.String> checkAsserts(java.util.Collection<MapCSSTagChecker.TagCheck> schecks)
schecks
- The TagChecks for which assertions have to be checkedpublic static void reloadRule(SourceEntry rule)
rule
- tagchecker rule to reload