Search in sources :

Example 1 with FeedInfo

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;
}
Also used : FeedInfo(org.opentripplanner.model.FeedInfo)

Example 2 with FeedInfo

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;
}
Also used : FeedInfo(org.opentripplanner.model.FeedInfo)

Example 3 with FeedInfo

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();
}
Also used : GtfsContextBuilder(org.opentripplanner.gtfs.GtfsContextBuilder) FareRule(org.opentripplanner.model.FareRule) FeedInfo(org.opentripplanner.model.FeedInfo) BeforeClass(org.junit.BeforeClass)

Example 4 with FeedInfo

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();
}
Also used : OtpTransitServiceBuilder(org.opentripplanner.model.impl.OtpTransitServiceBuilder) Agency(org.opentripplanner.model.Agency) GtfsContextBuilder(org.opentripplanner.gtfs.GtfsContextBuilder) FareRule(org.opentripplanner.model.FareRule) FeedInfo(org.opentripplanner.model.FeedInfo) DataImportIssueStore(org.opentripplanner.graph_builder.DataImportIssueStore)

Example 5 with FeedInfo

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;
}
Also used : Agency(org.opentripplanner.model.Agency) FareRule(org.opentripplanner.model.FareRule) FeedInfo(org.opentripplanner.model.FeedInfo)

Aggregations

FeedInfo (org.opentripplanner.model.FeedInfo)5 FareRule (org.opentripplanner.model.FareRule)3 GtfsContextBuilder (org.opentripplanner.gtfs.GtfsContextBuilder)2 Agency (org.opentripplanner.model.Agency)2 BeforeClass (org.junit.BeforeClass)1 DataImportIssueStore (org.opentripplanner.graph_builder.DataImportIssueStore)1 OtpTransitServiceBuilder (org.opentripplanner.model.impl.OtpTransitServiceBuilder)1