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