Skip to content

Commit

Permalink
Remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis committed Nov 17, 2023
1 parent 8ad99cf commit e819844
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 942 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ public class UpdateOsm implements Callable<Integer> {
description = "The projection used by the database.")
private int srid = 3857;

@Option(names = {"--replication-url"}, paramLabel = "REPLICATION_URL",
description = "The replication url of the OpenStreetMap server.")
private String replicationUrl = "https://planet.osm.org/replication/hour";

@Override
public Integer call() throws Exception {
new UpdateOsmDatabase(database, srid)
new UpdateOsmDatabase(database, srid, replicationUrl)
.execute(new WorkflowContext());
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,11 @@ public class CreateGeocoderOpenStreetMap implements Task {

private Path indexDirectory;

public CreateGeocoderOpenStreetMap() {}

public CreateGeocoderOpenStreetMap(Path file, Path indexDirectory) {
this.file = file;
this.indexDirectory = indexDirectory;
}

public Path getFile() {
return file;
}

public void setFile(Path file) {
this.file = file;
}

public Path getIndexDirectory() {
return indexDirectory;
}

public void setIndexDirectory(Path indexDirectory) {
this.indexDirectory = indexDirectory;
}

@Override
public void execute(WorkflowContext context) throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,11 @@ public class CreateGeonamesIndex implements Task {

private Path indexDirectory;

public CreateGeonamesIndex() {

}

public CreateGeonamesIndex(Path dataFile, Path indexDirectory) {
this.dataFile = dataFile;
this.indexDirectory = indexDirectory;
}

public Path getDataFile() {
return dataFile;
}

public void setDataFile(Path dataFile) {
this.dataFile = dataFile;
}

public Path getIndexDirectory() {
return indexDirectory;
}

public void setIndexDirectory(Path indexDirectory) {
this.indexDirectory = indexDirectory;
}

@Override
public void execute(WorkflowContext context) throws Exception {
var directory = MMapDirectory.open(indexDirectory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,38 +46,12 @@ public class CreateIplocIndex implements Task {
private List<Path> nicPaths;
private Path targetIplocIndexPath;

public CreateIplocIndex() {}

public CreateIplocIndex(Path geonamesIndexPath, List<Path> nicPaths, Path targetIplocIndexPath) {
this.geonamesIndexPath = geonamesIndexPath;
this.nicPaths = nicPaths;
this.targetIplocIndexPath = targetIplocIndexPath;
}

public Path getGeonamesIndexPath() {
return geonamesIndexPath;
}

public void setGeonamesIndexPath(Path geonamesIndexPath) {
this.geonamesIndexPath = geonamesIndexPath;
}

public List<Path> getNicPaths() {
return nicPaths;
}

public void setNicPaths(List<Path> nicPaths) {
this.nicPaths = nicPaths;
}

public Path getTargetIplocIndexPath() {
return targetIplocIndexPath;
}

public void setTargetIplocIndexPath(Path targetIplocIndexPath) {
this.targetIplocIndexPath = targetIplocIndexPath;
}

@Override
public void execute(WorkflowContext context) throws Exception {
try (var directory = MMapDirectory.open(geonamesIndexPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public enum Compression {
private Path target;
private Compression compression;

/**
* Constructs a {@code DecompressFile}.
*/
public DecompressFile() {}

/**
* Constructs a {@code DecompressFile}.
*
Expand All @@ -75,60 +70,6 @@ public DecompressFile(Path source, Path target, Compression compression) {
this.compression = compression;
}

/**
* Returns the source file.
*
* @return the source file
*/
public Path getSource() {
return source;
}

/**
* Sets the source file.
*
* @param source the source file
*/
public void setSource(Path source) {
this.source = source;
}

/**
* Returns the target file.
*
* @return the target file
*/
public Path getTarget() {
return target;
}

/**
* Sets the target file.
*
* @param target the target file
*/
public void setTarget(Path target) {
this.target = target;
}

/**
* Returns the compression format.
*
* @return the compression format
*/
public Compression getCompression() {
return compression;
}

/**
* Sets the compression format.
*
* @param compression the compression format
*/
public void setCompression(Compression compression) {
this.compression = compression;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ public class DownloadUrl implements Task {

private Boolean replaceExisting;

/**
* Constructs an {@code DownloadUrl}.
*/
public DownloadUrl() {}

/**
* Constructs an {@code DownloadUrl}.
*
Expand All @@ -68,30 +63,6 @@ public DownloadUrl(String url, Path path, boolean replaceExisting) {
this.replaceExisting = replaceExisting;
}

public String getUrl() {
return url;
}

public void setUrl(String url) {
this.url = url;
}

public Path getPath() {
return path;
}

public void setPath(Path path) {
this.path = path;
}

public Boolean getReplaceExisting() {
return replaceExisting;
}

public void setReplaceExisting(Boolean replaceExisting) {
this.replaceExisting = replaceExisting;
}

@Override
public void execute(WorkflowContext context) throws Exception {
var targetUrl = new URL(url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ public class ExecuteCommand implements Task {

private String command;

/**
* Constructs an {@code ExecuteCommand}.
*/
public ExecuteCommand() {}

/**
* Constructs an {@code ExecuteCommand}.
*
Expand All @@ -47,24 +42,6 @@ public ExecuteCommand(String command) {
this.command = command;
}

/**
* Returns the bash command.
*
* @return the bash command
*/
public String getCommand() {
return command;
}

/**
* Sets the bash command.
*
* @param command the bash command
*/
public void setCommand(String command) {
this.command = command;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ public class ExecuteSql implements Task {

private Boolean parallel;

/**
* Constructs an {@code ExecuteSql}.
*/
public ExecuteSql() {

}

/**
* Constructs an {@code ExecuteSql}.
*
Expand All @@ -64,60 +57,6 @@ public ExecuteSql(Object database, Path file, Boolean parallel) {
this.parallel = parallel;
}

/**
* Returns the database.
*
* @return the database
*/
public Object getDatabase() {
return database;
}

/**
* Sets the database.
*
* @param database the database
*/
public void setDatabase(Object database) {
this.database = database;
}

/**
* Returns the SQL file.
*
* @return the SQL file
*/
public Path getFile() {
return file;
}

/**
* Sets the SQL file.
*
* @param file the SQL file
*/
public void setFile(Path file) {
this.file = file;
}

/**
* Returns whether to execute the queries in parallel.
*
* @return whether to execute the queries in parallel
*/
public boolean isParallel() {
return parallel;
}

/**
* Sets whether to execute the queries in parallel.
*
* @param parallel whether to execute the queries in parallel
*/
public void setParallel(boolean parallel) {
this.parallel = parallel;
}

/**
* {@inheritDoc}
*/
Expand Down
Loading

0 comments on commit e819844

Please sign in to comment.