int transferTime = getTransferTime(fromStop.getId(), toStop.getId(), fromTrip, toTrip);
// Check parents of stops if no transfer was found
if (transferTime == StopTransfer.UNKNOWN_TRANSFER) {
// Find parent ids
AgencyAndId fromStopParentId = null;
AgencyAndId toStopParentId = null;
if (fromStop.getParentStation() != null
&& !fromStop.getParentStation().isEmpty()) {
// From stop has a parent
fromStopParentId = new AgencyAndId(fromStop.getId().getAgencyId(), fromStop.getParentStation());
}
if (toStop.getParentStation() != null
&& !toStop.getParentStation().isEmpty()) {
// To stop has a parent
toStopParentId = new AgencyAndId(toStop.getId().getAgencyId(), toStop.getParentStation());
}
// Check parent of from stop if no transfer was found
if (fromStopParentId != null) {
transferTime = getTransferTime(fromStopParentId, toStop.getId(), fromTrip, toTrip);