|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gbif.datatester.AbstractDataTest
org.gbif.datatester.AbstractRecordTest
org.gbif.datatester.tests.GeographicErrorTest
public class GeographicErrorTest
Generic geographic error test implementation. Given a point (latitude and longitude in decimal degrees with WGS84 datum), an uncertainty value for the point (in meters), and the administrative regions originally related with the record, this test uses the coordinates to check that the administrative regions are consistent with the ones provided by a simple feature vector map.
It accepts six parameters: longitudeConcept, latitudeConcept, uncertaintyConcept, administrativeRegionsConcepts, administrativeRegionsFeatures and featureDataReader.
The first three must contain the identifier of a knownConcept with a "double"
DataType, the next one must contain one or more concept identifiers (comma
separated) of known Concepts with a "string" DataType, the other one
must contain one or more feature identifiers (comma separated) corresponding to each
administrative region to be tested and featureDataReader must contain the class name
(including java package) of an external class implementing the
ExternalGeospatialVectorReader interface. The number and order of elements in
administrativeRegionsConcepts and administrativeRegionsFeatures must match.
uncertaintyConcept is optional.
A typical configuration entry for this test would look like:
<test id="11" class="org.gbif.datatester.tests.GeographicErrorTest">
<parameter name="longitudeConcept">
<value v="Longitude" />
</parameter>
<parameter name="latitudeConcept">
<value v="Latitude" />
</parameter>
<parameter name="uncertaintyConcept">
<value v="Uncertainty" />
</parameter>
<parameter name="administrativeRegionsConcepts">
<value v="Country,state,province" />
</parameter>
<parameter name="administrativeRegionsFeatures">
<value v="Country_name,State_name,County_name" />
</parameter>
<parameter name="featureDataReader">
<value v="myClassThatCanReadVectorFiles" />
</parameter>
</test>
| Field Summary | |
|---|---|
static java.lang.String |
DISTANCE_TAG_ID
Shortcut to the "distance between x,y point and polygon" tag. |
static java.lang.String |
GEOGRAPHIC_ERROR_TAG_ID
Shortcut to the "geographic error" tag. |
static java.lang.String |
MAPPED_FEATURE_TAG_ID
Shortcut to the "mapped feature" value tag. |
static java.lang.String |
MARINE_TAG_ID
Shortcut to the "marine" tag. |
| Fields inherited from class org.gbif.datatester.AbstractDataTest |
|---|
instanceId, knownConcepts, locale, result |
| Constructor Summary | |
|---|---|
GeographicErrorTest()
Contructs a generic geographic error test. |
|
| Method Summary | |
|---|---|
protected void |
doInitialize()
Internal method to initialize the test. |
protected boolean |
doTest(GenericRecord genericRecord)
Detect inconsistencies in country, stateprovince and/or county versus related coordinates. |
java.lang.String |
getVersion()
Outputs the current version of this test based on the CVS revision. |
| Methods inherited from class org.gbif.datatester.AbstractRecordTest |
|---|
doTest, minNumberOfRecords, test |
| Methods inherited from class org.gbif.datatester.AbstractDataTest |
|---|
declareMandatoryConcept, declareOptionalConcept, declareParameter, declareTag, getDescription, getInstanceId, getInstanceXml, getMandatoryConcepts, getOptionalConcepts, getParametersMetadata, getParameterValue, getPossibleTags, getResourceBundle, getResult, getString, initialize, initialize, loadResourceBundle, setLocale, setResourceBundleBaseName, test |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String GEOGRAPHIC_ERROR_TAG_ID
Shortcut to the "geographic error" tag.
public static final java.lang.String MAPPED_FEATURE_TAG_ID
Shortcut to the "mapped feature" value tag.
public static final java.lang.String MARINE_TAG_ID
Shortcut to the "marine" tag.
public static final java.lang.String DISTANCE_TAG_ID
Shortcut to the "distance between x,y point and polygon" tag.
| Constructor Detail |
|---|
public GeographicErrorTest()
Contructs a generic geographic error test.
| Method Detail |
|---|
protected void doInitialize()
throws DataTesterException
Internal method to initialize the test.
doInitialize in class AbstractDataTestDataTesterException
protected boolean doTest(GenericRecord genericRecord)
throws DataTesterException
Detect inconsistencies in country, stateprovince and/or county versus related coordinates.
doTest in class AbstractDataTestgenericRecord - Record to be tested.
DataTesterExceptionpublic java.lang.String getVersion()
Outputs the current version of this test based on the CVS revision.
getVersion in interface DataTestgetVersion in class AbstractDataTest
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||