
org.opentripplanner.gtfs.graphbuilder.GtfsFeedParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.gtfs.graphbuilder;
import java.net.URI;
import java.util.Objects;
import java.util.Optional;
import org.opentripplanner.graph_builder.model.DataSourceConfig;
/**
* Configure a GTFS feed.
* Example: {@code [ {type="gtfs", source: "file:///path/to/otp/norway-gtfs.zip"} ] }
*/
public class GtfsFeedParameters implements DataSourceConfig {
private final URI source;
private final String feedId;
GtfsFeedParameters(GtfsFeedParametersBuilder builder) {
this.source = Objects.requireNonNull(builder.source());
this.feedId = builder.feedId();
}
/** See {@link org.opentripplanner.standalone.config.buildconfig.TransitFeedConfig}. */
@Override
public URI source() {
return source;
}
/** See {@link org.opentripplanner.standalone.config.buildconfig.TransitFeedConfig}. */
public Optional feedId() {
return Optional.ofNullable(feedId);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy