Search in sources :

Example 1 with LatitudeValidator

use of org.wikivoyage.listings.validators.LatitudeValidator in project wikivoyage-listings by baturin.

the class Main method validate.

private static Iterable<Listing> validate(Iterable<Listing> listingIterable) {
    Iterable<Listing> validatedIterable = listingIterable;
    Validator[] validators = { new LatitudeValidator(), new LongitudeValidator(), new WebsiteURLValidator(), new EmailValidator(), new WikidataValidator() };
    for (Validator validator : validators) {
        validatedIterable = validator.validate(validatedIterable);
    }
    return validatedIterable;
}
Also used : WikidataValidator(org.wikivoyage.listings.validators.WikidataValidator) EmailValidator(org.wikivoyage.listings.validators.EmailValidator) Listing(org.wikivoyage.listings.entity.Listing) LatitudeValidator(org.wikivoyage.listings.validators.LatitudeValidator) WebsiteURLValidator(org.wikivoyage.listings.validators.WebsiteURLValidator) LongitudeValidator(org.wikivoyage.listings.validators.LongitudeValidator) LongitudeValidator(org.wikivoyage.listings.validators.LongitudeValidator) WebsiteURLValidator(org.wikivoyage.listings.validators.WebsiteURLValidator) EmailValidator(org.wikivoyage.listings.validators.EmailValidator) LatitudeValidator(org.wikivoyage.listings.validators.LatitudeValidator) WikidataValidator(org.wikivoyage.listings.validators.WikidataValidator) Validator(org.wikivoyage.listings.validators.Validator)

Aggregations

Listing (org.wikivoyage.listings.entity.Listing)1 EmailValidator (org.wikivoyage.listings.validators.EmailValidator)1 LatitudeValidator (org.wikivoyage.listings.validators.LatitudeValidator)1 LongitudeValidator (org.wikivoyage.listings.validators.LongitudeValidator)1 Validator (org.wikivoyage.listings.validators.Validator)1 WebsiteURLValidator (org.wikivoyage.listings.validators.WebsiteURLValidator)1 WikidataValidator (org.wikivoyage.listings.validators.WikidataValidator)1