Examples of FrequencyEntry


Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

      if (group.isEmpty())
        return group;

      List<FrequencyEntry> frequencies = group.getFrequencies();

      FrequencyEntry prev = frequencies.get(frequencies.size() - 1);
      FrequencyEntry next = bcwf.getFrequency();

      if (prev.getEndTime() <= next.getStartTime())
        return group;
    }

    return null;
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

    int[] startTimes = new int[n];
    int[] endTimes = new int[n];

    for (int index = 0; index < n; index++) {

      FrequencyEntry freq = frequencies.get(index);

      startTimes[index] = freq.getStartTime();
      endTimes[index] = freq.getEndTime();
    }

    return new FrequencyServiceIntervalBlock(startTimes, endTimes);
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

    ServiceInterval interval = null;

    for (int i = 0; i < n; i++) {
      FrequencyBlockStopTimeEntry frequencyBlockStopTime = group.get(i);
      FrequencyEntry frequency = frequencyBlockStopTime.getFrequency();
      frequencies.add(frequency);
      BlockStopTimeEntry blockStopTime = frequencyBlockStopTime.getStopTime();
      blockConfigs.add(blockStopTime.getTrip().getBlockConfiguration());
      stopIndices[i] = blockStopTime.getBlockSequence();
      interval = ServiceInterval.extend(interval, frequency.getStartTime(),
          frequency.getStartTime());
      interval = ServiceInterval.extend(interval, frequency.getEndTime(),
          frequency.getEndTime());
    }

    return new FrequencyBlockStopTimeIndex(frequencies, blockConfigs,
        stopIndices, interval);
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

    blockConfig = block.getConfigurations().get(0);

    List<FrequencyEntry> frequencies = blockConfig.getFrequencies();
    assertEquals(2, frequencies.size());
    FrequencyEntry frequency = frequencies.get(0);
    assertEquals(freqA.getStartTime(), frequency.getStartTime());
    assertEquals(freqA.getEndTime(), frequency.getEndTime());
    assertEquals(freqA.getHeadwaySecs(), frequency.getHeadwaySecs());
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

    Map<AgencyAndId, StopBean> stopBeanCache = new HashMap<AgencyAndId, StopBean>();

    for (ArrivalAndDepartureInstance instance : instances) {

      FrequencyEntry frequency = instance.getFrequency();

      long from = frequency != null ? frequencyFromTime : nonFrequencyFromTime;
      long to = frequency != null ? frequencyToTime : nonFrequencyToTime;

      if (!isArrivalAndDepartureInRange(instance, from, to))
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

    pab.setStatus("default");

    pab.setScheduledArrivalTime(instance.getScheduledArrivalTime());
    pab.setScheduledDepartureTime(instance.getScheduledDepartureTime());

    FrequencyEntry frequency = instance.getFrequencyLabel();
    pab.setFrequency(null);
    if (frequency != null) {
      FrequencyBean fb = FrequencyBeanLibrary.getBeanForFrequency(
          instance.getServiceDate(), frequency);
      pab.setFrequency(fb);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

        serviceIntervalIndex.getStartTimes(), scheduledTimeTo));

    for (int in = indexFrom; in < indexTo; in++) {
      BlockTripEntry trip = trips.get(in);
      BlockConfigurationEntry block = trip.getBlockConfiguration();
      FrequencyEntry frequency = frequencies.get(in);
      InstanceState state = new InstanceState(serviceDate.getTime(), frequency);
      BlockInstance instance = new BlockInstance(block, state);
      instances.add(instance);
    }
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

        BlockTripEntry blockTrip = stopTime.getTrip();
        TripEntry trip = blockTrip.getTrip();
        AgencyAndId routeCollectionId = trip.getRouteCollection().getId();

        FrequencyEntry frequencyLabel = trip.getFrequencyLabel();
        InstanceState state = new InstanceState(serviceDate.getTime(),
            frequencyLabel);
        StopTimeInstance sti = new StopTimeInstance(stopTime, state);

        if (frequencyLabel == null) {
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry

    public FrequencyBlockStopTimeEntry get(int index) {
      List<BlockTripEntry> trips = _index.getTrips();
      BlockTripEntry trip = trips.get(index);
      BlockStopTimeEntry blockStopTime = trip.getStopTimes().get(_offset);
      List<FrequencyEntry> frequencies = _index.getFrequencies();
      FrequencyEntry frequency = frequencies.get(index);
      return new FrequencyBlockStopTimeEntryImpl(blockStopTime, frequency);
    }
View Full Code Here

Examples of org.opentripplanner.routing.trippattern.FrequencyEntry

            /* If this trip is referenced by one or more lines in frequencies.txt, wrap it in a FrequencyEntry. */
            List<Frequency> frequencies = frequenciesForTrip.get(trip);
            if (frequencies != null && !(frequencies.isEmpty())) {
                for (Frequency freq : frequencies) {
                    tripPattern.add(new FrequencyEntry(freq, tripTimes));
                    freqCount++;
                }
                // TODO replace: createGeometry(graph, trip, stopTimes, hops);
            }

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.