use of org.onebusaway.gtfs_transformer.deferred.PropertyPathExpressionValueSetter in project onebusaway-gtfs-modules by OneBusAway.
the class TransformFactory method createSetterForValue.
private ValueSetter createSetterForValue(Object value) {
String stringValue = value.toString();
Matcher pathMatcher = _pathMatcher.matcher(stringValue);
if (pathMatcher.matches()) {
PropertyPathExpression expression = new PropertyPathExpression(pathMatcher.group(1));
return new PropertyPathExpressionValueSetter(_transformer.getReader(), _schemaCache, _transformer.getDao(), expression);
}
Matcher replaceMatcher = _replaceMatcher.matcher(stringValue);
if (replaceMatcher.matches()) {
return new ReplaceValueSetter(replaceMatcher.group(1), replaceMatcher.group(2));
}
return new DeferredValueSetter(_transformer.getReader(), _schemaCache, _transformer.getDao(), value);
}
Aggregations