From 1c9b3287658aa77f1d590aec6bee5690a4aa8d40 Mon Sep 17 00:00:00 2001 From: timparsons Date: Fri, 27 Oct 2023 14:27:25 -0400 Subject: [PATCH 1/2] Updating deploy config to automatically release to central --- pom.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pom.xml b/pom.xml index 8099fa4..91b8dd5 100644 --- a/pom.xml +++ b/pom.xml @@ -141,6 +141,17 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + maven-compiler-plugin From a96ea1586b04b34f6b5be4acf80fffa0a674f306 Mon Sep 17 00:00:00 2001 From: mlm483 <128052931+mlm483@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:31:06 -0500 Subject: [PATCH 2/2] [BI-2019] - made additionalInfo JsonObject in BrAPIPedigreeNode --- .../v2/modules/germplasm/PedigreeAPITests.java | 6 ++++-- .../org/brapi/v2/model/germ/BrAPIPedigreeNode.java | 13 +++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/germplasm/PedigreeAPITests.java b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/germplasm/PedigreeAPITests.java index 28696d1..a292ea0 100644 --- a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/germplasm/PedigreeAPITests.java +++ b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/germplasm/PedigreeAPITests.java @@ -17,6 +17,8 @@ package org.brapi.client.v2.modules.germplasm; +import com.google.gson.JsonObject; + import org.apache.commons.lang3.tuple.Pair; import org.brapi.client.v2.ApiResponse; import org.brapi.client.v2.BrAPIClientTest; @@ -109,8 +111,8 @@ public void searchPedigreeGetResponse() throws Exception { @Test public void createPedigreeSuccess() throws Exception { - Map additionalInfo = new HashMap(); - additionalInfo.put("test_key", "test_value"); + JsonObject additionalInfo = new JsonObject(); + additionalInfo.addProperty("test_key", "test_value"); List externalReferences = new ArrayList<>(); externalReferences.add(new BrAPIExternalReference() .referenceID(UUID.randomUUID().toString()) diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIPedigreeNode.java b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIPedigreeNode.java index e6eb46a..f07f809 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIPedigreeNode.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIPedigreeNode.java @@ -18,6 +18,7 @@ import java.util.Map; import java.util.Objects; +import com.google.gson.JsonObject; import org.brapi.v2.model.BrAPIExternalReference; import com.fasterxml.jackson.annotation.JsonProperty; @@ -28,7 +29,7 @@ public class BrAPIPedigreeNode { @JsonProperty("additionalInfo") - private Map additionalInfo = null; + private JsonObject additionalInfo = null; @JsonProperty("breedingMethodDbId") private String breedingMethodDbId = null; @@ -76,16 +77,16 @@ public class BrAPIPedigreeNode { @JsonProperty("siblings") private List siblings = null; - public BrAPIPedigreeNode additionalInfo(Map additionalInfo) { + public BrAPIPedigreeNode additionalInfo(JsonObject additionalInfo) { this.additionalInfo = additionalInfo; return this; } public BrAPIPedigreeNode putAdditionalInfoItem(String key, String additionalInfoItem) { if (this.additionalInfo == null) { - this.additionalInfo = new HashMap(); + this.additionalInfo = new JsonObject(); } - this.additionalInfo.put(key, additionalInfoItem); + this.additionalInfo.addProperty(key, additionalInfoItem); return this; } @@ -94,11 +95,11 @@ public BrAPIPedigreeNode putAdditionalInfoItem(String key, String additionalInfo * * @return additionalInfo **/ - public Map getAdditionalInfo() { + public JsonObject getAdditionalInfo() { return additionalInfo; } - public void setAdditionalInfo(Map additionalInfo) { + public void setAdditionalInfo(JsonObject additionalInfo) { this.additionalInfo = additionalInfo; }