Search in sources :

Example 1 with PatternAtStop

use of org.opentripplanner.routing.graphfinder.PatternAtStop in project OpenTripPlanner by opentripplanner.

the class LegacyGraphQLPlaceInterfaceTypeResolver method getType.

@Override
public GraphQLObjectType getType(TypeResolutionEnvironment environment) {
    Object o = environment.getObject();
    GraphQLSchema schema = environment.getSchema();
    if (o instanceof BikePark)
        return schema.getObjectType("BikePark");
    if (o instanceof BikeRentalStation)
        return schema.getObjectType("BikeRentalStation");
    // if (o instanceof CarPark) return schema.getObjectType("CarPark");
    if (o instanceof PatternAtStop)
        return schema.getObjectType("DepartureRow");
    if (o instanceof Stop)
        return schema.getObjectType("Stop");
    return null;
}
Also used : PatternAtStop(org.opentripplanner.routing.graphfinder.PatternAtStop) Stop(org.opentripplanner.model.Stop) PatternAtStop(org.opentripplanner.routing.graphfinder.PatternAtStop) BikePark(org.opentripplanner.routing.bike_park.BikePark) GraphQLSchema(graphql.schema.GraphQLSchema) BikeRentalStation(org.opentripplanner.routing.bike_rental.BikeRentalStation)

Example 2 with PatternAtStop

use of org.opentripplanner.routing.graphfinder.PatternAtStop in project OpenTripPlanner by opentripplanner.

the class LegacyGraphQLNodeTypeResolver method getType.

@Override
public GraphQLObjectType getType(TypeResolutionEnvironment environment) {
    Object o = environment.getObject();
    GraphQLSchema schema = environment.getSchema();
    if (o instanceof Agency)
        return schema.getObjectType("Agency");
    if (o instanceof TransitAlert)
        return schema.getObjectType("Alert");
    if (o instanceof BikePark)
        return schema.getObjectType("BikePark");
    if (o instanceof BikeRentalStation)
        return schema.getObjectType("BikeRentalStation");
    // if (o instanceof Cluster) return schema.getObjectType("Cluster");
    if (o instanceof PatternAtStop)
        return schema.getObjectType("DepartureRow");
    if (o instanceof TripPattern)
        return schema.getObjectType("Pattern");
    if (o instanceof PlaceAtDistance)
        return schema.getObjectType("placeAtDistance");
    if (o instanceof Route)
        return schema.getObjectType("Route");
    if (o instanceof Stop)
        return schema.getObjectType("Stop");
    if (o instanceof Station)
        return schema.getObjectType("Stop");
    if (o instanceof TripTimeShort)
        return schema.getObjectType("Stoptime");
    if (o instanceof StopAtDistance)
        return schema.getObjectType("stopAtDistance");
    if (o instanceof FareRuleSet)
        return schema.getObjectType("TicketType");
    if (o instanceof Trip)
        return schema.getObjectType("Trip");
    return null;
}
Also used : TransitAlert(org.opentripplanner.routing.alertpatch.TransitAlert) Trip(org.opentripplanner.model.Trip) Agency(org.opentripplanner.model.Agency) Stop(org.opentripplanner.model.Stop) PatternAtStop(org.opentripplanner.routing.graphfinder.PatternAtStop) PlaceAtDistance(org.opentripplanner.routing.graphfinder.PlaceAtDistance) FareRuleSet(org.opentripplanner.routing.core.FareRuleSet) BikePark(org.opentripplanner.routing.bike_park.BikePark) GraphQLSchema(graphql.schema.GraphQLSchema) BikeRentalStation(org.opentripplanner.routing.bike_rental.BikeRentalStation) TripPattern(org.opentripplanner.model.TripPattern) Station(org.opentripplanner.model.Station) BikeRentalStation(org.opentripplanner.routing.bike_rental.BikeRentalStation) TripTimeShort(org.opentripplanner.model.TripTimeShort) PatternAtStop(org.opentripplanner.routing.graphfinder.PatternAtStop) StopAtDistance(org.opentripplanner.routing.graphfinder.StopAtDistance) Route(org.opentripplanner.model.Route)

Aggregations

GraphQLSchema (graphql.schema.GraphQLSchema)2 Stop (org.opentripplanner.model.Stop)2 BikePark (org.opentripplanner.routing.bike_park.BikePark)2 BikeRentalStation (org.opentripplanner.routing.bike_rental.BikeRentalStation)2 PatternAtStop (org.opentripplanner.routing.graphfinder.PatternAtStop)2 Agency (org.opentripplanner.model.Agency)1 Route (org.opentripplanner.model.Route)1 Station (org.opentripplanner.model.Station)1 Trip (org.opentripplanner.model.Trip)1 TripPattern (org.opentripplanner.model.TripPattern)1 TripTimeShort (org.opentripplanner.model.TripTimeShort)1 TransitAlert (org.opentripplanner.routing.alertpatch.TransitAlert)1 FareRuleSet (org.opentripplanner.routing.core.FareRuleSet)1 PlaceAtDistance (org.opentripplanner.routing.graphfinder.PlaceAtDistance)1 StopAtDistance (org.opentripplanner.routing.graphfinder.StopAtDistance)1