|
|||||||||
| 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.AbstractRecordSetTest
org.gbif.datatester.tests.ItineraryTest
public class ItineraryTest
Generic itinerary test implementation. The idea is to select georeferenced records related to a particular person, order them by date and check whether the distance between each neighbor records is consistent with the interval between them considering the maximum accepted distance to be travelled over one day in the corresponding period of history.
It accepts five parameters: personConcept, longitudeConcept,
latitudeConcept, dateSource and dateFormat. The first one must
contain the identifier of a known Concept with a string DataType,
the second and third one must contain the identifier of a known Concept
with a double DataType, the fourth must contain either a single Concept identifier
or a comma-separated list of three Concepts related to year, month and day,
respectively and the last parameter can be used to indicate the date format
according to patterns that are accepted by the SimpleDateFormat Java class (default
format is yyyy-MM-dd).
A typical configuration entry for this test would look like:
<test id="09" class="org.gbif.datatester.tests.ItineraryTest">
<parameter name="personConcept">
<value v="Collector" />
</parameter>
<parameter name="longitudeConcept">
<value v="Longitude" />
</parameter>
<parameter name="latitudeConcept">
<value v="Latitude" />
</parameter>
<parameter name="dateSource">
<value v="CollectingDate" />
</parameter>
<parameter name="dateFormat">
<value v="yyyy-MM-dd" />
</parameter>
</test>
Important: when three concepts are involved in the dateSource, the test first concatenates their values using dashes before checking the content. So in this case if a format is specified, it must contain two and only two dashes.
| Field Summary | |
|---|---|
static java.lang.String |
CALCULATED_DISTANCE_TAG_ID
Shortcut to the "calculated distance" tag. |
static java.lang.String |
ITINERARY_OUTLIER_TAG_ID
Shortcut to the "itinerary outlier" tag id. |
static java.lang.String |
MAXIMUM_DISTANCE_TAG_ID
Shortcut to the "maximum distance" tag id. |
static java.lang.String |
NUMBER_OF_DAYS_TAG_ID
Shortcut to the "number of days" tag id. |
static java.lang.String |
SINGLE_RECORD_TAG_ID
Shortcut to the "single record" debug tag id. |
| Fields inherited from class org.gbif.datatester.AbstractDataTest |
|---|
instanceId, knownConcepts, locale, result |
| Constructor Summary | |
|---|---|
ItineraryTest()
Contructs a generic itinerary test. |
|
| Method Summary | |
|---|---|
protected void |
doInitialize()
Internal method to initialize the test. |
protected void |
doTest(GenericRecordSet genericRecordSet)
Detect inconsistencies between two events related with the same person. |
java.lang.String |
getVersion()
Outputs the current version of this test based on the CVS revision. |
int |
minNumberOfRecords()
Indicates the minimum number of records that the record set to be tested must have. |
| Methods inherited from class org.gbif.datatester.AbstractRecordSetTest |
|---|
doTest, 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 ITINERARY_OUTLIER_TAG_ID
Shortcut to the "itinerary outlier" tag id.
public static final java.lang.String SINGLE_RECORD_TAG_ID
Shortcut to the "single record" debug tag id.
public static final java.lang.String MAXIMUM_DISTANCE_TAG_ID
Shortcut to the "maximum distance" tag id.
public static final java.lang.String CALCULATED_DISTANCE_TAG_ID
Shortcut to the "calculated distance" tag.
public static final java.lang.String NUMBER_OF_DAYS_TAG_ID
Shortcut to the "number of days" tag id.
| Constructor Detail |
|---|
public ItineraryTest()
Contructs a generic itinerary test.
| Method Detail |
|---|
public int minNumberOfRecords()
Indicates the minimum number of records that the record set to be tested must have.
minNumberOfRecords in interface DataTestminNumberOfRecords in class AbstractRecordSetTest
protected void doInitialize()
throws DataTesterException
Internal method to initialize the test.
doInitialize in class AbstractDataTestDataTesterException
protected void doTest(GenericRecordSet genericRecordSet)
throws DataTesterException
Detect inconsistencies between two events related with the same person.
doTest in class AbstractDataTestgenericRecordSet - RecordSet 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 | ||||||||