Data extracted from Wikivoyage, the free travel guide at http://wikivoyage.org. Leverage Wikivoyage listings on your smartphone, or in your own mashups.
This PR is a proposal of a mini re-write of validators in order to enable omitting of invalid data in output.
Its purpose is to close #49
Here are some highlights:
redefines Validator interface - the validate method now takes and returns an Iterable which basically makes it act like an validating filter
introduces ValidationIssue enumeration
introduces a list of ValidationIssue in Listing which validators will use to store found issues
Once an Iterable of Listing passes through all the Validators, the Listings become enriched with ValidationIssues. Each output format can then choose what to do with that data - either use the unvalidated (raw) data, or the validated data which is null in case of a validation issue.
This PR is a proposal of a mini re-write of validators in order to enable omitting of invalid data in output. Its purpose is to close #49
Here are some highlights:
Once an Iterable of Listing passes through all the Validators, the Listings become enriched with ValidationIssues. Each output format can then choose what to do with that data - either use the unvalidated (raw) data, or the validated data which is null in case of a validation issue.