Package org.onebusaway.transit_data.model.blocks

Examples of org.onebusaway.transit_data.model.blocks.BlockTripBean


    TripEntry trip = blockTrip.getTrip();
    TripBean tripBean = _tripBeanService.getTripForId(trip.getId());
    if (tripBean == null)
      throw new IllegalStateException("unknown trip: " + trip.getId());

    BlockTripBean bean = new BlockTripBean();
    bean.setTrip(tripBean);
    bean.setAccumulatedSlackTime(blockTrip.getAccumulatedSlackTime());
    bean.setDistanceAlongBlock(blockTrip.getDistanceAlongBlock());

    List<BlockStopTimeBean> blockStopTimes = new ArrayList<BlockStopTimeBean>();
    for (BlockStopTimeEntry blockStopTime : blockTrip.getStopTimes()) {
      BlockStopTimeBean blockStopTimeAsBean = getBlockStopTimeAsBean(blockStopTime);
      blockStopTimes.add(blockStopTimeAsBean);
    }
    bean.setBlockStopTimes(blockStopTimes);

    return bean;
  }
View Full Code Here


      ScheduledBlockLocation blockLocation) {

    ScheduledBlockLocationBean bean = new ScheduledBlockLocationBean();

    if (blockLocation.getActiveTrip() != null) {
      BlockTripBean activeTrip = getBlockTripAsBean(blockLocation.getActiveTrip());
      bean.setActiveTrip(activeTrip);
    }

    bean.setDistanceAlongBlock(blockLocation.getDistanceAlongBlock());
View Full Code Here

    bean.setScheduledDistanceAlongBlock(blockLocation.getScheduledDistanceAlongBlock());
    bean.setDistanceAlongBlock(blockLocation.getDistanceAlongBlock());
   
    BlockTripEntry activeTrip = blockLocation.getActiveTrip();
    if (activeTrip != null) {
      BlockTripBean activeTripBean = _blockBeanService.getBlockTripAsBean(activeTrip);
      bean.setActiveTrip(activeTripBean);
    }

    BlockStopTimeEntry stop = blockLocation.getClosestStop();
    if (stop != null) {
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data.model.blocks.BlockTripBean

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.