-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from mgcuthbert/master
Code consolidation and refactoring
- Loading branch information
Showing
14 changed files
with
263 additions
and
416 deletions.
There are no files selected for viewing
24 changes: 2 additions & 22 deletions
24
...n/src/main/java/org/openstreetmap/osmosis/replication/v0_6/IntervalDownloaderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 3 additions & 20 deletions
23
...java/org/openstreetmap/osmosis/replication/v0_6/IntervalDownloaderInitializerFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 2 additions & 22 deletions
24
...rc/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationDownloaderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 2 additions & 22 deletions
24
...a/org/openstreetmap/osmosis/replication/v0_6/ReplicationDownloaderInitializerFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 2 additions & 21 deletions
23
...rc/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationFileMergerFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 2 additions & 22 deletions
24
...a/org/openstreetmap/osmosis/replication/v0_6/ReplicationFileMergerInitializerFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 2 additions & 21 deletions
23
...src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationLagReaderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 2 additions & 19 deletions
21
...ain/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationToChangeWriterFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,23 @@ | ||
// This software is released into the Public Domain. See copying.txt for details. | ||
package org.openstreetmap.osmosis.replication.v0_6; | ||
|
||
import java.io.File; | ||
|
||
import org.openstreetmap.osmosis.core.pipeline.common.TaskConfiguration; | ||
import org.openstreetmap.osmosis.core.pipeline.common.TaskManager; | ||
import org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory; | ||
import org.openstreetmap.osmosis.core.pipeline.v0_6.ChangeSinkChangeSourceManager; | ||
|
||
|
||
/** | ||
* The task manager factory for a replication to change writer. | ||
*/ | ||
public class ReplicationToChangeWriterFactory extends TaskManagerFactory { | ||
private static final String ARG_WORKING_DIRECTORY = "workingDirectory"; | ||
private static final String DEFAULT_WORKING_DIRECTORY = "./"; | ||
|
||
public class ReplicationToChangeWriterFactory extends WorkingTaskManagerFactory { | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) { | ||
String workingDirectoryString; | ||
File workingDirectory; | ||
|
||
// Get the task arguments. | ||
workingDirectoryString = getStringArgument(taskConfig, ARG_WORKING_DIRECTORY, | ||
getDefaultStringArgument(taskConfig, DEFAULT_WORKING_DIRECTORY)); | ||
|
||
// Convert argument strings to strongly typed objects. | ||
workingDirectory = new File(workingDirectoryString); | ||
|
||
return new ChangeSinkChangeSourceManager( | ||
taskConfig.getId(), | ||
new ReplicationToChangeWriter(workingDirectory), | ||
new ReplicationToChangeWriter(this.getWorkingDirectory(taskConfig)), | ||
taskConfig.getPipeArgs()); | ||
} | ||
} |
Oops, something went wrong.