Search in sources :

Example 1 with ApiAlert

use of org.opentripplanner.api.model.ApiAlert in project OpenTripPlanner by opentripplanner.

the class AlertMapper method mapToApi.

ApiAlert mapToApi(TransitAlert domain) {
    ApiAlert api = new ApiAlert();
    if (domain.alertHeaderText != null) {
        api.alertHeaderText = domain.alertHeaderText.toString(locale);
    }
    if (domain.alertDescriptionText != null) {
        api.alertDescriptionText = domain.alertDescriptionText.toString(locale);
    }
    if (domain.alertUrl != null) {
        api.alertUrl = domain.alertUrl.toString(locale);
    }
    api.effectiveStartDate = domain.getEffectiveStartDate();
    api.effectiveEndDate = domain.getEffectiveEndDate();
    return api;
}
Also used : ApiAlert(org.opentripplanner.api.model.ApiAlert)

Example 2 with ApiAlert

use of org.opentripplanner.api.model.ApiAlert in project OpenTripPlanner by opentripplanner.

the class StreetNoteMaperMapper method mapToApi.

ApiAlert mapToApi(StreetNote domain) {
    ApiAlert api = new ApiAlert();
    if (domain.note != null) {
        api.alertHeaderText = domain.note.toString(locale);
    }
    if (domain.descriptionText != null) {
        api.alertDescriptionText = domain.descriptionText.toString(locale);
    }
    if (domain.url != null) {
        api.alertUrl = domain.url;
    }
    api.effectiveStartDate = domain.effectiveStartDate;
    api.effectiveEndDate = domain.effectiveEndDate;
    return api;
}
Also used : ApiAlert(org.opentripplanner.api.model.ApiAlert)

Aggregations

ApiAlert (org.opentripplanner.api.model.ApiAlert)2