Skip to content

Commit ac6c158

Browse files
committed
minor change
1 parent 4c470b8 commit ac6c158

File tree

9 files changed

+33
-33
lines changed

9 files changed

+33
-33
lines changed

citydb-cli/src/main/java/org/citydb/cli/common/IndexOption.java renamed to citydb-cli/src/main/java/org/citydb/cli/common/IndexOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import picocli.CommandLine;
2525

26-
public class IndexOption implements Option {
26+
public class IndexOptions implements Option {
2727
public enum Mode {keep, drop, drop_create}
2828

2929
@CommandLine.Option(names = "--index-mode", defaultValue = "keep",

citydb-cli/src/main/java/org/citydb/cli/common/ThreadsOption.java renamed to citydb-cli/src/main/java/org/citydb/cli/common/ThreadsOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import picocli.CommandLine;
2525

26-
public class ThreadsOption implements Option {
26+
public class ThreadsOptions implements Option {
2727
@CommandLine.Option(names = "--threads",
2828
description = "Number of threads to use for parallel processing.")
2929
private Integer threads;

citydb-cli/src/main/java/org/citydb/cli/common/TypeNameOption.java renamed to citydb-cli/src/main/java/org/citydb/cli/common/TypeNameOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.Arrays;
2828
import java.util.List;
2929

30-
public class TypeNameOption implements Option {
30+
public class TypeNameOptions implements Option {
3131
@CommandLine.Option(names = {"-t", "--type-name"}, split = ",", paramLabel = "<[prefix:]name>", required = true,
3232
description = "Names of the features to process.")
3333
private String[] typeNames;

citydb-cli/src/main/java/org/citydb/cli/deleter/DeleteCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ enum Mode {delete, terminate}
6262
private Mode mode;
6363

6464
@CommandLine.Mixin
65-
protected IndexOption indexOption;
65+
protected IndexOptions indexOptions;
6666

6767
@CommandLine.Option(names = "--preview",
6868
description = "Run in preview mode. Features will not be deleted.")
@@ -111,10 +111,10 @@ public Integer call() throws ExecutionException {
111111
tempDirectory,
112112
databaseManager.getAdapter());
113113

114-
IndexOption.Mode indexMode = indexOption.getMode();
114+
IndexOptions.Mode indexMode = indexOptions.getMode();
115115
AtomicLong counter = new AtomicLong();
116116

117-
if (indexMode != IndexOption.Mode.keep) {
117+
if (indexMode != IndexOptions.Mode.keep) {
118118
logger.info("Dropping database indexes...");
119119
helper.dropIndexes(databaseManager.getAdapter());
120120
}
@@ -159,7 +159,7 @@ public Integer call() throws ExecutionException {
159159
}
160160
}
161161

162-
if (shouldRun && indexMode == IndexOption.Mode.drop_create) {
162+
if (shouldRun && indexMode == IndexOptions.Mode.drop_create) {
163163
logger.info("Re-creating database indexes. This operation may take some time...");
164164
helper.createIndexes(databaseManager.getAdapter());
165165
}

citydb-cli/src/main/java/org/citydb/cli/deleter/options/QueryOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
import org.citydb.cli.common.CountLimitOptions;
2525
import org.citydb.cli.common.FilterOptions;
2626
import org.citydb.cli.common.Option;
27-
import org.citydb.cli.common.TypeNameOption;
27+
import org.citydb.cli.common.TypeNameOptions;
2828
import org.citydb.query.Query;
2929
import org.citydb.query.filter.encoding.FilterParseException;
3030
import picocli.CommandLine;
3131

3232
public class QueryOptions implements Option {
3333
@CommandLine.ArgGroup(exclusive = false)
34-
private TypeNameOption typeNameOption;
34+
private TypeNameOptions typeNameOptions;
3535

3636
@CommandLine.ArgGroup(exclusive = false)
3737
private FilterOptions filterOptions;
@@ -41,8 +41,8 @@ public class QueryOptions implements Option {
4141

4242
public Query getQuery() throws FilterParseException {
4343
Query query = new Query();
44-
if (typeNameOption != null) {
45-
query.setFeatureTypes(typeNameOption.getTypeNames());
44+
if (typeNameOptions != null) {
45+
query.setFeatureTypes(typeNameOptions.getTypeNames());
4646
}
4747

4848
if (filterOptions != null) {

citydb-cli/src/main/java/org/citydb/cli/exporter/ExportController.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public abstract class ExportController implements Command {
7676
protected Path tempDirectory;
7777

7878
@CommandLine.Mixin
79-
protected ThreadsOption threadsOption;
79+
protected ThreadsOptions threadsOptions;
8080

8181
@CommandLine.Mixin
8282
protected CrsOptions crsOptions;
@@ -260,8 +260,8 @@ protected ExportOptions getExportOptions() throws ExecutionException {
260260
throw new ExecutionException("Failed to get export options from config.", e);
261261
}
262262

263-
if (threadsOption.getNumberOfThreads() != null) {
264-
exportOptions.setNumberOfThreads(threadsOption.getNumberOfThreads());
263+
if (threadsOptions.getNumberOfThreads() != null) {
264+
exportOptions.setNumberOfThreads(threadsOptions.getNumberOfThreads());
265265
}
266266

267267
if (crsOptions.getTargetSrs() != null) {
@@ -302,8 +302,8 @@ protected WriteOptions getWriteOptions(ExportOptions exportOptions, DatabaseAdap
302302
writeOptions.setTempDirectory(tempDirectory.toString());
303303
}
304304

305-
if (threadsOption.getNumberOfThreads() != null) {
306-
writeOptions.setNumberOfThreads(threadsOption.getNumberOfThreads());
305+
if (threadsOptions.getNumberOfThreads() != null) {
306+
writeOptions.setNumberOfThreads(threadsOptions.getNumberOfThreads());
307307
}
308308

309309
if (outputFileOptions.getEncoding() != null) {

citydb-cli/src/main/java/org/citydb/cli/exporter/options/QueryOptions.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.citydb.cli.common.CountLimitOptions;
2525
import org.citydb.cli.common.FilterOptions;
2626
import org.citydb.cli.common.Option;
27-
import org.citydb.cli.common.TypeNameOption;
27+
import org.citydb.cli.common.TypeNameOptions;
2828
import org.citydb.query.Query;
2929
import org.citydb.query.filter.Filter;
3030
import org.citydb.query.filter.encoding.FilterParseException;
@@ -33,13 +33,13 @@
3333

3434
public class QueryOptions implements Option {
3535
@CommandLine.ArgGroup(exclusive = false)
36-
private TypeNameOption typeNameOption;
36+
private TypeNameOptions typeNameOptions;
3737

3838
@CommandLine.ArgGroup(exclusive = false)
3939
private FilterOptions filterOptions;
4040

4141
@CommandLine.ArgGroup(exclusive = false)
42-
private SortingOption sortingOption;
42+
private SortingOptions sortingOptions;
4343

4444
@CommandLine.ArgGroup(exclusive = false)
4545
private CountLimitOptions countLimitOptions;
@@ -52,8 +52,8 @@ public class QueryOptions implements Option {
5252

5353
public Query getQuery() throws FilterParseException {
5454
Query query = new Query();
55-
if (typeNameOption != null) {
56-
query.setFeatureTypes(typeNameOption.getTypeNames());
55+
if (typeNameOptions != null) {
56+
query.setFeatureTypes(typeNameOptions.getTypeNames());
5757
}
5858

5959
if (filterOptions != null) {
@@ -63,8 +63,8 @@ public Query getQuery() throws FilterParseException {
6363
query.setFilter(Filter.of(QueryHelper.terminationDateIsNull()));
6464
}
6565

66-
if (sortingOption != null) {
67-
query.setSorting(sortingOption.getSorting());
66+
if (sortingOptions != null) {
67+
query.setSorting(sortingOptions.getSorting());
6868
}
6969

7070
if (countLimitOptions != null) {

citydb-cli/src/main/java/org/citydb/cli/exporter/options/SortingOption.java renamed to citydb-cli/src/main/java/org/citydb/cli/exporter/options/SortingOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.citydb.query.sorting.Sorting;
2828
import picocli.CommandLine;
2929

30-
public class SortingOption implements Option {
30+
public class SortingOptions implements Option {
3131
@CommandLine.Option(names = {"-s", "--sort-by"}, split = ",", paramLabel = "<property[+|-]>", required = true,
3232
description = "Properties and sort orders for sorting features.")
3333
private String[] sortBy;

citydb-cli/src/main/java/org/citydb/cli/importer/ImportController.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ public abstract class ImportController implements Command {
6060
protected Path tempDirectory;
6161

6262
@CommandLine.Mixin
63-
protected ThreadsOption threadsOption;
63+
protected ThreadsOptions threadsOptions;
6464

6565
@CommandLine.Option(names = "--preview",
6666
description = "Run in preview mode. Features will not be imported.")
6767
protected boolean preview;
6868

6969
@CommandLine.Mixin
70-
protected IndexOption indexOption;
70+
protected IndexOptions indexOptions;
7171

7272
@CommandLine.Option(names = "--compute-extent",
7373
description = "Compute and overwrite extents of features.")
@@ -114,9 +114,9 @@ protected boolean doImport() throws ExecutionException {
114114
ImportOptions importOptions = getImportOptions();
115115

116116
ImportLogger importLogger = new ImportLogger(preview, databaseManager.getAdapter());
117-
IndexOption.Mode indexMode = indexOption.getMode();
117+
IndexOptions.Mode indexMode = indexOptions.getMode();
118118

119-
if (indexMode != IndexOption.Mode.keep) {
119+
if (indexMode != IndexOptions.Mode.keep) {
120120
logger.info("Dropping database indexes...");
121121
helper.dropIndexes(databaseManager.getAdapter());
122122
}
@@ -171,7 +171,7 @@ protected boolean doImport() throws ExecutionException {
171171
}
172172
}
173173

174-
if (shouldRun && indexMode == IndexOption.Mode.drop_create) {
174+
if (shouldRun && indexMode == IndexOptions.Mode.drop_create) {
175175
logger.info("Re-creating database indexes. This operation may take some time...");
176176
helper.createIndexes(databaseManager.getAdapter());
177177
}
@@ -219,8 +219,8 @@ protected ReadOptions getReadOptions() throws ExecutionException {
219219
readOptions.setTempDirectory(tempDirectory.toString());
220220
}
221221

222-
if (threadsOption.getNumberOfThreads() != null) {
223-
readOptions.setNumberOfThreads(threadsOption.getNumberOfThreads());
222+
if (threadsOptions.getNumberOfThreads() != null) {
223+
readOptions.setNumberOfThreads(threadsOptions.getNumberOfThreads());
224224
}
225225

226226
if (inputFileOptions.getEncoding() != null) {
@@ -246,8 +246,8 @@ protected ImportOptions getImportOptions() throws ExecutionException {
246246
importOptions.setTempDirectory(tempDirectory.toString());
247247
}
248248

249-
if (threadsOption.getNumberOfThreads() != null) {
250-
importOptions.setNumberOfThreads(threadsOption.getNumberOfThreads());
249+
if (threadsOptions.getNumberOfThreads() != null) {
250+
importOptions.setNumberOfThreads(threadsOptions.getNumberOfThreads());
251251
}
252252

253253
return importOptions;

0 commit comments

Comments
 (0)