Skip to content

Commit

Permalink
adb parameter name consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmoho committed Aug 15, 2024
1 parent 91d8652 commit dfafe97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/java/edu/ucsd/sbrg/ModelPolisherCLILauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void commandLineMode(AppConf appConf) {
BiGGDB.init(parameters.annotationParameters().biggAnnotationParameters().dbParameters());
}

if (parameters.annotationParameters().adbAnnotationParameters().addADBAnnotations()) {
if (parameters.annotationParameters().adbAnnotationParameters().annotateWithAdb()) {
AnnotateDB.init(parameters.annotationParameters().adbAnnotationParameters().dbParameters());
}

Expand Down Expand Up @@ -230,7 +230,7 @@ private void processFile(File input, File output) throws ModelReaderException, M
registry, annotationObservers).annotate(doc);
}

if (parameters.annotationParameters().adbAnnotationParameters().addADBAnnotations()) {
if (parameters.annotationParameters().adbAnnotationParameters().annotateWithAdb()) {
new ADBSBMLAnnotator(new AnnotateDB(), parameters.annotationParameters().adbAnnotationParameters()).annotate(doc);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

public class ADBAnnotationParameters {

@JsonProperty("add-adb-annotations")
protected boolean addADBAnnotations = ModelPolisherOptions.ADD_ADB_ANNOTATIONS.getDefaultValue();
@JsonProperty("annotate-with-adb")
protected boolean annotateWithAdb = ModelPolisherOptions.ADD_ADB_ANNOTATIONS.getDefaultValue();
@JsonProperty("db-config")
protected DBParameters dbParameters = new DBParameters(
AnnotateDBOptions.DBNAME.getDefaultValue(),
Expand All @@ -21,7 +21,7 @@ public ADBAnnotationParameters() {
}

public ADBAnnotationParameters(SBProperties args) {
addADBAnnotations = args.getBooleanProperty(ModelPolisherOptions.ADD_ADB_ANNOTATIONS);
annotateWithAdb = args.getBooleanProperty(ModelPolisherOptions.ADD_ADB_ANNOTATIONS);
dbParameters = new DBParameters(
args.getProperty(AnnotateDBOptions.DBNAME),
args.getProperty(AnnotateDBOptions.HOST),
Expand All @@ -30,8 +30,8 @@ public ADBAnnotationParameters(SBProperties args) {
args.getProperty(AnnotateDBOptions.USER));
}

public boolean addADBAnnotations() {
return addADBAnnotations;
public boolean annotateWithAdb() {
return annotateWithAdb;
}

public DBParameters dbParameters() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void defaults() throws IOException {
parameters.polishing().fluxObjectivesPolishingParameters().fluxCoefficients());

assertEquals(ModelPolisherOptions.ADD_ADB_ANNOTATIONS.getDefaultValue(),
parameters.annotation().adbAnnotationParameters().addADBAnnotations());
parameters.annotation().adbAnnotationParameters().annotateWithAdb());
assertEquals(AnnotateDBOptions.DBNAME.getDefaultValue(),
parameters.annotation().adbAnnotationParameters().dbParameters().dbName());
assertEquals(AnnotateDBOptions.HOST.getDefaultValue(),
Expand Down

0 comments on commit dfafe97

Please sign in to comment.