org.openstreetmap.osmosis.extract.apidb.common
Class Configuration

java.lang.Object
  extended by org.openstreetmap.osmosis.extract.apidb.common.Configuration

public class Configuration
extends java.lang.Object

Loads and exposes the extraction configuration properties.

Author:
Brett Henderson

Constructor Summary
Configuration(java.io.File configFile)
          Creates a new instance.
 
Method Summary
 boolean getAllowIncorrectSchemaVersion()
          Returns the validate schema version flag.
 java.lang.String getChangeFileBeginFormat()
          Returns the begin time portion of the changeset filename.
 java.lang.String getChangeFileEndFormat()
          Returns the end time portion of the changeset filename.
 java.lang.String getDatabase()
          Returns the database instance.
 DatabaseLoginCredentials getDatabaseLoginCredentials()
          Provides a fully configured set of database login credentials based on the configuration.
 DatabasePreferences getDatabasePreferences()
          Provides a fully configured set of database preferences based on the configuration.
 DatabaseType getDbType()
          Returns the database type.
 java.lang.String getHost()
          Returns the database host.
 int getIntervalLength()
          Returns the duration of each changeset interval.
 int getLagLength()
          Returns the amount of time the extraction process lags the current time to allow the database to stabilise to ensure consistent queries.
 java.lang.String getPassword()
          Returns the database password.
 boolean getReadFullHistory()
          Returns the full history flag.
 java.lang.String getUser()
          Returns the database user.
 boolean getValidateSchemaVersion()
          Returns the validate schema version flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration(java.io.File configFile)
Creates a new instance.

Parameters:
configFile - The configuration file to read from.
Method Detail

getHost

public java.lang.String getHost()
Returns the database host.

Returns:
The database host.

getDatabase

public java.lang.String getDatabase()
Returns the database instance.

Returns:
The database instance.

getUser

public java.lang.String getUser()
Returns the database user.

Returns:
The database user.

getPassword

public java.lang.String getPassword()
Returns the database password.

Returns:
The database password.

getDbType

public DatabaseType getDbType()
Returns the database type.

Returns:
The database type

getIntervalLength

public int getIntervalLength()
Returns the duration of each changeset interval.

Returns:
The interval length in milliseconds.

getLagLength

public int getLagLength()
Returns the amount of time the extraction process lags the current time to allow the database to stabilise to ensure consistent queries.

Returns:
The lag length in milliseconds.

getChangeFileBeginFormat

public java.lang.String getChangeFileBeginFormat()
Returns the begin time portion of the changeset filename.

Returns:
The format.

getChangeFileEndFormat

public java.lang.String getChangeFileEndFormat()
Returns the end time portion of the changeset filename.

Returns:
The format.

getReadFullHistory

public boolean getReadFullHistory()
Returns the full history flag.

Returns:
The full history flag.

getValidateSchemaVersion

public boolean getValidateSchemaVersion()
Returns the validate schema version flag.

Returns:
The validate schema version flag.

getAllowIncorrectSchemaVersion

public boolean getAllowIncorrectSchemaVersion()
Returns the validate schema version flag.

Returns:
The validate schema version flag.

getDatabaseLoginCredentials

public DatabaseLoginCredentials getDatabaseLoginCredentials()
Provides a fully configured set of database login credentials based on the configuration.

Returns:
The database login credentials.

getDatabasePreferences

public DatabasePreferences getDatabasePreferences()
Provides a fully configured set of database preferences based on the configuration.

Returns:
The database preferences.