Skip to content

Commit

Permalink
Fix default data source type to "unspecified" to distinguish when dat…
Browse files Browse the repository at this point in the history
…abase subsetting is requested
  • Loading branch information
dmgaldi committed Jan 23, 2023
1 parent 8c951cd commit afc3013
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Project settings
group = "org.veupathdb.eda"
version = "3.8.0"
version = "3.8.1"

plugins {
`java-library`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

public enum DataSourceType {
FILES("file"),
DATABASE("database");
DATABASE("database"),
UNSPECIFIED(null);

private String value;

Expand All @@ -13,6 +14,9 @@ public enum DataSourceType {
}

public static DataSourceType fromValue(String s) {
if (s == null) {
return UNSPECIFIED;
}
return Arrays.stream(values())
.filter(enumInstance -> enumInstance.value.equals(s))
.findFirst()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class TabularReportConfig {
private Long _offset = 0L;
private TabularHeaderFormat _headerFormat = TabularHeaderFormat.STANDARD;
private boolean _trimTimeFromDateVars = false;
private DataSourceType _dataSourceType = DataSourceType.DATABASE;
private DataSourceType _dataSourceType = DataSourceType.UNSPECIFIED;

/**
* Whether this configuration contains paging or sorting (paging always requires sorting)
Expand Down

0 comments on commit afc3013

Please sign in to comment.