org.openstreetmap.osmosis.core.mysql.v0_5.impl
Class CurrentWayReader

java.lang.Object
  extended by org.openstreetmap.osmosis.core.mysql.v0_5.impl.CurrentWayReader
All Implemented Interfaces:
java.util.Iterator<Way>, Releasable, ReleasableIterator<Way>

public class CurrentWayReader
extends java.lang.Object
implements ReleasableIterator<Way>

Reads current ways from a database ordered by their identifier. It combines the output of the way table readers to produce fully configured way objects.

Author:
Brett Henderson

Constructor Summary
CurrentWayReader(DatabaseLoginCredentials loginCredentials, boolean readAllUsers)
          Creates a new instance.
 
Method Summary
 boolean hasNext()
          
 Way next()
          
 void release()
          Performs resource cleanup tasks such as closing files, or database connections.
 void remove()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentWayReader

public CurrentWayReader(DatabaseLoginCredentials loginCredentials,
                        boolean readAllUsers)
Creates a new instance.

Parameters:
loginCredentials - Contains all information required to connect to the database.
readAllUsers - If this flag is true, all users will be read from the database regardless of their public edits flag.
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface java.util.Iterator<Way>

next

public Way next()

Specified by:
next in interface java.util.Iterator<Way>

remove

public void remove()

Specified by:
remove in interface java.util.Iterator<Way>

release

public void release()
Performs resource cleanup tasks such as closing files, or database connections. This must be called after all processing is complete and may be called multiple times. Implementations must call release on any nested Releasable objects. It should be called within a finally block to ensure it is called in exception scenarios.

Specified by:
release in interface Releasable