for (Relation r : ds.getRelations()) {
if (canceled) return;
if (r.hasIncompleteMembers()) {
synchronized(this) {
if (canceled) return;
objectReader = new OsmServerObjectReader(r.getId(), OsmPrimitiveType.RELATION, fullRelation);
}
theirDataSet = objectReader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
synchronized (this) {
objectReader = null;
}
merger = new DataSetMerger(ds, theirDataSet);
merger.merge();
}
}
// a way loaded with MultiFetch may have incomplete nodes because at least one of its
// nodes isn't present in the local data set. We therefore fully load all
// ways with incomplete nodes.
//
for (Way w : ds.getWays()) {
if (canceled) return;
if (w.hasIncompleteNodes()) {
synchronized(this) {
if (canceled) return;
objectReader = new OsmServerObjectReader(w.getId(), OsmPrimitiveType.WAY, true /* full */);
}
theirDataSet = objectReader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
synchronized (this) {
objectReader = null;
}