use of org.opentripplanner.model.FeedInfo in project OpenTripPlanner by opentripplanner.
the class FeedInfoMapper method doMap.
private FeedInfo doMap(org.onebusaway.gtfs.model.FeedInfo rhs) {
FeedInfo lhs = new FeedInfo();
lhs.setId(rhs.getId());
lhs.setPublisherName(rhs.getPublisherName());
lhs.setPublisherUrl(rhs.getPublisherUrl());
lhs.setLang(rhs.getLang());
lhs.setStartDate(mapServiceDate(rhs.getStartDate()));
lhs.setEndDate(mapServiceDate(rhs.getEndDate()));
lhs.setVersion(rhs.getVersion());
return lhs;
}
use of org.opentripplanner.model.FeedInfo in project OpenTripPlanner by opentripplanner.
the class GenerateMissingIdsTest method newEntity.
private static TransitEntity<String> newEntity(String id) {
FeedInfo e = new FeedInfo();
e.setId(id);
return e;
}
use of org.opentripplanner.model.FeedInfo in project OpenTripPlanner by opentripplanner.
the class OtpTransitServiceImplTest method setup.
@BeforeClass
public static void setup() throws IOException {
GtfsContextBuilder contextBuilder = contextBuilder(FEED_ID, ConstantsForTests.FAKE_GTFS);
OtpTransitServiceBuilder builder = contextBuilder.getTransitBuilder();
agency = first(builder.getAgenciesById().values());
// Supplement test data with at least one entity in all collections
FareRule rule = createFareRule();
builder.getFareAttributes().add(rule.getFare());
builder.getFareRules().add(rule);
builder.getFeedInfos().add(new FeedInfo());
subject = builder.build();
}
use of org.opentripplanner.model.FeedInfo in project OpenTripPlanner by opentripplanner.
the class CalendarServiceDataFactoryImplTest method createCtxBuilder.
private static GtfsContext createCtxBuilder() throws IOException {
GtfsContextBuilder ctxBuilder = contextBuilder(FEED_ID, ConstantsForTests.FAKE_GTFS);
OtpTransitServiceBuilder builder = ctxBuilder.withDataImportIssueStore(new DataImportIssueStore(false)).getTransitBuilder();
Agency agency = agency(builder);
// Supplement test data with at least one entity in all collections
builder.getCalendarDates().add(removeMondayFromAlldays());
builder.getFareAttributes().add(createFareAttribute(agency));
builder.getFareRules().add(new FareRule());
builder.getFeedInfos().add(new FeedInfo());
return ctxBuilder.build();
}
use of org.opentripplanner.model.FeedInfo in project OpenTripPlanner by opentripplanner.
the class OtpTransitServiceBuilderTest method createBuilder.
/* private methods */
private static OtpTransitServiceBuilder createBuilder() throws IOException {
OtpTransitServiceBuilder builder = contextBuilder(FEED_ID, ConstantsForTests.FAKE_GTFS).getTransitBuilder();
Agency agency = agency(builder);
// Supplement test data with at least one entity in all collections
builder.getCalendarDates().add(createAServiceCalendarDateExclution(SERVICE_WEEKDAYS_ID));
builder.getFareAttributes().add(createFareAttribute(agency));
builder.getFareRules().add(new FareRule());
builder.getFeedInfos().add(new FeedInfo());
return builder;
}
Aggregations