All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.api.mapping.FeedInfoMapper Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
package org.opentripplanner.api.mapping;

import org.opentripplanner.api.model.ApiFeedInfo;
import org.opentripplanner.model.FeedInfo;

public class FeedInfoMapper {
    public static ApiFeedInfo mapToApi(FeedInfo domain) {
        if(domain == null) {
            return null;
        }
        ApiFeedInfo api = new ApiFeedInfo();

        api.id = domain.getId();
        api.publisherName = domain.getPublisherName();
        api.publisherUrl = domain.getPublisherUrl();
        api.lang = domain.getLang();
        api.startDate = ServiceDateMapper.mapToApi(domain.getStartDate());
        api.endDate = ServiceDateMapper.mapToApi(domain.getEndDate());
        api.version = domain.getVersion();

        return api;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy