Search in sources :

Example 1 with ScheduledBlockLocationBean

use of org.onebusaway.transit_data.model.blocks.ScheduledBlockLocationBean in project onebusaway-application-modules by camsys.

the class BlockBeanServiceImpl method getBlockLocationAsBean.

private ScheduledBlockLocationBean getBlockLocationAsBean(ScheduledBlockLocation blockLocation) {
    ScheduledBlockLocationBean bean = new ScheduledBlockLocationBean();
    if (blockLocation.getActiveTrip() != null) {
        BlockTripBean activeTrip = getBlockTripAsBean(blockLocation.getActiveTrip());
        bean.setActiveTrip(activeTrip);
    }
    bean.setDistanceAlongBlock(blockLocation.getDistanceAlongBlock());
    bean.setInService(blockLocation.isInService());
    bean.setLocation(blockLocation.getLocation());
    bean.setScheduledTime(blockLocation.getScheduledTime());
    bean.setStopTimeIndex(blockLocation.getStopTimeIndex());
    return bean;
}
Also used : BlockTripBean(org.onebusaway.transit_data.model.blocks.BlockTripBean) ScheduledBlockLocationBean(org.onebusaway.transit_data.model.blocks.ScheduledBlockLocationBean)

Aggregations

BlockTripBean (org.onebusaway.transit_data.model.blocks.BlockTripBean)1 ScheduledBlockLocationBean (org.onebusaway.transit_data.model.blocks.ScheduledBlockLocationBean)1