use of org.onebusaway.transit_data_federation.impl.blocks.BlockSequence in project onebusaway-application-modules by camsys.
the class BlockSequenceIndex method toString.
@Override
public String toString() {
BlockSequence first = _sequences.get(0);
BlockConfigurationEntry blockConfig = first.getBlockConfig();
BlockEntry block = blockConfig.getBlock();
List<BlockStopTimeEntry> bsts = first.getStopTimes();
BlockStopTimeEntry firstBst = bsts.get(0);
BlockStopTimeEntry lastBst = bsts.get(bsts.size() - 1);
StopEntry fromStop = firstBst.getStopTime().getStop();
StopEntry toStop = lastBst.getStopTime().getStop();
return "BlockSequenceIndex [ex: block=" + block.getId() + " fromStop=" + fromStop.getId() + " toStop=" + toStop.getId() + " serviceIds=" + getServiceIds() + "]";
}
use of org.onebusaway.transit_data_federation.impl.blocks.BlockSequence in project onebusaway-application-modules by camsys.
the class BlockStopSequenceIndex method getArrivalTimeForIndex.
@Override
public int getArrivalTimeForIndex(int index) {
List<BlockSequence> sequences = _index.getSequences();
BlockSequence sequence = sequences.get(index);
return sequence.getArrivalTimeForIndex(_offset);
}
use of org.onebusaway.transit_data_federation.impl.blocks.BlockSequence in project onebusaway-application-modules by camsys.
the class BlockStopSequenceIndex method getDepartureTimeForIndex.
@Override
public int getDepartureTimeForIndex(int index) {
List<BlockSequence> sequences = _index.getSequences();
BlockSequence sequence = sequences.get(index);
return sequence.getDepartureTimeForIndex(_offset);
}
use of org.onebusaway.transit_data_federation.impl.blocks.BlockSequence in project onebusaway-application-modules by camsys.
the class BlockStopSequenceIndex method computeServiceInterval.
/**
**
* Private Methods
***
*/
private ServiceInterval computeServiceInterval(BlockSequenceIndex index, int stopIndex) {
List<BlockSequence> sequences = _index.getSequences();
BlockStopTimeEntry fromBst = sequences.get(0).getStopTimes().get(stopIndex);
BlockStopTimeEntry toBst = sequences.get(sequences.size() - 1).getStopTimes().get(stopIndex);
StopTimeEntry fromSt = fromBst.getStopTime();
StopTimeEntry toSt = toBst.getStopTime();
return new ServiceInterval(fromSt.getArrivalTime(), fromSt.getDepartureTime(), toSt.getArrivalTime(), toSt.getDepartureTime());
}
use of org.onebusaway.transit_data_federation.impl.blocks.BlockSequence in project onebusaway-application-modules by camsys.
the class BlockStopSequenceIndex method toString.
@Override
public String toString() {
List<BlockSequence> sequences = _index.getSequences();
BlockSequence sequence = sequences.get(0);
List<BlockStopTimeEntry> stopTimes = sequence.getStopTimes();
BlockStopTimeEntry bst = stopTimes.get(_offset);
return bst.toString();
}
Aggregations