Examples of TripDetailsBean


Examples of org.onebusaway.transit_data.model.trips.TripDetailsBean

       * If we have no locations for the specified block instance, it means the
       * block is not currently active. But we can still attempt to construct a
       * trip details
       */
      if (locations.isEmpty()) {
        TripDetailsBean details = getTripEntryAndBlockLocationAsTripDetails(
            blockTripInstance, null, query.getInclusion(), time);
        tripDetails.add(details);
      } else {
        for (BlockLocation location : locations) {
          TripDetailsBean details = getBlockLocationAsTripDetails(
              blockTripInstance, location, query.getInclusion(), time);
          tripDetails.add(details);
        }
      }
    }
View Full Code Here

Examples of org.onebusaway.transit_data.model.trips.TripDetailsBean

  private ListBean<TripDetailsBean> getBlockLocationsAsTripDetails(
      List<BlockLocation> locations, TripDetailsInclusionBean inclusion,
      long time) {
    List<TripDetailsBean> tripDetails = new ArrayList<TripDetailsBean>();
    for (BlockLocation location : locations) {
      TripDetailsBean details = getBlockLocationAsTripDetails(
          location.getActiveTripInstance(), location, inclusion, time);
      tripDetails.add(details);
    }
    return new ListBean<TripDetailsBean>(tripDetails, false);
  }
View Full Code Here

Examples of org.onebusaway.transit_data.model.trips.TripDetailsBean

    if (missing)
      return null;

    String tripId = AgencyAndIdLibrary.convertToString(tripEntry.getId());

    TripDetailsBean bean = new TripDetailsBean();
    bean.setTripId(tripId);
    bean.setServiceDate(serviceDate);
    bean.setFrequency(frequency);
    bean.setTrip(trip);
    bean.setSchedule(stopTimes);
    bean.setStatus(status);
    bean.setSituations(situations);
    return bean;
  }
View Full Code Here

Examples of org.onebusaway.transit_data.model.trips.TripDetailsBean

      bean.setLocation(new CoordinatePoint(record.getCurrentLocationLat(),
          record.getCurrentLocationLon()));

    bean.setVehicleId(AgencyAndIdLibrary.convertToString(record.getVehicleId()));

    TripDetailsBean details = _tripDetailsBeanService.getTripForVehicle(
        record.getVehicleId(), time, new TripDetailsInclusionBean(true, false,
            true));
    if (details != null && details.getStatus() != null) {
      bean.setTrip(details.getTrip());
      bean.setTripStatus(details.getStatus());
    }

    List<VehicleLocationRecord> allRecords = status.getAllRecords();
    if (!CollectionsLibrary.isEmpty(allRecords)) {
      List<VehicleLocationRecordBean> allRecordBeans = new ArrayList<VehicleLocationRecordBean>();
View Full Code Here

Examples of org.onebusaway.transit_data.model.trips.TripDetailsBean

    TripDetailsInclusionBean inclusion = query.getInclusion();
    inclusion.setIncludeTripBean(_includeTrip);
    inclusion.setIncludeTripSchedule(_includeSchedule);
    inclusion.setIncludeTripStatus(_includeStatus);

    TripDetailsBean trip = _service.getSingleTripDetails(query);

    if (trip == null)
      return setResourceNotFoundResponse();

    BeanFactoryV2 factory = getBeanFactoryV2();
View Full Code Here

Examples of org.onebusaway.transit_data.model.trips.TripDetailsBean

    TripDetailsInclusionBean inclusion = new TripDetailsInclusionBean();
    inclusion.setIncludeTripBean(false);
    inclusion.setIncludeTripSchedule(false);
    inclusion.setIncludeTripStatus(true);
   
    TripDetailsBean details = _service.getTripForVehicle(vid, time,inclusion);
   
    if( "html".equals(format))
      return new ModelAndView("closest-stop-for-vehicle-html.jspx", "stopTime", details);
    else
      return new ModelAndView("closest-stop-for-vehicle-xml.jspx", "stopTime", details);
View Full Code Here

Examples of org.onebusaway.transit_data.model.trips.TripDetailsBean

      query.setTripId(tripBean.getId());
      query.setVehicleId(vehicleStatus.getVehicleId());
      query.getInclusion().setIncludeTripStatus(true);
      TripStatusBean tripStatus = vehicleStatus.getTripStatus();
      query.setServiceDate(tripStatus.getServiceDate());
      TripDetailsBean tripDetails = _transitDataService.getSingleTripDetails(query);
      activity.MonitoredVehicleJourney = SiriUtils.getMonitoredVehicleJourney(
          tripDetails, new Date(tripStatus.getServiceDate()),
          vehicleStatus.getVehicleId());

      if (onwardCalls) {

        List<TripStopTimeBean> stopTimes = tripDetails.getSchedule().getStopTimes();

        long serviceDateMillis = tripStatus.getServiceDate();
        double distance = tripStatus.getDistanceAlongTrip();
        if (Double.isNaN(distance)) {
          distance = tripStatus.getScheduledDistanceAlongTrip();
View Full Code Here

Examples of org.onebusaway.transit_data.model.trips.TripDetailsBean

    TripDetailsInclusionBean inclusion = query.getInclusion();
    inclusion.setIncludeTripBean(_includeTrip);
    inclusion.setIncludeTripSchedule(_includeSchedule);
    inclusion.setIncludeTripStatus(_includeStatus);

    TripDetailsBean trip = _service.getTripDetailsForVehicleAndTime(query);

    if (trip == null)
      return setResourceNotFoundResponse();

    BeanFactoryV2 factory = getBeanFactoryV2();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.