diff --git a/src/main/java/edu/ucsd/sbrg/parameters/ADBAnnotationParameters.java b/src/main/java/edu/ucsd/sbrg/parameters/ADBAnnotationParameters.java index 15f0660..c3a2bb2 100644 --- a/src/main/java/edu/ucsd/sbrg/parameters/ADBAnnotationParameters.java +++ b/src/main/java/edu/ucsd/sbrg/parameters/ADBAnnotationParameters.java @@ -4,6 +4,8 @@ import de.zbit.util.prefs.SBProperties; import edu.ucsd.sbrg.db.adb.AnnotateDBOptions; +import java.util.Objects; + public class ADBAnnotationParameters { @JsonProperty("annotate-with-adb") @@ -37,4 +39,25 @@ public boolean annotateWithAdb() { public DBParameters dbParameters() { return dbParameters; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ADBAnnotationParameters that = (ADBAnnotationParameters) o; + return annotateWithAdb == that.annotateWithAdb && Objects.equals(dbParameters, that.dbParameters); + } + + @Override + public int hashCode() { + return Objects.hash(annotateWithAdb, dbParameters); + } + + @Override + public String toString() { + return "ADBAnnotationParameters{" + + "annotateWithAdb=" + annotateWithAdb + + ", dbParameters=" + dbParameters + + '}'; + } } diff --git a/src/main/java/edu/ucsd/sbrg/parameters/AnnotationParameters.java b/src/main/java/edu/ucsd/sbrg/parameters/AnnotationParameters.java index 5a61c22..79aa1f2 100644 --- a/src/main/java/edu/ucsd/sbrg/parameters/AnnotationParameters.java +++ b/src/main/java/edu/ucsd/sbrg/parameters/AnnotationParameters.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import de.zbit.util.prefs.SBProperties; +import java.util.Objects; + public class AnnotationParameters { @JsonProperty("annotatedb") @@ -25,4 +27,26 @@ public ADBAnnotationParameters adbAnnotationParameters() { public BiGGAnnotationParameters biggAnnotationParameters() { return biGGAnnotationParameters; } + + @Override + public String toString() { + return "AnnotationParameters{" + + "adbAnnotationParameters=" + adbAnnotationParameters + + ", biGGAnnotationParameters=" + biGGAnnotationParameters + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnnotationParameters that = (AnnotationParameters) o; + return Objects.equals(adbAnnotationParameters, that.adbAnnotationParameters) && Objects.equals(biGGAnnotationParameters, that.biGGAnnotationParameters); + } + + @Override + public int hashCode() { + return Objects.hash(adbAnnotationParameters, biGGAnnotationParameters); + } + } diff --git a/src/main/java/edu/ucsd/sbrg/parameters/BiGGAnnotationParameters.java b/src/main/java/edu/ucsd/sbrg/parameters/BiGGAnnotationParameters.java index 924c775..3a3c0c5 100644 --- a/src/main/java/edu/ucsd/sbrg/parameters/BiGGAnnotationParameters.java +++ b/src/main/java/edu/ucsd/sbrg/parameters/BiGGAnnotationParameters.java @@ -4,6 +4,8 @@ import de.zbit.util.prefs.SBProperties; import edu.ucsd.sbrg.db.bigg.BiGGDBOptions; +import java.util.Objects; + public class BiGGAnnotationParameters { @JsonProperty("annotate-with-bigg") @@ -64,4 +66,29 @@ public BiGGNotesParameters notesParameters() { public DBParameters dbParameters() { return dbParameters; } + + @Override + public String toString() { + return "BiGGAnnotationParameters{" + + "annotateWithBiGG=" + annotateWithBiGG + + ", includeAnyURI=" + includeAnyURI + + ", documentTitlePattern='" + documentTitlePattern + '\'' + + ", notesParameters=" + notesParameters + + ", dbParameters=" + dbParameters + + '}'; + } + + @Override + public boolean equals(Object o) { + + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BiGGAnnotationParameters that = (BiGGAnnotationParameters) o; + return annotateWithBiGG == that.annotateWithBiGG && includeAnyURI == that.includeAnyURI && Objects.equals(documentTitlePattern, that.documentTitlePattern) && Objects.equals(notesParameters, that.notesParameters) && Objects.equals(dbParameters, that.dbParameters); + } + + @Override + public int hashCode() { + return Objects.hash(annotateWithBiGG, includeAnyURI, documentTitlePattern, notesParameters, dbParameters); + } } diff --git a/src/main/java/edu/ucsd/sbrg/parameters/DBParameters.java b/src/main/java/edu/ucsd/sbrg/parameters/DBParameters.java index dbe539d..24a6db0 100644 --- a/src/main/java/edu/ucsd/sbrg/parameters/DBParameters.java +++ b/src/main/java/edu/ucsd/sbrg/parameters/DBParameters.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import edu.ucsd.sbrg.db.bigg.BiGGDBOptions; +import java.util.Objects; + public class DBParameters { @@ -47,4 +49,29 @@ public Integer port() { public String user() { return user; } + + @Override + public String toString() { + return "DBParameters{" + + "dbName='" + dbName + '\'' + + ", host='" + host + '\'' + + ", passwd='" + passwd + '\'' + + ", port=" + port + + ", user='" + user + '\'' + + '}'; + } + + @Override + public boolean equals(Object o) { + + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DBParameters that = (DBParameters) o; + return Objects.equals(dbName, that.dbName) && Objects.equals(host, that.host) && Objects.equals(passwd, that.passwd) && Objects.equals(port, that.port) && Objects.equals(user, that.user); + } + + @Override + public int hashCode() { + return Objects.hash(dbName, host, passwd, port, user); + } } diff --git a/src/main/java/edu/ucsd/sbrg/parameters/Parameters.java b/src/main/java/edu/ucsd/sbrg/parameters/Parameters.java index 3efddae..61a1d70 100644 --- a/src/main/java/edu/ucsd/sbrg/parameters/Parameters.java +++ b/src/main/java/edu/ucsd/sbrg/parameters/Parameters.java @@ -2,6 +2,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + public class Parameters { @JsonProperty("polishing") @@ -36,4 +38,28 @@ public boolean sbmlValidation() { public ModelPolisherOptions.OutputType outputType() { return outputType; } + + @Override + public String toString() { + return "Parameters{" + + "polishing=" + polishing + + ", annotation=" + annotation + + ", sboTerms=" + sboTerms + + ", sbmlValidation=" + sbmlValidation + + ", outputType=" + outputType + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Parameters that = (Parameters) o; + return sbmlValidation == that.sbmlValidation && Objects.equals(polishing, that.polishing) && Objects.equals(annotation, that.annotation) && Objects.equals(sboTerms, that.sboTerms) && outputType == that.outputType; + } + + @Override + public int hashCode() { + return Objects.hash(polishing, annotation, sboTerms, sbmlValidation, outputType); + } } diff --git a/src/main/java/edu/ucsd/sbrg/parameters/PolishingParameters.java b/src/main/java/edu/ucsd/sbrg/parameters/PolishingParameters.java index 859aec1..1cba746 100644 --- a/src/main/java/edu/ucsd/sbrg/parameters/PolishingParameters.java +++ b/src/main/java/edu/ucsd/sbrg/parameters/PolishingParameters.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import de.zbit.util.prefs.SBProperties; +import java.util.Objects; + public class PolishingParameters { @JsonProperty("reactions") @@ -30,4 +32,25 @@ public ReactionPolishingParameters reactionPolishingParameters() { public FluxObjectivesPolishingParameters fluxObjectivesPolishingParameters() { return fluxObjectivesPolishingParameters; } + + @Override + public String toString() { + return "PolishingParameters{" + + "reactionPolishingParameters=" + reactionPolishingParameters + + ", fluxObjectivesPolishingParameters=" + fluxObjectivesPolishingParameters + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PolishingParameters that = (PolishingParameters) o; + return Objects.equals(reactionPolishingParameters, that.reactionPolishingParameters) && Objects.equals(fluxObjectivesPolishingParameters, that.fluxObjectivesPolishingParameters); + } + + @Override + public int hashCode() { + return Objects.hash(reactionPolishingParameters, fluxObjectivesPolishingParameters); + } } diff --git a/src/main/java/edu/ucsd/sbrg/parameters/ReactionPolishingParameters.java b/src/main/java/edu/ucsd/sbrg/parameters/ReactionPolishingParameters.java index 37a7237..f578a1e 100644 --- a/src/main/java/edu/ucsd/sbrg/parameters/ReactionPolishingParameters.java +++ b/src/main/java/edu/ucsd/sbrg/parameters/ReactionPolishingParameters.java @@ -4,6 +4,7 @@ import de.zbit.util.prefs.SBProperties; import java.util.Map; +import java.util.Objects; public class ReactionPolishingParameters { @@ -28,6 +29,23 @@ public boolean checkMassBalance() { return checkMassBalance; } + @Override + public String toString() { + return "ReactionPolishingParameters{" + + "checkMassBalance=" + checkMassBalance + + '}'; + } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReactionPolishingParameters that = (ReactionPolishingParameters) o; + return checkMassBalance == that.checkMassBalance; + } + @Override + public int hashCode() { + return Objects.hashCode(checkMassBalance); + } } diff --git a/src/main/java/edu/ucsd/sbrg/parameters/SBOParameters.java b/src/main/java/edu/ucsd/sbrg/parameters/SBOParameters.java index 418e23e..ff2b808 100644 --- a/src/main/java/edu/ucsd/sbrg/parameters/SBOParameters.java +++ b/src/main/java/edu/ucsd/sbrg/parameters/SBOParameters.java @@ -3,20 +3,41 @@ import com.fasterxml.jackson.annotation.JsonProperty; import de.zbit.util.prefs.SBProperties; +import java.util.Objects; + public class SBOParameters { @JsonProperty("omit-generic-terms") - protected boolean omitGenericTerms = ModelPolisherOptions.ADD_GENERIC_TERMS.getDefaultValue(); + protected boolean addGenericTerms = ModelPolisherOptions.ADD_GENERIC_TERMS.getDefaultValue(); public SBOParameters() { } public SBOParameters(SBProperties args) { - omitGenericTerms = args.getBooleanProperty(ModelPolisherOptions.ADD_GENERIC_TERMS); + addGenericTerms = args.getBooleanProperty(ModelPolisherOptions.ADD_GENERIC_TERMS); } public boolean addGenericTerms() { - return omitGenericTerms; + return addGenericTerms; + } + + @Override + public String toString() { + return "SBOParameters{" + + "addGenericTerms=" + addGenericTerms + + '}'; } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SBOParameters that = (SBOParameters) o; + return addGenericTerms == that.addGenericTerms; + } + + @Override + public int hashCode() { + return Objects.hashCode(addGenericTerms); + } }