Package org.onebusaway.transit_data_federation.impl.transit_graph

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl


  @Test
  public void test() {

    ServiceIdActivation serviceIds = serviceIds(lsids("sA"), lsids("sB"));

    StopEntryImpl stopA = stop("stopA", 47.0, -122.0);
    StopEntryImpl stopB = stop("stopB", 47.1, -122.0);

    BlockEntryImpl block = block("blockA");

    TripEntryImpl tripA = trip("tripA", 1000);
    TripEntryImpl tripB = trip("tripB", 2000);
View Full Code Here


  public void before() {

    TripEntryImpl tripA = trip("A", "sid", 1000.0);
    TripEntryImpl tripB = trip("B", "sid", 1000.0);

    StopEntryImpl stopA = stop("stopA", 47.0, -122.0);
    StopEntryImpl stopB = stop("stopB", 47.0, -122.1);
    StopEntryImpl stopC = stop("stopC", 47.0, -122.2);

    stopTime(0, stopA, tripA, time(10, 00), time(10, 00), 200);
    stopTime(1, stopB, tripA, time(10, 10), time(10, 15), 500);
    stopTime(2, stopC, tripA, time(10, 20), time(10, 25), 800);
    // 25 minutes of slack time - 10 minutes of travel time in bewteen
View Full Code Here

  @Test
  public void testFixedScheduleBlocks() {

    LocalizedServiceId lsid = lsid("serviceId");
    StopEntryImpl stop = stop("stop");

    Trip tripA = new Trip();
    tripA.setId(aid("tripA"));
    tripA.setRoute(_route);
    tripA.setBlockId("blockA");
View Full Code Here

  }

  @Test
  public void test() {

    StopEntryImpl stopA = stop("stopA", 47.0, -122.0);
    StopEntryImpl stopB = stop("stopB", 47.1, -122.1);

    TripEntryImpl tripA = trip("tripA", "sA", 300.0);
    StopTimeEntryImpl st0 = stopTime(0, stopA, tripA, time(9, 00), time(9, 05),
        100.0);
    StopTimeEntryImpl st1 = stopTime(1, stopB, tripA, time(9, 30), time(9, 35),
View Full Code Here

        List<StopTransferData> transfersToStopData = reversedStopTransfersByStopId.get(stopId);

        List<StopTransfer> transfersFromStop = getTransferDataAsList(transfersFromStopData);
        List<StopTransfer> transfersToStop = getTransferDataAsList(transfersToStopData);

        StopEntryImpl stopEntry = (StopEntryImpl) stop;
        stopEntry.setTransfers(new StopTransfers(transfersFromStop,
            transfersToStop));
      }
    }
  }
View Full Code Here

    }
  }

  @Override
  public List<StopTransfer> getTransfersFromStop(StopEntry stop) {
    StopEntryImpl impl = (StopEntryImpl) stop;
    StopTransfers transfers = impl.getTransfers();
    if (transfers == null || transfers.getTransfersFromStop() == null)
      return EMPTY_TRANSFERS;
    return transfers.getTransfersFromStop();
  }
View Full Code Here

    return transfers.getTransfersFromStop();
  }

  @Override
  public List<StopTransfer> getTransfersToStop(StopEntry stop) {
    StopEntryImpl impl = (StopEntryImpl) stop;
    StopTransfers transfers = impl.getTransfers();
    if (transfers == null || transfers.getTransfersToStop() == null)
      return EMPTY_TRANSFERS;
    return transfers.getTransfersToStop();
  }
View Full Code Here

      String[] tokens = line.split(" ");
      String stopId = tokens[0];
      double lat = Double.parseDouble(tokens[1]);
      double lon = Double.parseDouble(tokens[2]);

      StopEntryImpl stop = stops.get(stopId);
      if (stop == null) {
        stop = UnitTestingSupport.stop(stopId, lat, lon);
        stops.put(stopId, stop);
      }
View Full Code Here

      if (stopIndex % 500 == 0)
        _log.info("stops: " + stopIndex + "/" + stops.size());
      stopIndex++;

      StopEntryImpl stopEntry = new StopEntryImpl(stop.getId(), stop.getLat(),
          stop.getLon());
      stopEntry.setWheelchairBoarding(getWheelchairBoardingAccessibilityForStop(stop));
      graph.putStopEntry(stopEntry);
      stopEntriesByAgencyId.get(stop.getId().getAgencyId()).add(stopEntry);
    }

    for (Map.Entry<String, ArrayList<StopEntry>> entry : stopEntriesByAgencyId.entrySet()) {
View Full Code Here

    for (StopTime stopTime : stopTimes) {

      Stop stop = stopTime.getStop();
      AgencyAndId stopId = stop.getId();
      StopEntryImpl stopEntry = graph.getStopEntryForId(stopId);

      StopTimeEntryImpl stopTimeEntry = new StopTimeEntryImpl();

      stopTimeEntry.setId(stopTime.getId());
      stopTimeEntry.setSequence(sequence);
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.