Examples of InstanceState


Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

        if (0 <= sourceIndex && sourceIndex < sourceStopIndex.size()) {

          FrequencyBlockStopTimeEntry sourceEntry = sourceStopTimes.get(sourceIndex);
          BlockStopTimeEntry sourceBst = sourceEntry.getStopTime();
          FrequencyEntry frequency = sourceEntry.getFrequency();
          InstanceState state = new InstanceState(serviceDate.getTime(),
              frequency);
          int stopTimeOffset = sourceEntry.getStopTimeOffset();

          int frequencyOffset = computeFrequencyOffset(relativeTime, sourceBst,
              frequency, stopTimeOffset, findDepartures);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

    int fromIndex = GenericBinarySearch.search(index, blockStopTimes.size(),
        relativeFrom, IndexAdapters.BLOCK_STOP_TIME_DEPARTURE_INSTANCE);
    int toIndex = GenericBinarySearch.search(index, blockStopTimes.size(),
        relativeTo, IndexAdapters.BLOCK_STOP_TIME_ARRIVAL_INSTANCE);

    InstanceState state = new InstanceState(serviceDate.getTime());
    for (int in = fromIndex; in < toIndex; in++) {
      BlockStopTimeEntry blockStopTime = blockStopTimes.get(in);
      instances.add(new StopTimeInstance(blockStopTime, state));
    }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

      FrequencyBlockStopTimeEntry entry = frequencyStopTimes.get(in);
      BlockStopTimeEntry bst = entry.getStopTime();
      FrequencyEntry frequency = entry.getFrequency();

      InstanceState state = new InstanceState(serviceDate.getTime(), frequency);

      switch (frequencyBehavior) {

        case INCLUDE_UNSPECIFIED: {
          stopTimeInstances.add(new StopTimeInstance(bst, state));
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

        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) {
          stopTimesByRouteCollectionId.get(routeCollectionId).add(sti);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

        BlockStopTimeEntry stopTime = entry.getStopTime();

        BlockTripEntry blockTrip = stopTime.getTrip();
        TripEntry trip = blockTrip.getTrip();
        AgencyAndId routeCollectionId = trip.getRouteCollection().getId();
        InstanceState state = new InstanceState(serviceDate.getTime(),
            entry.getFrequency());

        StopTimeInstance sti = new StopTimeInstance(stopTime, state);

        frequenciesByRouteCollectionId.get(routeCollectionId).add(sti);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

    List<BlockConfigurationEntry> configurations = block.getConfigurations();
    int index = 0;

    Date date = new Date(serviceDate);
    InstanceState state = new InstanceState(serviceDate);

    /**
     * See the specific contract for {@link BlockEntry#getConfigurations()}
     * about the sort order of configurations
     */
 
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

    int indexFrom = index(Arrays.binarySearch(intervals.getMaxDepartures(),
        scheduledTimeFrom));
    int indexTo = index(Arrays.binarySearch(intervals.getMinArrivals(),
        scheduledTimeTo));
   
    InstanceState state = new InstanceState(serviceDate.getTime());

    for (int in = indexFrom; in < indexTo; in++) {
      BlockTripEntry trip = trips.get(in);
      BlockConfigurationEntry block = trip.getBlockConfiguration();
      BlockInstance instance = new BlockInstance(block, state);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

    int indexFrom = index(Arrays.binarySearch(intervals.getEndTimes(),
        scheduledTimeFrom));
    int indexTo = index(Arrays.binarySearch(intervals.getStartTimes(),
        scheduledTimeTo));
   
    InstanceState state = new InstanceState(serviceDate.getTime());

    for (int in = indexFrom; in < indexTo; in++) {
      BlockTripEntry trip = trips.get(in);
      BlockConfigurationEntry block = trip.getBlockConfiguration();
      BlockInstance instance = new BlockInstance(block, state);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.InstanceState

    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.blocks.InstanceState

      if (indexFrom < 0)
        indexFrom = -(indexFrom + 1);
      if (indexTo < 0)
        indexTo = -(indexTo + 1);

      InstanceState state = new InstanceState(serviceDate.getTime());

      for (int i = indexFrom; i < indexTo; i++) {

        BlockSequence sequence = sequences.get(i);
        BlockConfigurationEntry blockConfig = sequence.getBlockConfig();
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.