Package org.onebusaway.api.model.transit.tripplanning

Examples of org.onebusaway.api.model.transit.tripplanning.ItineraryV2Bean


    List<ItineraryBean> its = itineraries.getItineraries();

    if (!CollectionsLibrary.isEmpty(its)) {
      List<ItineraryV2Bean> beans = new ArrayList<ItineraryV2Bean>(its.size());
      for (ItineraryBean itinerary : its) {
        ItineraryV2Bean itBean = getItinerary(itinerary);
        beans.add(itBean);
      }
      bean.setItineraries(beans);
    }
View Full Code Here


    return bean;
  }

  public ItineraryV2Bean getItinerary(ItineraryBean itinerary) {

    ItineraryV2Bean bean = new ItineraryV2Bean();

    bean.setStartTime(itinerary.getStartTime());
    bean.setEndTime(itinerary.getEndTime());
    bean.setProbability(itinerary.getProbability());
    bean.setSelected(itinerary.isSelected());

    List<LegBean> legs = itinerary.getLegs();
    if (!CollectionsLibrary.isEmpty(legs)) {
      List<LegV2Bean> legBeans = new ArrayList<LegV2Bean>(legs.size());
      for (LegBean leg : legs) {
        LegV2Bean legBean = getLeg(leg);
        legBeans.add(legBean);
      }
      bean.setLegs(legBeans);
    }

    return bean;
  }
View Full Code Here

      String includeSelectedItinerary, ConstraintsBean constraints) {

    if (includeSelectedItinerary == null || includeSelectedItinerary.isEmpty())
      return;

    ItineraryV2Bean bean = new ItineraryV2Bean();
    JSONObject jsonObject = JSONObject.fromObject(includeSelectedItinerary);

    JsonConfig config = new JsonConfig();

    Map<Object, Object> classMap = new HashMap<Object, Object>();
View Full Code Here

TOP

Related Classes of org.onebusaway.api.model.transit.tripplanning.ItineraryV2Bean

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.