public class OsmValidator extends Object implements MapView.LayerChangeListener
Modifier and Type | Field and Description |
---|---|
private static Class<Test>[] |
allAvailableTests
All available tests
TODO: is there any way to find out automatically all available tests?
|
private static Map<String,Test> |
allTestsMap |
static ValidatorLayer |
errorLayer |
static double |
griddetail
Grid detail, multiplier of east,north values for valuable cell sizing
|
static Collection<String> |
ignoredErrors |
ValidateAction |
validateAction
The validate action
|
Constructor and Description |
---|
OsmValidator()
Constructs a new
OsmValidator . |
Modifier and Type | Method and Description |
---|---|
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed.
|
static void |
addIgnoredError(String s) |
private static void |
applyPrefs(Map<String,Test> tests,
boolean beforeUpload) |
private void |
checkValidatorDir()
Check if plugin directory exists (store ignored errors file)
|
static Class<Test>[] |
getAllAvailableTests()
Gets the list of all available test classes
|
static Map<String,Test> |
getAllTestsMap()
Gets a map from simple names to all tests.
|
static Collection<Test> |
getEnabledTests(boolean beforeUpload) |
static Collection<Test> |
getTests() |
static String |
getValidatorDir()
Returns the plugin's directory of the plugin
|
static boolean |
hasIgnoredError(String s) |
static void |
initializeErrorLayer() |
void |
initializeGridDetail()
Initialize grid details based on current projection system.
|
static void |
initializeTests(Collection<Test> allTests)
Initializes all tests
|
void |
layerAdded(Layer newLayer)
Notifies this listener that a layer has been added.
|
void |
layerRemoved(Layer oldLayer)
Notifies this listener that a layer has been removed.
|
private void |
loadIgnoredErrors() |
static void |
saveIgnoredErrors() |
public static ValidatorLayer errorLayer
public ValidateAction validateAction
public static double griddetail
public static final Collection<String> ignoredErrors
private static final Class<Test>[] allAvailableTests
private static Map<String,Test> allTestsMap
public OsmValidator()
OsmValidator
.public static String getValidatorDir()
private void checkValidatorDir()
private void loadIgnoredErrors()
public static void addIgnoredError(String s)
public static boolean hasIgnoredError(String s)
public static void saveIgnoredErrors()
public static void initializeErrorLayer()
public static Map<String,Test> getAllTestsMap()
private static void applyPrefs(Map<String,Test> tests, boolean beforeUpload)
public static Collection<Test> getTests()
public static Collection<Test> getEnabledTests(boolean beforeUpload)
public static Class<Test>[] getAllAvailableTests()
public void initializeGridDetail()
public static void initializeTests(Collection<Test> allTests)
allTests
- The tests to initializepublic void activeLayerChange(Layer oldLayer, Layer newLayer)
MapView.LayerChangeListener
activeLayerChange
in interface MapView.LayerChangeListener
oldLayer
- The previous active layernewLayer
- The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded
in interface MapView.LayerChangeListener
newLayer
- The new added layerpublic void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved
in interface MapView.LayerChangeListener
oldLayer
- The old removed layer