{
if(columnIndex > 5)
{
if(!column.isEmpty())
{
StopTime stopTime = new StopTime();
stopTime.trip = trip;
// check for board/alight only flag
if(column.contains(">")) {
column = column.replace(">", "");
// board only
stopTime.dropOffType = StopTimePickupDropOffType.NONE;
}
if(column.contains("<")) {
column = column.replace("<", "");
// alight only
stopTime.pickupType = StopTimePickupDropOffType.NONE;
}
column = column.trim();
if(column.equals("+"))
stopTime.departureTime = firstTimepoint + columnStopDelta.get(columnIndex);
else if(column.equals("-"))
stopTime.departureTime = null;
else
{
Integer currentTime;
try
{
currentTime = (dfTime.parse(column).getHours() * 60 * 60 ) + (dfTime.parse(column).getMinutes() * 60) + (dfTime.parse(column).getSeconds());
}
catch(ParseException e)
{
try
{
currentTime = (dfsTime.parse(column).getHours() * 60 * 60 ) + (dfsTime.parse(column).getMinutes() * 60) + (dfsTime.parse(column).getSeconds());
}
catch(ParseException e2)
{
continue;
}
}
// in case of time that decreases add a day to offset for trips that cross midnight boundary
if(previousTime > currentTime)
dayOffset += 24 * 60 * 60;
stopTime.departureTime = currentTime + dayOffset;
previousTime = currentTime;
if(firstTimepoint == null)
{
firstTimepoint = stopTime.departureTime;
}
}
stopTime.arrivalTime = stopTime.departureTime;
stopTime.patternStop = columnStopIndex.get(columnIndex);
stopTime.stop = columnStopIndex.get(columnIndex).stop;
stopTime.stopSequence = columnCount + 1;
stopTime.save();
columnCount++;
}
}