use of org.openstreetmap.osmosis.core.domain.v0_6.Bound in project osmosis by openstreetmap.
the class PostgreSqlDatasetContext method iterate.
/**
* {@inheritDoc}
*/
@Override
public ReleasableIterator<EntityContainer> iterate() {
List<Bound> bounds;
List<ReleasableIterator<EntityContainer>> sources;
if (!initialized) {
initialize();
}
// Build the bounds list.
bounds = new ArrayList<Bound>();
bounds.add(new Bound("Osmosis " + OsmosisConstants.VERSION));
sources = new ArrayList<ReleasableIterator<EntityContainer>>();
sources.add(new UpcastIterator<EntityContainer, BoundContainer>(new BoundContainerIterator(new ReleasableAdaptorForIterator<Bound>(bounds.iterator()))));
sources.add(new UpcastIterator<EntityContainer, NodeContainer>(new NodeContainerIterator(nodeDao.iterate())));
sources.add(new UpcastIterator<EntityContainer, WayContainer>(new WayContainerIterator(wayDao.iterate())));
sources.add(new UpcastIterator<EntityContainer, RelationContainer>(new RelationContainerIterator(relationDao.iterate())));
return new MultipleSourceIterator<EntityContainer>(sources);
}
Aggregations