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

org.opentripplanner.index.model.RouteShort Maven / Gradle / Ivy

package org.opentripplanner.index.model;

import java.util.Collection;
import java.util.List;

import org.opentripplanner.model.FeedScopedId;
import org.opentripplanner.model.Route;
import org.opentripplanner.gtfs.GtfsLibrary;

import com.beust.jcommander.internal.Lists;

public class RouteShort {

    public FeedScopedId id;
    public String shortName;
    public String longName;
    public String mode;
    public String color;
    public String agencyName;

    public RouteShort (Route route) {
        id = route.getId();
        shortName = route.getShortName();
        longName = route.getLongName();
        mode = GtfsLibrary.getTraverseMode(route).toString();
        color = route.getColor();
        agencyName = route.getAgency().getName();
    }

    public static List list (Collection in) {
        List out = Lists.newArrayList();
        for (Route route : in) out.add(new RouteShort(route));
        return out;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy