QueueIterator<Feature> iterator = new QueueIterator<Feature>(queueCapacity, timeout,
timeoutUnit);
ProgressListener progressListener = getProgressListener();
ConvertAndImportSink sink = new ConvertAndImportSink(converter, iterator, platform(),
mapping, noRaw, new SubProgressListener(progressListener, 100));
reader.setSink(sink);
Thread readerThread = new Thread(reader, "osm-import-reader-thread");
readerThread.start();
Function<Feature, String> parentTreePathResolver = new Function<Feature, String>() {
@Override
public String apply(Feature input) {
if (input instanceof MappedFeature) {
return ((MappedFeature) input).getPath();
}
return input.getType().getName().getLocalPart();
}
};
// used to set the task status name, but report no progress so it does not interfere
// with the progress reported by the reader thread
SubProgressListener noPorgressReportingListener = new SubProgressListener(progressListener,
0) {
@Override
public void setProgress(float progress) {
// no-op
}