use of org.onebusaway.gtfs_transformer.updates.SubsectionTripTransformStrategy in project onebusaway-gtfs-modules by OneBusAway.
the class TransformFactory method handleSubsectionOperation.
private void handleSubsectionOperation(String line, JSONObject json) throws JSONException, TransformSpecificationException {
SubsectionTripTransformStrategy strategy = getStrategy(SubsectionTripTransformStrategy.class);
SubsectionOperation operation = new SubsectionTripTransformStrategy.SubsectionOperation();
setObjectPropertiesFromJsonUsingCsvFields(operation, json, line);
if (operation.getFromStopId() == null && operation.getToStopId() == null) {
throw new TransformSpecificationException("must specify at least fromStopId or toStopId in subsection op", line);
}
strategy.addOperation(operation);
}
Aggregations