diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/ListQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/ListQueryParams.java index dea7d8b5..84fa90ba 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/ListQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/ListQueryParams.java @@ -38,6 +38,31 @@ public class ListQueryParams extends BrAPIQueryParams { private String listName; private String listDbId; private String listSource; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/LocationQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/LocationQueryParams.java index 60b67c49..6985e934 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/LocationQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/LocationQueryParams.java @@ -34,7 +34,32 @@ public class LocationQueryParams extends BrAPIQueryParams { private String locationType; private String locationDbId; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/PeopleQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/PeopleQueryParams.java index edea802a..769996a1 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/PeopleQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/PeopleQueryParams.java @@ -36,7 +36,32 @@ public class PeopleQueryParams extends BrAPIQueryParams { private String lastName; private String personDbId; private String userID; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/ProgramQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/ProgramQueryParams.java index bdcba65d..004915ef 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/ProgramQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/ProgramQueryParams.java @@ -36,6 +36,31 @@ public class ProgramQueryParams extends BrAPIQueryParams { private String programDbId; private String programName; private String abbreviation; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/StudyQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/StudyQueryParams.java index 2fd8d2e7..be654f4a 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/StudyQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/StudyQueryParams.java @@ -47,6 +47,31 @@ public class StudyQueryParams extends BrAPIQueryParams { private String active; private String sortBy; private String sortOrder; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/TrialQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/TrialQueryParams.java index 10a98743..745d9896 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/TrialQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/core/TrialQueryParams.java @@ -45,6 +45,31 @@ public class TrialQueryParams extends BrAPIQueryParams { private String trialPUI; private String sortBy; private String sortOrder; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/CrossQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/CrossQueryParams.java index 1c71c816..b87ab8e3 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/CrossQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/CrossQueryParams.java @@ -36,6 +36,31 @@ public class CrossQueryParams extends BrAPIQueryParams { private String crossingProjectDbId; private String crossDbId; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/CrossingProjectQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/CrossingProjectQueryParams.java index 0598000f..85f8e761 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/CrossingProjectQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/CrossingProjectQueryParams.java @@ -35,6 +35,31 @@ public class CrossingProjectQueryParams extends BrAPIQueryParams { private String crossingProjectDbId; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmAttributeQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmAttributeQueryParams.java index ba7e02f1..b9985891 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmAttributeQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmAttributeQueryParams.java @@ -38,8 +38,47 @@ public class GermplasmAttributeQueryParams extends BrAPIQueryParams { private String attributeCategory; private String attributeDbId; private String attributeName; + private String attributePUI; + private String commonCropName; + private String externalReferenceSource; private String germplasmDbId; + private String methodDbId; + private String methodName; + private String methodPUI; + private String programDbId; + private String scaleDbId; + private String scaleName; + private String scalePUI; + private String traitDbId; + private String traitName; + private String traitPUI; + + + private String externalReferenceId; + @Deprecated private String externalReferenceID; - private String externalReferenceSource; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmAttributeValueQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmAttributeValueQueryParams.java index bdb17d96..e28d0b7c 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmAttributeValueQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmAttributeValueQueryParams.java @@ -39,7 +39,32 @@ public class GermplasmAttributeValueQueryParams extends BrAPIQueryParams { private String attributeDbId; private String attributeName; private String germplasmDbId; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmQueryParams.java index e9750376..205b0e02 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/GermplasmQueryParams.java @@ -26,28 +26,59 @@ import org.brapi.client.v2.model.queryParams.core.BrAPIQueryParams; - @Getter @Setter @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@Accessors(fluent=true) +@Accessors(fluent = true) public class GermplasmQueryParams extends BrAPIQueryParams { - private String germplasmPUI; - private String germplasmDbId; - private String germplasmName; - private String commonCropName; - private String accessionNumber; - private String collection; - private String genus; - private String species; - private String studyDbId; - private String synonym; - private String parentDbId; - private String progenyDbId; - private String externalReferenceID; - private String externalReferenceSource; + private String germplasmPUI; + private String germplasmDbId; + private String germplasmName; + private String commonCropName; + private String accessionNumber; + private String collection; + private String genus; + private String species; + private String binomialName; + private String programDbId; + private String trialDbId; + private String studyDbId; + private String synonym; + private String parentDbId; + private String progenyDbId; + private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + + public String externalReferenceId() { + return externalReferenceId; + } + + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/PlannedCrossQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/PlannedCrossQueryParams.java index e5844a24..dafc9351 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/PlannedCrossQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/PlannedCrossQueryParams.java @@ -36,6 +36,31 @@ public class PlannedCrossQueryParams extends BrAPIQueryParams { private String crossingProjectDbId; private String plannedCrossDbId; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/SeedLotQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/SeedLotQueryParams.java index d5036e75..4a238613 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/SeedLotQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/SeedLotQueryParams.java @@ -37,7 +37,32 @@ public class SeedLotQueryParams extends BrAPIQueryParams { private String seedLotDbId; private String germplasmDbId; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/SeedLotTransactionQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/SeedLotTransactionQueryParams.java index 0476c67c..5f95e830 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/SeedLotTransactionQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/germplasm/SeedLotTransactionQueryParams.java @@ -38,7 +38,32 @@ public class SeedLotTransactionQueryParams extends BrAPIQueryParams { private String transactionDbId; private String seedLotDbId; private String germplasmDbId; - private String externalReferenceID; private String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ImageQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ImageQueryParams.java index c7e9f608..7d23a559 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ImageQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ImageQueryParams.java @@ -39,7 +39,32 @@ public class ImageQueryParams extends BrAPIQueryParams { protected String observationUnitDbId; protected String observationDbId; protected String descriptiveOntologyTerm; - protected String externalReferenceID; protected String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/MethodQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/MethodQueryParams.java index ee96296d..fc2f50b8 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/MethodQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/MethodQueryParams.java @@ -31,12 +31,44 @@ @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@Accessors(fluent=true) +@Accessors(fluent = true) public class MethodQueryParams extends BrAPIQueryParams { - private String methodDbId; - private String observationVariableDbId; - private String externalReferenceID; - private String externalReferenceSource; + private String commonCropName; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + private String externalReferenceSource; + private String methodDbId; + private String observationVariableDbId; + private String ontologyDbId; + private String programDbId; + + public String getExternalReferenceId() { + return externalReferenceId; + } + + public String externalReferenceId() { + return externalReferenceId; + } + + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ObservationQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ObservationQueryParams.java index 887e181a..bfae4d60 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ObservationQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ObservationQueryParams.java @@ -48,7 +48,32 @@ public class ObservationQueryParams extends BrAPIQueryParams { protected String observationUnitLevelCode; protected String observationTimeStampRangeStart; protected String observationTimeStampRangeEnd; - protected String externalReferenceID; protected String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ObservationUnitQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ObservationUnitQueryParams.java index ec55323c..9cb3fc82 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ObservationUnitQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ObservationUnitQueryParams.java @@ -45,7 +45,32 @@ public class ObservationUnitQueryParams extends BrAPIQueryParams { protected String observationUnitLevelOrder; protected String observationUnitLevelCode; protected Boolean includeObservations; - protected String externalReferenceID; protected String externalReferenceSource; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + + public String getExternalReferenceId() { + return externalReferenceId; + } + public String externalReferenceId() { + return externalReferenceId; + } + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ScaleQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ScaleQueryParams.java index 871d5d84..d3bc2eb8 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ScaleQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/ScaleQueryParams.java @@ -31,12 +31,44 @@ @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@Accessors(fluent=true) +@Accessors(fluent = true) public class ScaleQueryParams extends BrAPIQueryParams { + private String commonCropName; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + private String externalReferenceSource; + private String observationVariableDbId; + private String ontologyDbId; + private String programDbId; private String scaleDbId; - private String observationVariableDbId; - private String externalReferenceID; - private String externalReferenceSource; + + public String getExternalReferenceId() { + return externalReferenceId; + } + + public String externalReferenceId() { + return externalReferenceId; + } + + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/TraitQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/TraitQueryParams.java index 547ca177..7488546b 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/TraitQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/TraitQueryParams.java @@ -31,12 +31,44 @@ @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@Accessors(fluent=true) +@Accessors(fluent = true) public class TraitQueryParams extends BrAPIQueryParams { - private String traitDbId; - private String observationVariableDbId; - private String externalReferenceID; - private String externalReferenceSource; + private String commonCropName; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + private String externalReferenceSource; + private String observationVariableDbId; + private String ontologyDbId; + private String programDbId; + private String traitDbId; + + public String getExternalReferenceId() { + return externalReferenceId; + } + + public String externalReferenceId() { + return externalReferenceId; + } + + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/VariableQueryParams.java b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/VariableQueryParams.java index 283f8cf2..f85cf0d5 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/VariableQueryParams.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/model/queryParams/phenotype/VariableQueryParams.java @@ -31,13 +31,57 @@ @SuperBuilder @NoArgsConstructor @AllArgsConstructor -@Accessors(fluent=true) +@Accessors(fluent = true) public class VariableQueryParams extends BrAPIQueryParams { + private String commonCropName; + private String externalReferenceId; + @Deprecated + private String externalReferenceID; + private String externalReferenceSource; + private String methodDbId; + private String methodName; + private String methodPUI; + private String observationVariableDbId; + private String observationVariableName; + private String observationVariablePUI; + private String ontologyDbId; + private String programDbId; + private String scaleDbId; + private String scaleName; + private String scalePUI; + private String studyDbId; private String traitClass; - private String studyDbId; - private String observationVariableDbId; - private String externalReferenceID; - private String externalReferenceSource; + private String traitDbId; + private String traitName; + private String traitPUI; + private String trialDbId; + + public String getExternalReferenceId() { + return externalReferenceId; + } + + public String externalReferenceId() { + return externalReferenceId; + } + + public void setExternalReferenceId(String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + @Deprecated + public String getExternalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public String externalReferenceID() { + return externalReferenceID; + } + + @Deprecated + public void setExternalReferenceID(String externalReferenceID) { + this.externalReferenceID = externalReferenceID; + } } diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ListsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ListsApi.java index 933548ff..d44434b6 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ListsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ListsApi.java @@ -80,10 +80,10 @@ private Call listsGetCall(ListQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "listDbId", queryParams.listDbId()); if (queryParams.listSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "listSource", queryParams.listSource()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/LocationsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/LocationsApi.java index b486036d..a8ca6587 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/LocationsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/LocationsApi.java @@ -75,10 +75,10 @@ private Call locationsGetCall(LocationQueryParams queryParams) throws ApiExcepti apiClient.prepQueryParameter(localVarQueryParams, "locationType", queryParams.locationType()); if (queryParams.locationDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "locationDbId", queryParams.locationDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/PeopleApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/PeopleApi.java index d2204aba..9c24decd 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/PeopleApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/PeopleApi.java @@ -79,10 +79,10 @@ private Call peopleGetCall(PeopleQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "personDbId", queryParams.personDbId()); if (queryParams.userID() != null) apiClient.prepQueryParameter(localVarQueryParams, "userID", queryParams.userID()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ProgramsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ProgramsApi.java index 68397e8e..ef003ac3 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ProgramsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ProgramsApi.java @@ -79,10 +79,10 @@ private Call programsGetCall(ProgramQueryParams queryParams) throws ApiException apiClient.prepQueryParameter(localVarQueryParams, "programName", queryParams.programName()); if (queryParams.abbreviation() != null) apiClient.prepQueryParameter(localVarQueryParams, "abbreviation", queryParams.abbreviation()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/StudiesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/StudiesApi.java index 9a3dcaac..e18801a0 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/StudiesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/StudiesApi.java @@ -257,10 +257,10 @@ private Call studiesGetCall(StudyQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "sortBy", queryParams.sortBy()); if (queryParams.sortOrder() != null) apiClient.prepQueryParameter(localVarQueryParams, "sortOrder", queryParams.sortOrder()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/TrialsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/TrialsApi.java index 2c9f6b5c..b1ce75ae 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/TrialsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/TrialsApi.java @@ -252,10 +252,10 @@ private Call trialsGetCall(TrialQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "sortBy", queryParams.sortBy()); if (queryParams.sortOrder() != null) apiClient.prepQueryParameter(localVarQueryParams, "sortOrder", queryParams.sortOrder()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/genotype/PlatesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/genotype/PlatesApi.java index 17382bb4..addb9dda 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/genotype/PlatesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/genotype/PlatesApi.java @@ -93,10 +93,10 @@ private Call platesGetCall(PlatesQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "studyDbId", queryParams.studyDbId()); if (queryParams.germplasmDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "germplasmDbId", queryParams.germplasmDbId()); - if (queryParams.externalReferenceId() != null) { + if (queryParams.externalReferenceID() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); + if (queryParams.externalReferenceId() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceId()); - } if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.expandHomozygotes() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/genotype/SamplesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/genotype/SamplesApi.java index dbb8e9a4..89784609 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/genotype/SamplesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/genotype/SamplesApi.java @@ -78,10 +78,10 @@ private Call samplesGetCall(SampleQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "germplasmDbId", queryParams.germplasmDbId()); if (queryParams.studyDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "studyDbId", queryParams.studyDbId()); - if (queryParams.externalReferenceId() != null) { + if (queryParams.externalReferenceID() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); + if (queryParams.externalReferenceId() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceId()); - } if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/CrossesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/CrossesApi.java index 3d331e56..38c2c682 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/CrossesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/CrossesApi.java @@ -72,10 +72,10 @@ private Call crossesGetCall(CrossQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "crossingProjectDbId", queryParams.crossingProjectDbId()); if (queryParams.crossDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "crossDbId", queryParams.crossDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) @@ -297,10 +297,10 @@ private Call plannedcrossesGetCall(PlannedCrossQueryParams queryParams) throws A apiClient.prepQueryParameter(localVarQueryParams, "crossingProjectDbId", queryParams.crossingProjectDbId()); if (queryParams.plannedCrossDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "plannedCrossDbId", queryParams.plannedCrossDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/CrossingProjectsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/CrossingProjectsApi.java index b9e0a169..56aa3ad5 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/CrossingProjectsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/CrossingProjectsApi.java @@ -221,10 +221,10 @@ private Call crossingprojectsGetCall(CrossingProjectQueryParams queryParams) thr Map localVarCollectionQueryParams = new HashMap<>(); if (queryParams.crossingProjectDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "crossingProjectDbId", queryParams.crossingProjectDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmApi.java index 581fbabe..569c7b3e 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmApi.java @@ -631,10 +631,10 @@ private Call germplasmGetCall(GermplasmQueryParams queryParams) throws ApiExcept apiClient.prepQueryParameter(localVarQueryParams, "parentDbId", queryParams.parentDbId()); if (queryParams.progenyDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "progenyDbId", queryParams.progenyDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributeValuesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributeValuesApi.java index e2c159d4..8df21b39 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributeValuesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributeValuesApi.java @@ -232,10 +232,10 @@ private Call attributevaluesGetCall(GermplasmAttributeValueQueryParams queryPara apiClient.prepQueryParameter(localVarQueryParams, "attributeName", queryParams.attributeName()); if (queryParams.germplasmDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "germplasmDbId", queryParams.germplasmDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributesApi.java index 5d9cd19f..6572bc61 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributesApi.java @@ -35,7 +35,6 @@ import com.google.gson.reflect.TypeToken; import okhttp3.Call; -import org.brapi.v2.model.pheno.response.BrAPIObservationUnitListResponse; public class GermplasmAttributesApi { private BrAPIClient apiClient; @@ -309,10 +308,10 @@ private Call attributesGetCall(GermplasmAttributeQueryParams queryParams) throws apiClient.prepQueryParameter(localVarQueryParams, "attributeName", queryParams.attributeName()); if (queryParams.germplasmDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "germplasmDbId", queryParams.germplasmDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/SeedLotsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/SeedLotsApi.java index d75efb14..4088f8b3 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/SeedLotsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/germplasm/SeedLotsApi.java @@ -74,10 +74,10 @@ private Call seedlotsGetCall(SeedLotQueryParams queryParams) throws ApiException apiClient.prepQueryParameter(localVarQueryParams, "seedLotDbId", queryParams.seedLotDbId()); if (queryParams.germplasmDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "germplasmDbId", queryParams.germplasmDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) @@ -474,10 +474,10 @@ private Call seedlotsTransactionsGetCall(SeedLotTransactionQueryParams queryPara apiClient.prepQueryParameter(localVarQueryParams, "seedLotDbId", queryParams.seedLotDbId()); if (queryParams.germplasmDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "germplasmDbId", queryParams.germplasmDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ImagesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ImagesApi.java index db0b8826..33682324 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ImagesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ImagesApi.java @@ -82,10 +82,10 @@ private Call imagesGetCall(ImageQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "observationDbId", queryParams.observationDbId()); if (queryParams.descriptiveOntologyTerm() != null) apiClient.prepQueryParameter(localVarQueryParams, "descriptiveOntologyTerm", queryParams.descriptiveOntologyTerm()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/MethodsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/MethodsApi.java index d26b620d..8c10ff42 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/MethodsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/MethodsApi.java @@ -70,10 +70,10 @@ private Call methodsGetCall(MethodQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "methodDbId", queryParams.methodDbId()); if (queryParams.observationVariableDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "observationVariableDbId", queryParams.observationVariableDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationUnitsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationUnitsApi.java index 4b971cbd..e50573b9 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationUnitsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationUnitsApi.java @@ -188,10 +188,10 @@ private Call observationunitsGetCall(ObservationUnitQueryParams queryParams) thr apiClient.prepQueryParameter(localVarQueryParams, "observationUnitLevelCode", queryParams.observationUnitLevelCode()); if (queryParams.includeObservations() != null) apiClient.prepQueryParameter(localVarQueryParams, "includeObservations", queryParams.includeObservations()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationVariablesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationVariablesApi.java index be5c5a1d..10a035e9 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationVariablesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationVariablesApi.java @@ -234,10 +234,10 @@ private Call variablesGetCall(VariableQueryParams queryParams) throws ApiExcepti apiClient.prepQueryParameter(localVarQueryParams, "traitClass", queryParams.traitClass()); if (queryParams.studyDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "studyDbId", queryParams.studyDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationsApi.java index e0331f0c..5f770dc9 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ObservationsApi.java @@ -102,10 +102,10 @@ private Call observationsGetCall(ObservationQueryParams queryParams) throws ApiE apiClient.prepQueryParameter(localVarQueryParams, "observationTimeStampRangeStart", queryParams.observationTimeStampRangeStart()); if (queryParams.observationTimeStampRangeEnd() != null) apiClient.prepQueryParameter(localVarQueryParams, "observationTimeStampRangeEnd", queryParams.observationTimeStampRangeEnd()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ScalesApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ScalesApi.java index 480cc941..377b2e01 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ScalesApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/ScalesApi.java @@ -71,10 +71,10 @@ private Call scalesGetCall(ScaleQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "scaleDbId", queryParams.scaleDbId()); if (queryParams.observationVariableDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "observationVariableDbId", queryParams.observationVariableDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/TraitsApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/TraitsApi.java index b30d3838..de4ca1a5 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/TraitsApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/phenotype/TraitsApi.java @@ -71,10 +71,10 @@ private Call traitsGetCall(TraitQueryParams queryParams) throws ApiException { apiClient.prepQueryParameter(localVarQueryParams, "traitDbId", queryParams.traitDbId()); if (queryParams.observationVariableDbId() != null) apiClient.prepQueryParameter(localVarQueryParams, "observationVariableDbId", queryParams.observationVariableDbId()); - if (queryParams.externalReferenceID() != null) { - apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceID()); + if (queryParams.externalReferenceID() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceID", queryParams.externalReferenceID()); - } + if (queryParams.externalReferenceId() != null) + apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceId", queryParams.externalReferenceId()); if (queryParams.externalReferenceSource() != null) apiClient.prepQueryParameter(localVarQueryParams, "externalReferenceSource", queryParams.externalReferenceSource()); if (queryParams.page() != null) diff --git a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributesApiTest.java b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributesApiTest.java index 26e54278..e41aed95 100644 --- a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributesApiTest.java +++ b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/germplasm/GermplasmAttributesApiTest.java @@ -14,6 +14,7 @@ import org.apache.commons.lang3.tuple.Pair; import org.brapi.client.v2.ApiResponse; +import org.brapi.client.v2.BrAPIClientTest; import org.brapi.client.v2.model.exceptions.ApiException; import org.brapi.client.v2.model.queryParams.germplasm.GermplasmAttributeQueryParams; import org.brapi.v2.model.BrAPIAcceptedSearchResponse; @@ -24,152 +25,176 @@ import org.brapi.v2.model.germ.response.BrAPIGermplasmAttributeSingleResponse; import org.brapi.v2.model.pheno.response.BrAPIObservationUnitListResponse; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import java.util.Arrays; import java.util.List; import java.util.Optional; /** * API tests for GermplasmAttributesApi */ -public class GermplasmAttributesApiTest { - - private final GermplasmAttributesApi api = new GermplasmAttributesApi(); - - /** - * Get the details for a specific Germplasm Attribute - * - * Get the details for a specific Germplasm Attribute - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void attributesAttributeDbIdGetTest() throws ApiException { - String attributeDbId = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse response = api.attributesAttributeDbIdGet(attributeDbId); - }); - - // TODO: test validations - } - /** - * Update an existing Germplasm Attribute - * - * Update an existing Germplasm Attribute - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void attributesAttributeDbIdPutTest() throws ApiException { - String attributeDbId = null; - BrAPIGermplasmAttribute body = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse response = api.attributesAttributeDbIdPut(attributeDbId, body); - }); - - // TODO: test validations - } - /** - * Get the Categories of Germplasm Attributes - * - * List all available attribute categories. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void attributesCategoriesGetTest() throws ApiException { - Integer page = null; - Integer pageSize = null; - - ApiResponse response = api.attributesCategoriesGet(page, pageSize); - - // TODO: test validations - } - /** - * Get the Germplasm Attributes - * - * List available attributes. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void attributesGetTest() throws ApiException { - String attributeCategory = null; - String attributeDbId = null; - String attributeName = null; - String germplasmDbId = null; - String externalReferenceID = null; - String externalReferenceSource = null; - Integer page = null; - Integer pageSize = null; - - GermplasmAttributeQueryParams queryParams = new GermplasmAttributeQueryParams(); - ApiResponse response = api.attributesGet(queryParams); - - // TODO: test validations - } - /** - * Create new Germplasm Attributes - * - * Create new Germplasm Attributes - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void attributesPostTest() throws ApiException { - List body = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse response = api.attributesPost(body); - }); - - // TODO: test validations - } - /** - * Submit a search request for Germplasm Attributes - * - * Search for a set of Germplasm Attributes based on some criteria See Search Services for additional implementation details. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void searchAttributesPostTest() throws ApiException { - BrAPIGermplasmAttributeSearchRequest body = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse, Optional>> response = api.searchAttributesPost(body); - }); - - // TODO: test validations - } - /** - * Get the results of a Germplasm Attributes search request - * - * Get the results of a Germplasm Attributes search request See Search Services for additional implementation details. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void searchAttributesSearchResultsDbIdGetTest() throws ApiException { - String searchResultsDbId = null; - Integer page = null; - Integer pageSize = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse, Optional>> response = - api.searchAttributesSearchResultsDbIdGet(searchResultsDbId, page, pageSize); - }); - - // TODO: test validations - } +@TestInstance(TestInstance.Lifecycle.PER_CLASS) +public class GermplasmAttributesApiTest extends BrAPIClientTest { + + private final GermplasmAttributesApi api = new GermplasmAttributesApi(this.apiClient); + + /** + * Get the details for a specific Germplasm Attribute + * + * Get the details for a specific Germplasm Attribute + * + * @throws ApiException if the Api call fails + */ + @Test + public void attributesAttributeDbIdGetTest() throws ApiException { + String attributeDbId = "attribute1"; + + ApiResponse response = api.attributesAttributeDbIdGet(attributeDbId); + + assertEquals(attributeDbId, response.getBody().getResult().getAttributeDbId()); + } + + /** + * Update an existing Germplasm Attribute + * + * Update an existing Germplasm Attribute + * + * @throws ApiException if the Api call fails + */ + @Test + public void attributesAttributeDbIdPutTest() throws ApiException { + String attributeDbId = "attribute1"; + BrAPIGermplasmAttribute body = new BrAPIGermplasmAttribute().attributeName("New Name"); + + ApiResponse response = api.attributesAttributeDbIdPut(attributeDbId, + body); + + assertEquals(attributeDbId, response.getBody().getResult().getAttributeDbId()); + assertEquals("New Name", response.getBody().getResult().getAttributeName()); + } + + /** + * Get the Categories of Germplasm Attributes + * + * List all available attribute categories. + * + * @throws ApiException if the Api call fails + */ + @Test + public void attributesCategoriesGetTest() throws ApiException { + Integer page = null; + Integer pageSize = null; + + ApiResponse response = api.attributesCategoriesGet(page, pageSize); + + assertFalse(response.getBody().getResult().getData().isEmpty()); + } + + /** + * Get the Germplasm Attributes + * + * List available attributes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void attributesGetTest() throws ApiException { + String attributeCategory = null; + String attributeDbId = "attribute1"; + String attributeName = null; + String germplasmDbId = null; + String externalReferenceID = null; + String externalReferenceSource = null; + Integer page = null; + Integer pageSize = null; + + GermplasmAttributeQueryParams queryParams = new GermplasmAttributeQueryParams().attributeDbId(attributeDbId); + ApiResponse response = api.attributesGet(queryParams); + + assertEquals(attributeDbId, response.getBody().getResult().getData().get(0).getAttributeDbId()); + } + + /** + * Create new Germplasm Attributes + * + * Create new Germplasm Attributes + * + * @throws ApiException if the Api call fails + */ + @Test + public void attributesPostTest() throws ApiException { + BrAPIGermplasmAttribute attr = new BrAPIGermplasmAttribute().attributeName("New Attribute"); + List body = Arrays.asList(attr); + + ApiResponse response = api.attributesPost(body); + + assertEquals(attr.getAttributeName(), response.getBody().getResult().getData().get(0).getAttributeName()); + } + + /** + * Submit a search request for Germplasm Attributes + * + * Search for a set of Germplasm Attributes based on some criteria See Search + * Services for additional implementation details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchAttributesPostTest() throws ApiException { + BrAPIGermplasmAttributeSearchRequest body = new BrAPIGermplasmAttributeSearchRequest() + .addAttributeDbIdsItem("attribute1") + .addAttributeDbIdsItem("attribute2"); + + ApiResponse, Optional>> response = api + .searchAttributesPost(body); + + Optional listResponse = response.getBody().getLeft(); + Optional searchIdResponse = response.getBody().getRight(); + // only results are returned + assertTrue(listResponse.isPresent()); + assertFalse(searchIdResponse.isPresent()); + + assertEquals(2, listResponse.get().getResult().getData().size(), "unexpected number of pedigree nodes returned"); + } + + /** + * Get the results of a Germplasm Attributes search request + * + * Get the results of a Germplasm Attributes search request See Search Services + * for additional implementation details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchAttributesSearchResultsDbIdGetTest() throws ApiException { + BrAPIGermplasmAttributeSearchRequest baseRequest = new BrAPIGermplasmAttributeSearchRequest() + .addAttributeDbIdsItem("attribute1") + .addAttributeDbIdsItem("attribute1") + .addAttributeDbIdsItem("attribute1") + .addAttributeDbIdsItem("attribute1") + .addAttributeDbIdsItem("attribute2"); + + ApiResponse, Optional>> response = this.api.searchAttributesPost(baseRequest); + Optional listResponse = response.getBody().getLeft(); + Optional searchIdResponse = response.getBody().getRight(); + // only search ID is returned + assertFalse(listResponse.isPresent()); + assertTrue(searchIdResponse.isPresent()); + + // Get results from search ID + ApiResponse, Optional>> searchResponse = this.api.searchAttributesSearchResultsDbIdGet(searchIdResponse.get().getResult().getSearchResultsDbId(), 0, 10); + Optional listResponse2 = searchResponse.getBody().getLeft(); + Optional searchIdResponse2 = searchResponse.getBody().getRight(); + // only results are returned + assertTrue(listResponse2.isPresent()); + assertFalse(searchIdResponse2.isPresent()); + + assertEquals(2, listResponse2.get().getResult().getData().size(), "unexpected number of pedigree nodes returned"); + } } diff --git a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/ScalesAPITests.java b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/ScalesAPITests.java index a1137569..f470773a 100644 --- a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/ScalesAPITests.java +++ b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/ScalesAPITests.java @@ -112,7 +112,7 @@ public void scalesPostSuccess() throws Exception { List categories = Arrays.asList(low, high); BrAPITraitDataType dataType = BrAPITraitDataType.TEXT; - BrAPIScaleValidValues validValues = new BrAPIScaleValidValues().min(0).max(5).categories(categories); + BrAPIScaleValidValues validValues = new BrAPIScaleValidValues().min(0).minimumValue("0").max(5).maximumValue("5").categories(categories); JsonObject additionalInfo = new JsonObject(); additionalInfo.addProperty("test", "test"); @@ -242,7 +242,7 @@ void getScaleByIdInvalid() throws Exception { public void updateScaleSuccess() throws Exception { ApiResponse existingList = scalesAPI.scalesGet(new ScaleQueryParams()); BrAPIScale existingScale = existingList.getBody().getResult().getData().get(0); - existingScale.scaleName("updated_name").validValues(new BrAPIScaleValidValues().min(0).max(100).categories(Collections.emptyList())); + existingScale.scaleName("updated_name").validValues(new BrAPIScaleValidValues().min(0).minimumValue("0").max(100).maximumValue("100").categories(Collections.emptyList())); // Check that it is a success and all data matches ApiResponse updatedScaleResult = this.scalesAPI.scalesScaleDbIdPut(existingScale.getScaleDbId(), existingScale); diff --git a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/VariablesAPITests.java b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/VariablesAPITests.java index 3b3edefe..22b52201 100644 --- a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/VariablesAPITests.java +++ b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/phenotype/VariablesAPITests.java @@ -330,7 +330,6 @@ public void updateVariableNull() { public void createVariableWithComplexAdditionalInfoSuccess() throws Exception { BrAPIObservationVariable brApiVariable = buildTestVariable(); - brApiVariable.putAdditionalInfoItem("testObject", brApiVariable); brApiVariable.putAdditionalInfoItem("testBool", true); brApiVariable.putAdditionalInfoItem("testString", "test"); brApiVariable.putAdditionalInfoItem("testInt", 1); diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/BrAPIExternalReference.java b/brapi-java-model/src/main/java/org/brapi/v2/model/BrAPIExternalReference.java index 147d5080..d9fcd056 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/BrAPIExternalReference.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/BrAPIExternalReference.java @@ -3,98 +3,118 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; - - - - /** * ExternalReferencesInner */ - -public class BrAPIExternalReference { - @JsonProperty("referenceID") - private String referenceID = null; - - @JsonProperty("referenceSource") - private String referenceSource = null; - - public BrAPIExternalReference referenceID(String referenceID) { - this.referenceID = referenceID; - return this; - } - - /** - * The external reference ID. Could be a simple string or a URI. - * @return referenceID - **/ - - - public String getReferenceID() { - return referenceID; - } - - public void setReferenceID(String referenceID) { - this.referenceID = referenceID; - } - - public BrAPIExternalReference referenceSource(String referenceSource) { - this.referenceSource = referenceSource; - return this; - } - - /** - * An identifier for the source system or database of this reference - * @return referenceSource - **/ - - - public String getReferenceSource() { - return referenceSource; - } - - public void setReferenceSource(String referenceSource) { - this.referenceSource = referenceSource; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIExternalReference externalReferencesInner = (BrAPIExternalReference) o; - return Objects.equals(this.referenceID, externalReferencesInner.referenceID) && - Objects.equals(this.referenceSource, externalReferencesInner.referenceSource); - } - - @Override - public int hashCode() { - return Objects.hash(referenceID, referenceSource); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExternalReferencesInner {\n"); - - sb.append(" referenceID: ").append(toIndentedString(referenceID)).append("\n"); - sb.append(" referenceSource: ").append(toIndentedString(referenceSource)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } +public class BrAPIExternalReference { + @JsonProperty("referenceId") + private String referenceId = null; + + @JsonProperty("referenceID") + @Deprecated + private String referenceID = null; + + @JsonProperty("referenceSource") + private String referenceSource = null; + + public BrAPIExternalReference referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * The external reference ID. Could be a simple string or a URI. + * + * @return referenceID + **/ + + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + @Deprecated + public BrAPIExternalReference referenceID(String referenceID) { + this.referenceID = referenceID; + return this; + } + + /** + * The external reference ID. Could be a simple string or a URI. + * + * @return referenceID + **/ + + @Deprecated + public String getReferenceID() { + return referenceID; + } + + @Deprecated + public void setReferenceID(String referenceID) { + this.referenceID = referenceID; + } + + public BrAPIExternalReference referenceSource(String referenceSource) { + this.referenceSource = referenceSource; + return this; + } + + /** + * An identifier for the source system or database of this reference + * + * @return referenceSource + **/ + + public String getReferenceSource() { + return referenceSource; + } + + public void setReferenceSource(String referenceSource) { + this.referenceSource = referenceSource; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIExternalReference externalReferencesInner = (BrAPIExternalReference) o; + return Objects.equals(this.referenceID, externalReferencesInner.referenceID) + && Objects.equals(this.referenceSource, externalReferencesInner.referenceSource); + } + + @Override + public int hashCode() { + return Objects.hash(referenceID, referenceSource); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalReferencesInner {\n"); + + sb.append(" referenceID: ").append(toIndentedString(referenceID)).append("\n"); + sb.append(" referenceSource: ").append(toIndentedString(referenceSource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasm.java b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasm.java index 8c4e5625..95085392 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasm.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasm.java @@ -12,14 +12,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.brapi.v2.model.NullableJsonElementTypeAdapterFactory; -import javax.validation.Valid; - - /** * Germplasm */ - public class BrAPIGermplasm { @JsonProperty("germplasmDbId") private String germplasmDbId = null; @@ -31,8 +27,7 @@ public class BrAPIGermplasm { private LocalDate acquisitionDate = null; @JsonProperty("additionalInfo") - @Valid - @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) + @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) private JsonObject additionalInfo = null; @JsonProperty("biologicalStatusOfAccessionCode") @@ -44,6 +39,9 @@ public class BrAPIGermplasm { @JsonProperty("breedingMethodDbId") private String breedingMethodDbId = null; + @JsonProperty("breedingMethodName") + private String breedingMethodName = null; + @JsonProperty("collection") private String collection = null; @@ -60,7 +58,6 @@ public class BrAPIGermplasm { private String documentationURL = null; @JsonProperty("donors") - @Valid private List donors = null; @JsonProperty("externalReferences") @@ -73,7 +70,7 @@ public class BrAPIGermplasm { private String germplasmName = null; @JsonProperty("germplasmOrigin") - @Valid + private List germplasmOrigin = null; @JsonProperty("germplasmPUI") @@ -104,7 +101,7 @@ public class BrAPIGermplasm { private String speciesAuthority = null; @JsonProperty("storageTypes") - @Valid + private List storageTypes = null; @JsonProperty("subtaxa") @@ -114,11 +111,11 @@ public class BrAPIGermplasm { private String subtaxaAuthority = null; @JsonProperty("synonyms") - @Valid + private List synonyms = null; @JsonProperty("taxonIds") - @Valid + private List taxonIds = null; private final transient Gson gson = new Gson(); @@ -139,8 +136,6 @@ public BrAPIGermplasm germplasmDbId(String germplasmDbId) { * @return germplasmDbId **/ - - public String getGermplasmDbId() { return germplasmDbId; } @@ -161,7 +156,6 @@ public BrAPIGermplasm accessionNumber(String accessionNumber) { * @return accessionNumber **/ - public String getAccessionNumber() { return accessionNumber; } @@ -184,8 +178,6 @@ public BrAPIGermplasm acquisitionDate(LocalDate acquisitionDate) { * @return acquisitionDate **/ - - @Valid public LocalDate getAcquisitionDate() { return acquisitionDate; } @@ -200,13 +192,13 @@ public BrAPIGermplasm additionalInfo(JsonObject additionalInfo) { } public BrAPIGermplasm putAdditionalInfoItem(String key, Object additionalInfoItem) { - if (this.additionalInfo == null) { - this.additionalInfo = new JsonObject(); - } - JsonElement newElement = gson.toJsonTree(additionalInfoItem); - this.additionalInfo.add(key, newElement); - return this; - } + if (this.additionalInfo == null) { + this.additionalInfo = new JsonObject(); + } + JsonElement newElement = gson.toJsonTree(additionalInfoItem); + this.additionalInfo.add(key, newElement); + return this; + } /** * Additional arbitrary info @@ -214,7 +206,6 @@ public BrAPIGermplasm putAdditionalInfoItem(String key, Object additionalInfoIte * @return additionalInfo **/ - public JsonObject getAdditionalInfo() { return additionalInfo; } @@ -247,12 +238,12 @@ public BrAPIGermplasm biologicalStatusOfAccessionCode( * @return biologicalStatusOfAccessionCode **/ - public BrAPIBiologicalStatusOfAccessionCode getBiologicalStatusOfAccessionCode() { return biologicalStatusOfAccessionCode; } - public void setBiologicalStatusOfAccessionCode(BrAPIBiologicalStatusOfAccessionCode biologicalStatusOfAccessionCode) { + public void setBiologicalStatusOfAccessionCode( + BrAPIBiologicalStatusOfAccessionCode biologicalStatusOfAccessionCode) { this.biologicalStatusOfAccessionCode = biologicalStatusOfAccessionCode; } @@ -267,7 +258,6 @@ public BrAPIGermplasm biologicalStatusOfAccessionDescription(String biologicalSt * @return biologicalStatusOfAccessionDescription **/ - public String getBiologicalStatusOfAccessionDescription() { return biologicalStatusOfAccessionDescription; } @@ -287,7 +277,6 @@ public BrAPIGermplasm breedingMethodDbId(String breedingMethodDbId) { * @return breedingMethodDbId **/ - public String getBreedingMethodDbId() { return breedingMethodDbId; } @@ -296,6 +285,25 @@ public void setBreedingMethodDbId(String breedingMethodDbId) { this.breedingMethodDbId = breedingMethodDbId; } + public BrAPIGermplasm breedingMethodName(String breedingMethodName) { + this.breedingMethodName = breedingMethodName; + return this; + } + + /** + * The unique identifier for the breeding method used to create this germplasm + * + * @return breedingMethodDbId + **/ + + public String getBreedingMethodName() { + return breedingMethodName; + } + + public void setBreedingMethodName(String breedingMethodName) { + this.breedingMethodName = breedingMethodName; + } + public BrAPIGermplasm collection(String collection) { this.collection = collection; return this; @@ -307,7 +315,6 @@ public BrAPIGermplasm collection(String collection) { * @return collection **/ - public String getCollection() { return collection; } @@ -345,7 +352,6 @@ public BrAPIGermplasm countryOfOriginCode(String countryOfOriginCode) { * @return countryOfOriginCode **/ - public String getCountryOfOriginCode() { return countryOfOriginCode; } @@ -365,7 +371,6 @@ public BrAPIGermplasm defaultDisplayName(String defaultDisplayName) { * @return defaultDisplayName **/ - public String getDefaultDisplayName() { return defaultDisplayName; } @@ -385,7 +390,6 @@ public BrAPIGermplasm documentationURL(String documentationURL) { * @return documentationURL **/ - public String getDocumentationURL() { return documentationURL; } @@ -413,7 +417,6 @@ public BrAPIGermplasm addDonorsItem(BrAPIGermplasmDonors donorsItem) { * @return donors **/ - @Valid public List getDonors() { return donors; } @@ -433,8 +436,6 @@ public BrAPIGermplasm externalReferences(List externalRe * @return externalReferences **/ - - @Valid public List getExternalReferences() { return externalReferences; } @@ -457,7 +458,6 @@ public BrAPIGermplasm genus(String genus) { * @return genus **/ - public String getGenus() { return genus; } @@ -500,7 +500,6 @@ public BrAPIGermplasm addGermplasmOriginItem(BrAPIGermplasmOrigin germplasmOrigi * @return germplasmOrigin **/ - @Valid public List getGermplasmOrigin() { return germplasmOrigin; } @@ -535,7 +534,6 @@ public BrAPIGermplasm germplasmPreprocessing(String germplasmPreprocessing) { * @return germplasmPreprocessing **/ - public String getGermplasmPreprocessing() { return germplasmPreprocessing; } @@ -561,7 +559,6 @@ public BrAPIGermplasm instituteCode(String instituteCode) { * @return instituteCode **/ - public String getInstituteCode() { return instituteCode; } @@ -581,7 +578,6 @@ public BrAPIGermplasm instituteName(String instituteName) { * @return instituteName **/ - public String getInstituteName() { return instituteName; } @@ -601,7 +597,6 @@ public BrAPIGermplasm pedigree(String pedigree) { * @return pedigree **/ - public String getPedigree() { return pedigree; } @@ -621,7 +616,6 @@ public BrAPIGermplasm seedSource(String seedSource) { * @return seedSource **/ - public String getSeedSource() { return seedSource; } @@ -641,7 +635,6 @@ public BrAPIGermplasm seedSourceDescription(String seedSourceDescription) { * @return seedSourceDescription **/ - public String getSeedSourceDescription() { return seedSourceDescription; } @@ -665,7 +658,6 @@ public BrAPIGermplasm species(String species) { * @return species **/ - public String getSpecies() { return species; } @@ -687,7 +679,6 @@ public BrAPIGermplasm speciesAuthority(String speciesAuthority) { * @return speciesAuthority **/ - public String getSpeciesAuthority() { return speciesAuthority; } @@ -715,7 +706,6 @@ public BrAPIGermplasm addStorageTypesItem(BrAPIGermplasmStorageTypes storageType * @return storageTypes **/ - @Valid public List getStorageTypes() { return storageTypes; } @@ -747,7 +737,6 @@ public BrAPIGermplasm subtaxa(String subtaxa) { * @return subtaxa **/ - public String getSubtaxa() { return subtaxa; } @@ -769,7 +758,6 @@ public BrAPIGermplasm subtaxaAuthority(String subtaxaAuthority) { * @return subtaxaAuthority **/ - public String getSubtaxaAuthority() { return subtaxaAuthority; } @@ -797,7 +785,6 @@ public BrAPIGermplasm addSynonymsItem(BrAPIGermplasmSynonyms synonymsItem) { * @return synonyms **/ - @Valid public List getSynonyms() { return synonyms; } @@ -829,7 +816,6 @@ public BrAPIGermplasm addTaxonIdsItem(BrAPITaxonID taxonIdsItem) { * @return taxonIds **/ - @Valid public List getTaxonIds() { return taxonIds; } @@ -847,15 +833,15 @@ public boolean equals(java.lang.Object o) { return false; } BrAPIGermplasm germplasm = (BrAPIGermplasm) o; - return Objects.equals(this.germplasmDbId, germplasm.germplasmDbId) && - Objects.equals(this.accessionNumber, germplasm.accessionNumber) + return Objects.equals(this.germplasmDbId, germplasm.germplasmDbId) + && Objects.equals(this.accessionNumber, germplasm.accessionNumber) && Objects.equals(this.acquisitionDate, germplasm.acquisitionDate) && Objects.equals(this.additionalInfo, germplasm.additionalInfo) - && Objects.equals(this.biologicalStatusOfAccessionCode, - germplasm.biologicalStatusOfAccessionCode) + && Objects.equals(this.biologicalStatusOfAccessionCode, germplasm.biologicalStatusOfAccessionCode) && Objects.equals(this.biologicalStatusOfAccessionDescription, - germplasm.biologicalStatusOfAccessionDescription) + germplasm.biologicalStatusOfAccessionDescription) && Objects.equals(this.breedingMethodDbId, germplasm.breedingMethodDbId) + && Objects.equals(this.breedingMethodName, germplasm.breedingMethodName) && Objects.equals(this.collection, germplasm.collection) && Objects.equals(this.commonCropName, germplasm.commonCropName) && Objects.equals(this.countryOfOriginCode, germplasm.countryOfOriginCode) @@ -884,12 +870,12 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(germplasmDbId, accessionNumber, acquisitionDate, additionalInfo, biologicalStatusOfAccessionCode, - biologicalStatusOfAccessionDescription, breedingMethodDbId, collection, commonCropName, - countryOfOriginCode, defaultDisplayName, documentationURL, donors, externalReferences, genus, - germplasmName, germplasmOrigin, germplasmPUI, germplasmPreprocessing, instituteCode, instituteName, - pedigree, seedSource, seedSourceDescription, species, speciesAuthority, storageTypes, subtaxa, - subtaxaAuthority, synonyms, taxonIds); + return Objects.hash(germplasmDbId, accessionNumber, acquisitionDate, additionalInfo, + biologicalStatusOfAccessionCode, biologicalStatusOfAccessionDescription, breedingMethodDbId, + breedingMethodName, collection, commonCropName, countryOfOriginCode, defaultDisplayName, + documentationURL, donors, externalReferences, genus, germplasmName, germplasmOrigin, germplasmPUI, + germplasmPreprocessing, instituteCode, instituteName, pedigree, seedSource, seedSourceDescription, + species, speciesAuthority, storageTypes, subtaxa, subtaxaAuthority, synonyms, taxonIds); } @Override @@ -901,10 +887,11 @@ public String toString() { sb.append(" acquisitionDate: ").append(toIndentedString(acquisitionDate)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append(" biologicalStatusOfAccessionCode: ").append(toIndentedString(biologicalStatusOfAccessionCode)) - .append("\n"); + .append("\n"); sb.append(" biologicalStatusOfAccessionDescription: ") - .append(toIndentedString(biologicalStatusOfAccessionDescription)).append("\n"); + .append(toIndentedString(biologicalStatusOfAccessionDescription)).append("\n"); sb.append(" breedingMethodDbId: ").append(toIndentedString(breedingMethodDbId)).append("\n"); + sb.append(" breedingMethodName: ").append(toIndentedString(breedingMethodName)).append("\n"); sb.append(" collection: ").append(toIndentedString(collection)).append("\n"); sb.append(" commonCropName: ").append(toIndentedString(commonCropName)).append("\n"); sb.append(" countryOfOriginCode: ").append(toIndentedString(countryOfOriginCode)).append("\n"); diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasmAttribute.java b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasmAttribute.java index 658ec5be..dce7680d 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasmAttribute.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasmAttribute.java @@ -3,592 +3,611 @@ import java.time.OffsetDateTime; import java.util.*; +import org.brapi.v2.model.BrAPIExternalReference; +import org.brapi.v2.model.BrAPIOntologyReference; +import org.brapi.v2.model.NullableJsonElementTypeAdapterFactory; + +import com.fasterxml.jackson.annotation.JsonProperty; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.annotations.JsonAdapter; -import org.brapi.v2.model.BrAPIExternalReference; -import org.brapi.v2.model.BrAPIOntologyReference; -import com.fasterxml.jackson.annotation.JsonProperty; -import org.brapi.v2.model.NullableJsonElementTypeAdapterFactory; import org.brapi.v2.model.pheno.BrAPIMethod; import org.brapi.v2.model.pheno.BrAPIScale; import org.brapi.v2.model.pheno.BrAPITrait; -import javax.validation.Valid; - - /** * GermplasmAttribute */ +public class BrAPIGermplasmAttribute { + @JsonProperty("additionalInfo") + @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) + private JsonObject additionalInfo = null; -public class BrAPIGermplasmAttribute { - @JsonProperty("attributeDbId") - private String attributeDbId = null; - - @JsonProperty("attributeCategory") - private String attributeCategory = null; - - @JsonProperty("attributeDescription") - private String attributeDescription = null; - - @JsonProperty("attributeName") - private String attributeName = null; - - @JsonProperty("additionalInfo") - @Valid - @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) - private JsonObject additionalInfo = null; - - @JsonProperty("commonCropName") - private String commonCropName = null; - - @JsonProperty("contextOfUse") - @Valid - private List contextOfUse = null; - - @JsonProperty("defaultValue") - private String defaultValue = null; - - @JsonProperty("documentationURL") - private String documentationURL = null; - - @JsonProperty("externalReferences") - private List externalReferences = null; - - @JsonProperty("growthStage") - private String growthStage = null; - - @JsonProperty("institution") - private String institution = null; - - @JsonProperty("language") - private String language = null; - - @JsonProperty("method") - private BrAPIMethod method = null; - - @JsonProperty("ontologyReference") - private BrAPIOntologyReference ontologyReference = null; - - @JsonProperty("scale") - private BrAPIScale scale = null; - - @JsonProperty("scientist") - private String scientist = null; - - @JsonProperty("status") - private String status = null; - - @JsonProperty("submissionTimestamp") - private OffsetDateTime submissionTimestamp = null; - - @JsonProperty("synonyms") - @Valid - private List synonyms = null; - - @JsonProperty("trait") - private BrAPITrait trait = null; - - private final transient Gson gson = new Gson(); - - public BrAPIGermplasmAttribute attributeCategory(String attributeCategory) { - this.attributeCategory = attributeCategory; - return this; - } - - /** - * General category for the attribute. very similar to Trait class. - * @return attributeCategory - **/ - - - public String getAttributeCategory() { - return attributeCategory; - } - - public void setAttributeCategory(String attributeCategory) { - this.attributeCategory = attributeCategory; - } - - public BrAPIGermplasmAttribute attributeDescription(String attributeDescription) { - this.attributeDescription = attributeDescription; - return this; - } - - /** - * A human readable description of this attribute - * @return attributeDescription - **/ - - - public String getAttributeDescription() { - return attributeDescription; - } - - public void setAttributeDescription(String attributeDescription) { - this.attributeDescription = attributeDescription; - } - - public BrAPIGermplasmAttribute attributeName(String attributeName) { - this.attributeName = attributeName; - return this; - } - - /** - * A human readable name for this attribute - * @return attributeName - **/ - public String getAttributeName() { - return attributeName; - } - - public void setAttributeName(String attributeName) { - this.attributeName = attributeName; - } - - public BrAPIGermplasmAttribute attributeDbId(String attributeDbId) { - this.attributeDbId = attributeDbId; - return this; - } - - /** - * The ID which uniquely identifies this attribute within the given database server - * @return attributeDbId - **/ - - - - public String getAttributeDbId() { - return attributeDbId; - } - - public void setAttributeDbId(String attributeDbId) { - this.attributeDbId = attributeDbId; - } - - public BrAPIGermplasmAttribute additionalInfo(JsonObject additionalInfo) { - this.additionalInfo = additionalInfo; - return this; - } - - public BrAPIGermplasmAttribute putAdditionalInfoItem(String key, Object additionalInfoItem) { - if (this.additionalInfo == null) { - this.additionalInfo = new JsonObject(); - } - JsonElement newElement = gson.toJsonTree(additionalInfoItem); - this.additionalInfo.add(key, newElement); - return this; - } - - /** - * Additional arbitrary info - * @return additionalInfo - **/ - - - public JsonObject getAdditionalInfo() { - return additionalInfo; - } - - public void setAdditionalInfo(JsonObject additionalInfo) { - this.additionalInfo = additionalInfo; - } - - public BrAPIGermplasmAttribute commonCropName(String commonCropName) { - this.commonCropName = commonCropName; - return this; - } - - /** - * Crop name (examples: \"Maize\", \"Wheat\") - * @return commonCropName - **/ - - - public String getCommonCropName() { - return commonCropName; - } - - public void setCommonCropName(String commonCropName) { - this.commonCropName = commonCropName; - } - - public BrAPIGermplasmAttribute contextOfUse(List contextOfUse) { - this.contextOfUse = contextOfUse; - return this; - } - - public BrAPIGermplasmAttribute addContextOfUseItem(String contextOfUseItem) { - if (this.contextOfUse == null) { - this.contextOfUse = new ArrayList(); - } - this.contextOfUse.add(contextOfUseItem); - return this; - } - - /** - * Indication of how trait is routinely used. (examples: [\"Trial evaluation\", \"Nursery evaluation\"]) - * @return contextOfUse - **/ - - - public List getContextOfUse() { - return contextOfUse; - } - - public void setContextOfUse(List contextOfUse) { - this.contextOfUse = contextOfUse; - } - - public BrAPIGermplasmAttribute defaultValue(String defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - /** - * Variable default value. (examples: \"red\", \"2.3\", etc.) - * @return defaultValue - **/ + @JsonProperty("attributeCategory") + private String attributeCategory = null; + @JsonProperty("attributeDbId") + private String attributeDbId = null; - public String getDefaultValue() { - return defaultValue; - } + @JsonProperty("attributeDescription") + private String attributeDescription = null; - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - - public BrAPIGermplasmAttribute documentationURL(String documentationURL) { - this.documentationURL = documentationURL; - return this; - } - - /** - * A URL to the human readable documentation of this object - * @return documentationURL - **/ - - - public String getDocumentationURL() { - return documentationURL; - } - - public void setDocumentationURL(String documentationURL) { - this.documentationURL = documentationURL; - } + @JsonProperty("attributeName") + private String attributeName = null; - public BrAPIGermplasmAttribute externalReferences(List externalReferences) { - this.externalReferences = externalReferences; - return this; - } + @JsonProperty("attributePUI") + private String attributePUI = null; - /** - * Get externalReferences - * @return externalReferences - **/ + @JsonProperty("commonCropName") + private String commonCropName = null; + @JsonProperty("contextOfUse") + private List contextOfUse = null; - @Valid - public List getExternalReferences() { - return externalReferences; - } + @JsonProperty("defaultValue") + private String defaultValue = null; - public void setExternalReferences(List externalReferences) { - this.externalReferences = externalReferences; - } - - public BrAPIGermplasmAttribute growthStage(String growthStage) { - this.growthStage = growthStage; - return this; - } - - /** - * Growth stage at which measurement is made (examples: \"flowering\") - * @return growthStage - **/ - - - public String getGrowthStage() { - return growthStage; - } - - public void setGrowthStage(String growthStage) { - this.growthStage = growthStage; - } - - public BrAPIGermplasmAttribute institution(String institution) { - this.institution = institution; - return this; - } - - /** - * Name of institution submitting the variable - * @return institution - **/ + @JsonProperty("documentationURL") + private String documentationURL = null; + @JsonProperty("externalReferences") + private List externalReferences = null; + + @JsonProperty("growthStage") + private String growthStage = null; - public String getInstitution() { - return institution; - } - - public void setInstitution(String institution) { - this.institution = institution; - } - - public BrAPIGermplasmAttribute language(String language) { - this.language = language; - return this; - } - - /** - * 2 letter ISO 639-1 code for the language of submission of the variable. - * @return language - **/ - + @JsonProperty("institution") + private String institution = null; - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language; - } - - public BrAPIGermplasmAttribute method(BrAPIMethod method) { - this.method = method; - return this; - } - - /** - * Get method - * @return method - **/ - public BrAPIMethod getMethod() { - return method; - } + @JsonProperty("language") + private String language = null; + + @JsonProperty("method") + private BrAPIMethod method = null; + + @JsonProperty("ontologyReference") + private BrAPIOntologyReference ontologyReference = null; + + @JsonProperty("scale") + private BrAPIScale scale = null; + + @JsonProperty("scientist") + private String scientist = null; + + @JsonProperty("status") + private String status = null; + + @JsonProperty("submissionTimestamp") + private OffsetDateTime submissionTimestamp = null; + + @JsonProperty("synonyms") + private List synonyms = null; + + @JsonProperty("trait") + private BrAPITrait trait = null; + + private final transient Gson gson = new Gson(); + + public BrAPIGermplasmAttribute additionalInfo(JsonObject additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + public BrAPIGermplasmAttribute putAdditionalInfoItem(String key, Object additionalInfoItem) { + if (this.additionalInfo == null) { + this.additionalInfo = new JsonObject(); + } + JsonElement newElement = gson.toJsonTree(additionalInfoItem); + this.additionalInfo.add(key, newElement); + return this; + } + + /** + * A free space containing any additional information related to a particular + * object. A data source may provide any JSON object, unrestriced by the BrAPI + * specification. + * + * @return additionalInfo + **/ + public JsonObject getAdditionalInfo() { + return additionalInfo; + } + + public void setAdditionalInfo(JsonObject additionalInfo) { + this.additionalInfo = additionalInfo; + } + + public BrAPIGermplasmAttribute attributeCategory(String attributeCategory) { + this.attributeCategory = attributeCategory; + return this; + } + + /** + * General category for the attribute. very similar to Trait class. + * + * @return attributeCategory + **/ + public String getAttributeCategory() { + return attributeCategory; + } + + public void setAttributeCategory(String attributeCategory) { + this.attributeCategory = attributeCategory; + } + + public BrAPIGermplasmAttribute attributeDbId(String attributeDbId) { + this.attributeDbId = attributeDbId; + return this; + } + + /** + * The ID which uniquely identifies this attribute within the given database + * server + * + * @return attributeDbId + **/ + public String getAttributeDbId() { + return attributeDbId; + } + + public void setAttributeDbId(String attributeDbId) { + this.attributeDbId = attributeDbId; + } + + public BrAPIGermplasmAttribute attributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + return this; + } + + /** + * A human readable description of this attribute + * + * @return attributeDescription + **/ + public String getAttributeDescription() { + return attributeDescription; + } + + public void setAttributeDescription(String attributeDescription) { + this.attributeDescription = attributeDescription; + } + + public BrAPIGermplasmAttribute attributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * A human readable name for this attribute + * + * @return attributeName + **/ + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + public BrAPIGermplasmAttribute attributePUI(String attributePUI) { + this.attributePUI = attributePUI; + return this; + } + + /** + * The Permanent Unique Identifier of an Attribute, usually in the form of a URI + * + * @return attributePUI + **/ + public String getAttributePUI() { + return attributePUI; + } + + public void setAttributePUI(String attributePUI) { + this.attributePUI = attributePUI; + } + + public BrAPIGermplasmAttribute commonCropName(String commonCropName) { + this.commonCropName = commonCropName; + return this; + } + + /** + * Crop name (examples: \"Maize\", \"Wheat\") + * + * @return commonCropName + **/ + public String getCommonCropName() { + return commonCropName; + } + + public void setCommonCropName(String commonCropName) { + this.commonCropName = commonCropName; + } + + public BrAPIGermplasmAttribute contextOfUse(List contextOfUse) { + this.contextOfUse = contextOfUse; + return this; + } + + public BrAPIGermplasmAttribute addContextOfUseItem(String contextOfUseItem) { + if (this.contextOfUse == null) { + this.contextOfUse = new ArrayList(); + } + this.contextOfUse.add(contextOfUseItem); + return this; + } + + /** + * Indication of how trait is routinely used. (examples: [\"Trial + * evaluation\", \"Nursery evaluation\"]) + * + * @return contextOfUse + **/ + public List getContextOfUse() { + return contextOfUse; + } + + public void setContextOfUse(List contextOfUse) { + this.contextOfUse = contextOfUse; + } + + public BrAPIGermplasmAttribute defaultValue(String defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + /** + * Variable default value. (examples: \"red\", \"2.3\", + * etc.) + * + * @return defaultValue + **/ + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public BrAPIGermplasmAttribute documentationURL(String documentationURL) { + this.documentationURL = documentationURL; + return this; + } + + /** + * A URL to the human readable documentation of an object + * + * @return documentationURL + **/ + public String getDocumentationURL() { + return documentationURL; + } + + public void setDocumentationURL(String documentationURL) { + this.documentationURL = documentationURL; + } + + public BrAPIGermplasmAttribute externalReferences(List externalReferences) { + this.externalReferences = externalReferences; + return this; + } + + public BrAPIGermplasmAttribute addExternalReferencesItem(BrAPIExternalReference externalReferencesItem) { + if (this.externalReferences == null) { + this.externalReferences = new ArrayList(); + } + this.externalReferences.add(externalReferencesItem); + return this; + } + + /** + * An array of external reference ids. These are references to this piece of + * data in an external system. Could be a simple string or a URI. + * + * @return externalReferences + **/ + public List getExternalReferences() { + return externalReferences; + } + + public void setExternalReferences(List externalReferences) { + this.externalReferences = externalReferences; + } + + public BrAPIGermplasmAttribute growthStage(String growthStage) { + this.growthStage = growthStage; + return this; + } + + /** + * Growth stage at which measurement is made (examples: \"flowering\") + * + * @return growthStage + **/ + public String getGrowthStage() { + return growthStage; + } + + public void setGrowthStage(String growthStage) { + this.growthStage = growthStage; + } + + public BrAPIGermplasmAttribute institution(String institution) { + this.institution = institution; + return this; + } + + /** + * Name of institution submitting the variable + * + * @return institution + **/ + public String getInstitution() { + return institution; + } + + public void setInstitution(String institution) { + this.institution = institution; + } + + public BrAPIGermplasmAttribute language(String language) { + this.language = language; + return this; + } + + /** + * 2 letter ISO 639-1 code for the language of submission of the variable. + * + * @return language + **/ + public String getLanguage() { + return language; + } + + public void setLanguage(String language) { + this.language = language; + } + + public BrAPIGermplasmAttribute method(BrAPIMethod method) { + this.method = method; + return this; + } + + /** + * Get method + * + * @return method + **/ + public BrAPIMethod getMethod() { + return method; + } + + public void setMethod(BrAPIMethod method) { + this.method = method; + } + + public BrAPIGermplasmAttribute ontologyReference(BrAPIOntologyReference ontologyReference) { + this.ontologyReference = ontologyReference; + return this; + } + + /** + * Get ontologyReference + * + * @return ontologyReference + **/ + public BrAPIOntologyReference getOntologyReference() { + return ontologyReference; + } + + public void setOntologyReference(BrAPIOntologyReference ontologyReference) { + this.ontologyReference = ontologyReference; + } + + public BrAPIGermplasmAttribute scale(BrAPIScale scale) { + this.scale = scale; + return this; + } + + /** + * Get scale + * + * @return scale + **/ + public BrAPIScale getScale() { + return scale; + } + + public void setScale(BrAPIScale scale) { + this.scale = scale; + } + + public BrAPIGermplasmAttribute scientist(String scientist) { + this.scientist = scientist; + return this; + } + + /** + * Name of scientist submitting the variable. + * + * @return scientist + **/ + public String getScientist() { + return scientist; + } + + public void setScientist(String scientist) { + this.scientist = scientist; + } + + public BrAPIGermplasmAttribute status(String status) { + this.status = status; + return this; + } + + /** + * Variable status. (examples: \"recommended\", + * \"obsolete\", \"legacy\", etc.) + * + * @return status + **/ + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public BrAPIGermplasmAttribute submissionTimestamp(OffsetDateTime submissionTimestamp) { + this.submissionTimestamp = submissionTimestamp; + return this; + } + + /** + * Timestamp when the Variable was added (ISO 8601) + * + * @return submissionTimestamp + **/ + public OffsetDateTime getSubmissionTimestamp() { + return submissionTimestamp; + } + + public void setSubmissionTimestamp(OffsetDateTime submissionTimestamp) { + this.submissionTimestamp = submissionTimestamp; + } + + public BrAPIGermplasmAttribute synonyms(List synonyms) { + this.synonyms = synonyms; + return this; + } + + public BrAPIGermplasmAttribute addSynonymsItem(String synonymsItem) { + if (this.synonyms == null) { + this.synonyms = new ArrayList(); + } + this.synonyms.add(synonymsItem); + return this; + } + + /** + * Other variable names + * + * @return synonyms + **/ + public List getSynonyms() { + return synonyms; + } + + public void setSynonyms(List synonyms) { + this.synonyms = synonyms; + } + + public BrAPIGermplasmAttribute trait(BrAPITrait trait) { + this.trait = trait; + return this; + } + + /** + * Get trait + * + * @return trait + **/ + public BrAPITrait getTrait() { + return trait; + } + + public void setTrait(BrAPITrait trait) { + this.trait = trait; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIGermplasmAttribute germplasmAttribute = (BrAPIGermplasmAttribute) o; + return Objects.equals(this.additionalInfo, germplasmAttribute.additionalInfo) + && Objects.equals(this.attributeCategory, germplasmAttribute.attributeCategory) + && Objects.equals(this.attributeDbId, germplasmAttribute.attributeDbId) + && Objects.equals(this.attributeDescription, germplasmAttribute.attributeDescription) + && Objects.equals(this.attributeName, germplasmAttribute.attributeName) + && Objects.equals(this.attributePUI, germplasmAttribute.attributePUI) + && Objects.equals(this.commonCropName, germplasmAttribute.commonCropName) + && Objects.equals(this.contextOfUse, germplasmAttribute.contextOfUse) + && Objects.equals(this.defaultValue, germplasmAttribute.defaultValue) + && Objects.equals(this.documentationURL, germplasmAttribute.documentationURL) + && Objects.equals(this.externalReferences, germplasmAttribute.externalReferences) + && Objects.equals(this.growthStage, germplasmAttribute.growthStage) + && Objects.equals(this.institution, germplasmAttribute.institution) + && Objects.equals(this.language, germplasmAttribute.language) + && Objects.equals(this.method, germplasmAttribute.method) + && Objects.equals(this.ontologyReference, germplasmAttribute.ontologyReference) + && Objects.equals(this.scale, germplasmAttribute.scale) + && Objects.equals(this.scientist, germplasmAttribute.scientist) + && Objects.equals(this.status, germplasmAttribute.status) + && Objects.equals(this.submissionTimestamp, germplasmAttribute.submissionTimestamp) + && Objects.equals(this.synonyms, germplasmAttribute.synonyms) + && Objects.equals(this.trait, germplasmAttribute.trait); + } + + @Override + public int hashCode() { + return Objects.hash(additionalInfo, attributeCategory, attributeDbId, attributeDescription, attributeName, + attributePUI, commonCropName, contextOfUse, defaultValue, documentationURL, externalReferences, + growthStage, institution, language, method, ontologyReference, scale, scientist, status, + submissionTimestamp, synonyms, trait); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GermplasmAttribute {\n"); + + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" attributeCategory: ").append(toIndentedString(attributeCategory)).append("\n"); + sb.append(" attributeDbId: ").append(toIndentedString(attributeDbId)).append("\n"); + sb.append(" attributeDescription: ").append(toIndentedString(attributeDescription)).append("\n"); + sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); + sb.append(" attributePUI: ").append(toIndentedString(attributePUI)).append("\n"); + sb.append(" commonCropName: ").append(toIndentedString(commonCropName)).append("\n"); + sb.append(" contextOfUse: ").append(toIndentedString(contextOfUse)).append("\n"); + sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n"); + sb.append(" documentationURL: ").append(toIndentedString(documentationURL)).append("\n"); + sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); + sb.append(" growthStage: ").append(toIndentedString(growthStage)).append("\n"); + sb.append(" institution: ").append(toIndentedString(institution)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" ontologyReference: ").append(toIndentedString(ontologyReference)).append("\n"); + sb.append(" scale: ").append(toIndentedString(scale)).append("\n"); + sb.append(" scientist: ").append(toIndentedString(scientist)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" submissionTimestamp: ").append(toIndentedString(submissionTimestamp)).append("\n"); + sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); + sb.append(" trait: ").append(toIndentedString(trait)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } - public void setMethod(BrAPIMethod method) { - this.method = method; - } - - public BrAPIGermplasmAttribute ontologyReference(BrAPIOntologyReference ontologyReference) { - this.ontologyReference = ontologyReference; - return this; - } - - /** - * Get ontologyReference - * @return ontologyReference - **/ - - - @Valid - public BrAPIOntologyReference getOntologyReference() { - return ontologyReference; - } - - public void setOntologyReference(BrAPIOntologyReference ontologyReference) { - this.ontologyReference = ontologyReference; - } - - public BrAPIGermplasmAttribute scale(BrAPIScale scale) { - this.scale = scale; - return this; - } - - /** - * Get scale - * @return scale - **/ - public BrAPIScale getScale() { - return scale; - } - - public void setScale(BrAPIScale scale) { - this.scale = scale; - } - - public BrAPIGermplasmAttribute scientist(String scientist) { - this.scientist = scientist; - return this; - } - - /** - * Name of scientist submitting the variable. - * @return scientist - **/ - - - public String getScientist() { - return scientist; - } - - public void setScientist(String scientist) { - this.scientist = scientist; - } - - public BrAPIGermplasmAttribute status(String status) { - this.status = status; - return this; - } - - /** - * Variable status. (examples: \"recommended\", \"obsolete\", \"legacy\", etc.) - * @return status - **/ - - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public BrAPIGermplasmAttribute submissionTimestamp(OffsetDateTime submissionTimestamp) { - this.submissionTimestamp = submissionTimestamp; - return this; - } - - /** - * Timestamp when the Variable was added (ISO 8601) - * @return submissionTimestamp - **/ - - - @Valid - public OffsetDateTime getSubmissionTimestamp() { - return submissionTimestamp; - } - - public void setSubmissionTimestamp(OffsetDateTime submissionTimestamp) { - this.submissionTimestamp = submissionTimestamp; - } - - public BrAPIGermplasmAttribute synonyms(List synonyms) { - this.synonyms = synonyms; - return this; - } - - public BrAPIGermplasmAttribute addSynonymsItem(String synonymsItem) { - if (this.synonyms == null) { - this.synonyms = new ArrayList(); - } - this.synonyms.add(synonymsItem); - return this; - } - - /** - * Other variable names - * @return synonyms - **/ - - - public List getSynonyms() { - return synonyms; - } - - public void setSynonyms(List synonyms) { - this.synonyms = synonyms; - } - - public BrAPIGermplasmAttribute trait(BrAPITrait trait) { - this.trait = trait; - return this; - } - - /** - * Get trait - * @return trait - **/ - public BrAPITrait getTrait() { - return trait; - } - - public void setTrait(BrAPITrait trait) { - this.trait = trait; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIGermplasmAttribute germplasmAttribute = (BrAPIGermplasmAttribute) o; - return Objects.equals(this.attributeDbId, germplasmAttribute.attributeDbId) && - Objects.equals(this.attributeCategory, germplasmAttribute.attributeCategory) && - Objects.equals(this.attributeDescription, germplasmAttribute.attributeDescription) && - Objects.equals(this.attributeName, germplasmAttribute.attributeName) && - Objects.equals(this.additionalInfo, germplasmAttribute.additionalInfo) && - Objects.equals(this.commonCropName, germplasmAttribute.commonCropName) && - Objects.equals(this.contextOfUse, germplasmAttribute.contextOfUse) && - Objects.equals(this.defaultValue, germplasmAttribute.defaultValue) && - Objects.equals(this.documentationURL, germplasmAttribute.documentationURL) && - Objects.equals(this.externalReferences, germplasmAttribute.externalReferences) && - Objects.equals(this.growthStage, germplasmAttribute.growthStage) && - Objects.equals(this.institution, germplasmAttribute.institution) && - Objects.equals(this.language, germplasmAttribute.language) && - Objects.equals(this.method, germplasmAttribute.method) && - Objects.equals(this.ontologyReference, germplasmAttribute.ontologyReference) && - Objects.equals(this.scale, germplasmAttribute.scale) && - Objects.equals(this.scientist, germplasmAttribute.scientist) && - Objects.equals(this.status, germplasmAttribute.status) && - Objects.equals(this.submissionTimestamp, germplasmAttribute.submissionTimestamp) && - Objects.equals(this.synonyms, germplasmAttribute.synonyms) && - Objects.equals(this.trait, germplasmAttribute.trait); - } - - @Override - public int hashCode() { - return Objects.hash(attributeDbId, attributeCategory, attributeDescription, attributeName, additionalInfo, commonCropName, contextOfUse, defaultValue, documentationURL, externalReferences, growthStage, institution, language, method, ontologyReference, scale, scientist, status, submissionTimestamp, synonyms, trait); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GermplasmAttribute {\n"); - sb.append(" attributeDbId: ").append(toIndentedString(attributeDbId)).append("\n"); - sb.append(" attributeCategory: ").append(toIndentedString(attributeCategory)).append("\n"); - sb.append(" attributeDescription: ").append(toIndentedString(attributeDescription)).append("\n"); - sb.append(" attributeName: ").append(toIndentedString(attributeName)).append("\n"); - sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" commonCropName: ").append(toIndentedString(commonCropName)).append("\n"); - sb.append(" contextOfUse: ").append(toIndentedString(contextOfUse)).append("\n"); - sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n"); - sb.append(" documentationURL: ").append(toIndentedString(documentationURL)).append("\n"); - sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); - sb.append(" growthStage: ").append(toIndentedString(growthStage)).append("\n"); - sb.append(" institution: ").append(toIndentedString(institution)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append(" method: ").append(toIndentedString(method)).append("\n"); - sb.append(" ontologyReference: ").append(toIndentedString(ontologyReference)).append("\n"); - sb.append(" scale: ").append(toIndentedString(scale)).append("\n"); - sb.append(" scientist: ").append(toIndentedString(scientist)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" submissionTimestamp: ").append(toIndentedString(submissionTimestamp)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" trait: ").append(toIndentedString(trait)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasmDonors.java b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasmDonors.java index bbb690e5..12f31ab1 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasmDonors.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/BrAPIGermplasmDonors.java @@ -3,122 +3,122 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; - - - - /** * GermplasmDonors */ - public class BrAPIGermplasmDonors { - @JsonProperty("donorAccessionNumber") - private String donorAccessionNumber = null; - - @JsonProperty("donorInstituteCode") - private String donorInstituteCode = null; - - @JsonProperty("germplasmPUI") - private String germplasmPUI = null; - - public BrAPIGermplasmDonors donorAccessionNumber(String donorAccessionNumber) { - this.donorAccessionNumber = donorAccessionNumber; - return this; - } - - /** - * The accession number assigned by the donor MCPD (v2.1) (DONORNUMB) 23. Identifier assigned to an accession by the donor. Follows ACCENUMB standard. - * @return donorAccessionNumber - **/ - - - public String getDonorAccessionNumber() { - return donorAccessionNumber; - } - - public void setDonorAccessionNumber(String donorAccessionNumber) { - this.donorAccessionNumber = donorAccessionNumber; - } - - public BrAPIGermplasmDonors donorInstituteCode(String donorInstituteCode) { - this.donorInstituteCode = donorInstituteCode; - return this; - } - - /** - * The institute code for the donor institute MCPD (v2.1) (DONORCODE) 22. FAO WIEWS code of the donor institute. Follows INSTCODE standard. - * @return donorInstituteCode - **/ - - - public String getDonorInstituteCode() { - return donorInstituteCode; - } - - public void setDonorInstituteCode(String donorInstituteCode) { - this.donorInstituteCode = donorInstituteCode; - } - - public BrAPIGermplasmDonors germplasmPUI(String germplasmPUI) { - this.germplasmPUI = germplasmPUI; - return this; - } - - /** - * Get germplasmPUI - * @return germplasmPUI - **/ - - - public String getGermplasmPUI() { - return germplasmPUI; - } - - public void setGermplasmPUI(String germplasmPUI) { - this.germplasmPUI = germplasmPUI; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIGermplasmDonors germplasmDonors = (BrAPIGermplasmDonors) o; - return Objects.equals(this.donorAccessionNumber, germplasmDonors.donorAccessionNumber) && - Objects.equals(this.donorInstituteCode, germplasmDonors.donorInstituteCode) && - Objects.equals(this.germplasmPUI, germplasmDonors.germplasmPUI); - } - - @Override - public int hashCode() { - return Objects.hash(donorAccessionNumber, donorInstituteCode, germplasmPUI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GermplasmDonors {\n"); - - sb.append(" donorAccessionNumber: ").append(toIndentedString(donorAccessionNumber)).append("\n"); - sb.append(" donorInstituteCode: ").append(toIndentedString(donorInstituteCode)).append("\n"); - sb.append(" germplasmPUI: ").append(toIndentedString(germplasmPUI)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + @JsonProperty("donorAccessionNumber") + private String donorAccessionNumber = null; + + @JsonProperty("donorInstituteCode") + private String donorInstituteCode = null; + + @Deprecated + @JsonProperty("germplasmPUI") + private String germplasmPUI = null; + + public BrAPIGermplasmDonors donorAccessionNumber(String donorAccessionNumber) { + this.donorAccessionNumber = donorAccessionNumber; + return this; + } + + /** + * The accession number assigned by the donor MCPD (v2.1) (DONORNUMB) 23. + * Identifier assigned to an accession by the donor. Follows ACCENUMB standard. + * + * @return donorAccessionNumber + **/ + + public String getDonorAccessionNumber() { + return donorAccessionNumber; + } + + public void setDonorAccessionNumber(String donorAccessionNumber) { + this.donorAccessionNumber = donorAccessionNumber; + } + + public BrAPIGermplasmDonors donorInstituteCode(String donorInstituteCode) { + this.donorInstituteCode = donorInstituteCode; + return this; + } + + /** + * The institute code for the donor institute MCPD (v2.1) (DONORCODE) 22. FAO + * WIEWS code of the donor institute. Follows INSTCODE standard. + * + * @return donorInstituteCode + **/ + + public String getDonorInstituteCode() { + return donorInstituteCode; + } + + public void setDonorInstituteCode(String donorInstituteCode) { + this.donorInstituteCode = donorInstituteCode; + } + + @Deprecated + public BrAPIGermplasmDonors germplasmPUI(String germplasmPUI) { + this.germplasmPUI = germplasmPUI; + return this; + } + + /** + * Get germplasmPUI + * + * @return germplasmPUI + **/ + + @Deprecated + public String getGermplasmPUI() { + return germplasmPUI; + } + + @Deprecated + public void setGermplasmPUI(String germplasmPUI) { + this.germplasmPUI = germplasmPUI; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIGermplasmDonors germplasmDonors = (BrAPIGermplasmDonors) o; + return Objects.equals(this.donorAccessionNumber, germplasmDonors.donorAccessionNumber) + && Objects.equals(this.donorInstituteCode, germplasmDonors.donorInstituteCode) + && Objects.equals(this.germplasmPUI, germplasmDonors.germplasmPUI); + } + + @Override + public int hashCode() { + return Objects.hash(donorAccessionNumber, donorInstituteCode, germplasmPUI); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GermplasmDonors {\n"); + + sb.append(" donorAccessionNumber: ").append(toIndentedString(donorAccessionNumber)).append("\n"); + sb.append(" donorInstituteCode: ").append(toIndentedString(donorInstituteCode)).append("\n"); + sb.append(" germplasmPUI: ").append(toIndentedString(germplasmPUI)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/request/BrAPIGermplasmAttributeSearchRequest.java b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/request/BrAPIGermplasmAttributeSearchRequest.java index 0b152621..68714022 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/request/BrAPIGermplasmAttributeSearchRequest.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/request/BrAPIGermplasmAttributeSearchRequest.java @@ -6,415 +6,1121 @@ import java.util.ArrayList; import java.util.List; -import javax.validation.Valid; - import org.brapi.v2.model.BrAPISearchRequestParametersPaging; import org.brapi.v2.model.pheno.BrAPITraitDataType; /** - * GermplasmAttributeSearchRequest + * BrAPIGermplasmAttributeSearchRequest */ +public class BrAPIGermplasmAttributeSearchRequest extends BrAPISearchRequestParametersPaging { + @JsonProperty("attributeCategories") + private List attributeCategories = null; + + @JsonProperty("attributeDbIds") + private List attributeDbIds = null; + + @JsonProperty("attributeNames") + private List attributeNames = null; + + @JsonProperty("attributePUIs") + private List attributePUIs = null; + + @JsonProperty("commonCropNames") + private List commonCropNames = null; + + @JsonProperty("dataTypes") + private List dataTypes = null; + + @JsonProperty("externalReferenceIDs") + @Deprecated + private List externalReferenceIDs = null; + + @JsonProperty("externalReferenceIds") + private List externalReferenceIds = null; + + @JsonProperty("externalReferenceSources") + private List externalReferenceSources = null; + + @JsonProperty("germplasmDbIds") + private List germplasmDbIds = null; + + @JsonProperty("germplasmNames") + private List germplasmNames = null; + + @JsonProperty("methodDbIds") + private List methodDbIds = null; + + @JsonProperty("methodNames") + private List methodNames = null; + + @JsonProperty("methodPUIs") + private List methodPUIs = null; + + @JsonProperty("ontologyDbIds") + private List ontologyDbIds = null; + + @JsonProperty("programDbIds") + private List programDbIds = null; + + @JsonProperty("programNames") + private List programNames = null; + + @JsonProperty("scaleDbIds") + private List scaleDbIds = null; + + @JsonProperty("scaleNames") + private List scaleNames = null; + + @JsonProperty("scalePUIs") + private List scalePUIs = null; + + @JsonProperty("studyDbId") + @Deprecated + private List studyDbId = null; + + @JsonProperty("studyDbIds") + private List studyDbIds = null; + + @JsonProperty("studyNames") + private List studyNames = null; + + @JsonProperty("traitAttributePUIs") + private List traitAttributePUIs = null; + + @JsonProperty("traitAttributes") + private List traitAttributes = null; + + @JsonProperty("traitClasses") + private List traitClasses = null; + + @JsonProperty("traitDbIds") + private List traitDbIds = null; + + @JsonProperty("traitEntities") + private List traitEntities = null; + + @JsonProperty("traitEntityPUIs") + private List traitEntityPUIs = null; + + @JsonProperty("traitNames") + private List traitNames = null; + + @JsonProperty("traitPUIs") + private List traitPUIs = null; + + @JsonProperty("trialDbIds") + private List trialDbIds = null; + + @JsonProperty("trialNames") + private List trialNames = null; + + public BrAPIGermplasmAttributeSearchRequest attributeCategories(List attributeCategories) { + this.attributeCategories = attributeCategories; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addAttributeCategoriesItem(String attributeCategoriesItem) { + if (this.attributeCategories == null) { + this.attributeCategories = new ArrayList(); + } + this.attributeCategories.add(attributeCategoriesItem); + return this; + } + + /** + * General category for the attribute. very similar to Trait class. + * + * @return attributeCategories + **/ + public List getAttributeCategories() { + return attributeCategories; + } + + public void setAttributeCategories(List attributeCategories) { + this.attributeCategories = attributeCategories; + } + + public BrAPIGermplasmAttributeSearchRequest attributeDbIds(List attributeDbIds) { + this.attributeDbIds = attributeDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addAttributeDbIdsItem(String attributeDbIdsItem) { + if (this.attributeDbIds == null) { + this.attributeDbIds = new ArrayList(); + } + this.attributeDbIds.add(attributeDbIdsItem); + return this; + } + + /** + * List of Germplasm Attribute IDs to search for + * + * @return attributeDbIds + **/ + public List getAttributeDbIds() { + return attributeDbIds; + } + + public void setAttributeDbIds(List attributeDbIds) { + this.attributeDbIds = attributeDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest attributeNames(List attributeNames) { + this.attributeNames = attributeNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addAttributeNamesItem(String attributeNamesItem) { + if (this.attributeNames == null) { + this.attributeNames = new ArrayList(); + } + this.attributeNames.add(attributeNamesItem); + return this; + } + + /** + * List of human readable Germplasm Attribute names to search for + * + * @return attributeNames + **/ + public List getAttributeNames() { + return attributeNames; + } + + public void setAttributeNames(List attributeNames) { + this.attributeNames = attributeNames; + } + + public BrAPIGermplasmAttributeSearchRequest attributePUIs(List attributePUIs) { + this.attributePUIs = attributePUIs; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addAttributePUIsItem(String attributePUIsItem) { + if (this.attributePUIs == null) { + this.attributePUIs = new ArrayList(); + } + this.attributePUIs.add(attributePUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of an Attribute, usually in the form of a URI + * + * @return attributePUIs + **/ + public List getAttributePUIs() { + return attributePUIs; + } + + public void setAttributePUIs(List attributePUIs) { + this.attributePUIs = attributePUIs; + } + + public BrAPIGermplasmAttributeSearchRequest commonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addCommonCropNamesItem(String commonCropNamesItem) { + if (this.commonCropNames == null) { + this.commonCropNames = new ArrayList(); + } + this.commonCropNames.add(commonCropNamesItem); + return this; + } + + /** + * The BrAPI Common Crop Name is the simple, generalized, widely accepted name + * of the organism being researched. It is most often used in multi-crop systems + * where digital resources need to be divided at a high level. Things like + * 'Maize', 'Wheat', and 'Rice' are examples of + * common crop names. Use this parameter to only return results associated with + * the given crops. Use `GET /commoncropnames` to find the list of + * available crops on a server. + * + * @return commonCropNames + **/ + public List getCommonCropNames() { + return commonCropNames; + } + + public void setCommonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + } + + public BrAPIGermplasmAttributeSearchRequest dataTypes(List dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addDataTypesItem(BrAPITraitDataType dataTypesItem) { + if (this.dataTypes == null) { + this.dataTypes = new ArrayList(); + } + this.dataTypes.add(dataTypesItem); + return this; + } + + /** + * List of scale data types to filter search results + * + * @return dataTypes + **/ + public List getDataTypes() { + return dataTypes; + } + + public void setDataTypes(List dataTypes) { + this.dataTypes = dataTypes; + } + + @Deprecated + public BrAPIGermplasmAttributeSearchRequest externalReferenceIDs(List externalReferenceIDs) { + this.externalReferenceIDs = externalReferenceIDs; + return this; + } + + @Deprecated + public BrAPIGermplasmAttributeSearchRequest addExternalReferenceIDsItem(String externalReferenceIDsItem) { + if (this.externalReferenceIDs == null) { + this.externalReferenceIDs = new ArrayList(); + } + this.externalReferenceIDs.add(externalReferenceIDsItem); + return this; + } + + /** + * **Deprecated in v2.1** Please use `externalReferenceIds`. Github + * issue number #460 <br>List of external reference IDs. Could be a simple + * strings or a URIs. (use with `externalReferenceSources` parameter) + * + * @return externalReferenceIDs + **/ + @Deprecated + public List getExternalReferenceIDs() { + return externalReferenceIDs; + } + + @Deprecated + public void setExternalReferenceIDs(List externalReferenceIDs) { + this.externalReferenceIDs = externalReferenceIDs; + } + + public BrAPIGermplasmAttributeSearchRequest externalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addExternalReferenceIdsItem(String externalReferenceIdsItem) { + if (this.externalReferenceIds == null) { + this.externalReferenceIds = new ArrayList(); + } + this.externalReferenceIds.add(externalReferenceIdsItem); + return this; + } + + /** + * List of external reference IDs. Could be a simple strings or a URIs. (use + * with `externalReferenceSources` parameter) + * + * @return externalReferenceIds + **/ + public List getExternalReferenceIds() { + return externalReferenceIds; + } + + public void setExternalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; + } + + public BrAPIGermplasmAttributeSearchRequest externalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addExternalReferenceSourcesItem(String externalReferenceSourcesItem) { + if (this.externalReferenceSources == null) { + this.externalReferenceSources = new ArrayList(); + } + this.externalReferenceSources.add(externalReferenceSourcesItem); + return this; + } + + /** + * List of identifiers for the source system or database of an external + * reference (use with `externalReferenceIDs` parameter) + * + * @return externalReferenceSources + **/ + public List getExternalReferenceSources() { + return externalReferenceSources; + } + + public void setExternalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; + } + + public BrAPIGermplasmAttributeSearchRequest germplasmDbIds(List germplasmDbIds) { + this.germplasmDbIds = germplasmDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addGermplasmDbIdsItem(String germplasmDbIdsItem) { + if (this.germplasmDbIds == null) { + this.germplasmDbIds = new ArrayList(); + } + this.germplasmDbIds.add(germplasmDbIdsItem); + return this; + } + + /** + * List of IDs which uniquely identify germplasm to search for + * + * @return germplasmDbIds + **/ + public List getGermplasmDbIds() { + return germplasmDbIds; + } + + public void setGermplasmDbIds(List germplasmDbIds) { + this.germplasmDbIds = germplasmDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest germplasmNames(List germplasmNames) { + this.germplasmNames = germplasmNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addGermplasmNamesItem(String germplasmNamesItem) { + if (this.germplasmNames == null) { + this.germplasmNames = new ArrayList(); + } + this.germplasmNames.add(germplasmNamesItem); + return this; + } + + /** + * List of human readable names to identify germplasm to search for + * + * @return germplasmNames + **/ + public List getGermplasmNames() { + return germplasmNames; + } + + public void setGermplasmNames(List germplasmNames) { + this.germplasmNames = germplasmNames; + } + + public BrAPIGermplasmAttributeSearchRequest methodDbIds(List methodDbIds) { + this.methodDbIds = methodDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addMethodDbIdsItem(String methodDbIdsItem) { + if (this.methodDbIds == null) { + this.methodDbIds = new ArrayList(); + } + this.methodDbIds.add(methodDbIdsItem); + return this; + } + + /** + * List of methods to filter search results + * + * @return methodDbIds + **/ + public List getMethodDbIds() { + return methodDbIds; + } + + public void setMethodDbIds(List methodDbIds) { + this.methodDbIds = methodDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest methodNames(List methodNames) { + this.methodNames = methodNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addMethodNamesItem(String methodNamesItem) { + if (this.methodNames == null) { + this.methodNames = new ArrayList(); + } + this.methodNames.add(methodNamesItem); + return this; + } + + /** + * Human readable name for the method <br/>MIAPPE V1.1 (DM-88) Method Name + * of the method of observation + * + * @return methodNames + **/ + public List getMethodNames() { + return methodNames; + } + + public void setMethodNames(List methodNames) { + this.methodNames = methodNames; + } + + public BrAPIGermplasmAttributeSearchRequest methodPUIs(List methodPUIs) { + this.methodPUIs = methodPUIs; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addMethodPUIsItem(String methodPUIsItem) { + if (this.methodPUIs == null) { + this.methodPUIs = new ArrayList(); + } + this.methodPUIs.add(methodPUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Method, usually in the form of a URI + * + * @return methodPUIs + **/ + public List getMethodPUIs() { + return methodPUIs; + } + + public void setMethodPUIs(List methodPUIs) { + this.methodPUIs = methodPUIs; + } + + public BrAPIGermplasmAttributeSearchRequest ontologyDbIds(List ontologyDbIds) { + this.ontologyDbIds = ontologyDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addOntologyDbIdsItem(String ontologyDbIdsItem) { + if (this.ontologyDbIds == null) { + this.ontologyDbIds = new ArrayList(); + } + this.ontologyDbIds.add(ontologyDbIdsItem); + return this; + } + + /** + * List of ontology IDs to search for + * + * @return ontologyDbIds + **/ + public List getOntologyDbIds() { + return ontologyDbIds; + } + + public void setOntologyDbIds(List ontologyDbIds) { + this.ontologyDbIds = ontologyDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest programDbIds(List programDbIds) { + this.programDbIds = programDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addProgramDbIdsItem(String programDbIdsItem) { + if (this.programDbIds == null) { + this.programDbIds = new ArrayList(); + } + this.programDbIds.add(programDbIdsItem); + return this; + } + + /** + * A BrAPI Program represents the high level organization or group who is + * responsible for conducting trials and studies. Things like Breeding Programs + * and Funded Projects are considered BrAPI Programs. Use this parameter to only + * return results associated with the given programs. Use `GET + * /programs` to find the list of available programs on a server. + * + * @return programDbIds + **/ + public List getProgramDbIds() { + return programDbIds; + } + + public void setProgramDbIds(List programDbIds) { + this.programDbIds = programDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest programNames(List programNames) { + this.programNames = programNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addProgramNamesItem(String programNamesItem) { + if (this.programNames == null) { + this.programNames = new ArrayList(); + } + this.programNames.add(programNamesItem); + return this; + } + + /** + * Use this parameter to only return results associated with the given program + * names. Program names are not required to be unique. Use `GET + * /programs` to find the list of available programs on a server. + * + * @return programNames + **/ + public List getProgramNames() { + return programNames; + } + + public void setProgramNames(List programNames) { + this.programNames = programNames; + } + + public BrAPIGermplasmAttributeSearchRequest scaleDbIds(List scaleDbIds) { + this.scaleDbIds = scaleDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addScaleDbIdsItem(String scaleDbIdsItem) { + if (this.scaleDbIds == null) { + this.scaleDbIds = new ArrayList(); + } + this.scaleDbIds.add(scaleDbIdsItem); + return this; + } + + /** + * The unique identifier for a Scale + * + * @return scaleDbIds + **/ + public List getScaleDbIds() { + return scaleDbIds; + } + + public void setScaleDbIds(List scaleDbIds) { + this.scaleDbIds = scaleDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest scaleNames(List scaleNames) { + this.scaleNames = scaleNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addScaleNamesItem(String scaleNamesItem) { + if (this.scaleNames == null) { + this.scaleNames = new ArrayList(); + } + this.scaleNames.add(scaleNamesItem); + return this; + } + + /** + * Name of the scale <br/>MIAPPE V1.1 (DM-92) Scale Name of the scale + * associated with the variable + * + * @return scaleNames + **/ + public List getScaleNames() { + return scaleNames; + } + + public void setScaleNames(List scaleNames) { + this.scaleNames = scaleNames; + } + + public BrAPIGermplasmAttributeSearchRequest scalePUIs(List scalePUIs) { + this.scalePUIs = scalePUIs; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addScalePUIsItem(String scalePUIsItem) { + if (this.scalePUIs == null) { + this.scalePUIs = new ArrayList(); + } + this.scalePUIs.add(scalePUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Scale, usually in the form of a URI + * + * @return scalePUIs + **/ + public List getScalePUIs() { + return scalePUIs; + } + + public void setScalePUIs(List scalePUIs) { + this.scalePUIs = scalePUIs; + } + + @Deprecated + public BrAPIGermplasmAttributeSearchRequest studyDbId(List studyDbId) { + this.studyDbId = studyDbId; + return this; + } + + @Deprecated + public BrAPIGermplasmAttributeSearchRequest addStudyDbIdItem(String studyDbIdItem) { + if (this.studyDbId == null) { + this.studyDbId = new ArrayList(); + } + this.studyDbId.add(studyDbIdItem); + return this; + } + + /** + * **Deprecated in v2.1** Please use `studyDbIds`. Github issue number + * #483 <br>The unique ID of a studies to filter on + * + * @return studyDbId + **/ + @Deprecated + public List getStudyDbId() { + return studyDbId; + } + + @Deprecated + public void setStudyDbId(List studyDbId) { + this.studyDbId = studyDbId; + } + + public BrAPIGermplasmAttributeSearchRequest studyDbIds(List studyDbIds) { + this.studyDbIds = studyDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addStudyDbIdsItem(String studyDbIdsItem) { + if (this.studyDbIds == null) { + this.studyDbIds = new ArrayList(); + } + this.studyDbIds.add(studyDbIdsItem); + return this; + } + + /** + * List of study identifiers to search for + * + * @return studyDbIds + **/ + public List getStudyDbIds() { + return studyDbIds; + } + + public void setStudyDbIds(List studyDbIds) { + this.studyDbIds = studyDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest studyNames(List studyNames) { + this.studyNames = studyNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addStudyNamesItem(String studyNamesItem) { + if (this.studyNames == null) { + this.studyNames = new ArrayList(); + } + this.studyNames.add(studyNamesItem); + return this; + } + + /** + * List of study names to filter search results + * + * @return studyNames + **/ + public List getStudyNames() { + return studyNames; + } + + public void setStudyNames(List studyNames) { + this.studyNames = studyNames; + } + + public BrAPIGermplasmAttributeSearchRequest traitAttributePUIs(List traitAttributePUIs) { + this.traitAttributePUIs = traitAttributePUIs; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTraitAttributePUIsItem(String traitAttributePUIsItem) { + if (this.traitAttributePUIs == null) { + this.traitAttributePUIs = new ArrayList(); + } + this.traitAttributePUIs.add(traitAttributePUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Trait Attribute, usually in the form of + * a URI <br/>A trait can be decomposed as \"Trait\" = + * \"Entity\" + \"Attribute\", the attribute is the observed + * feature (or characteristic) of the entity e.g., for \"grain + * colour\", attribute = \"colour\" + * + * @return traitAttributePUIs + **/ + public List getTraitAttributePUIs() { + return traitAttributePUIs; + } + + public void setTraitAttributePUIs(List traitAttributePUIs) { + this.traitAttributePUIs = traitAttributePUIs; + } + + public BrAPIGermplasmAttributeSearchRequest traitAttributes(List traitAttributes) { + this.traitAttributes = traitAttributes; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTraitAttributesItem(String traitAttributesItem) { + if (this.traitAttributes == null) { + this.traitAttributes = new ArrayList(); + } + this.traitAttributes.add(traitAttributesItem); + return this; + } + + /** + * A trait can be decomposed as \"Trait\" = \"Entity\" + * + \"Attribute\", the attribute is the observed feature (or + * characteristic) of the entity e.g., for \"grain colour\", attribute + * = \"colour\" + * + * @return traitAttributes + **/ + public List getTraitAttributes() { + return traitAttributes; + } + + public void setTraitAttributes(List traitAttributes) { + this.traitAttributes = traitAttributes; + } + + public BrAPIGermplasmAttributeSearchRequest traitClasses(List traitClasses) { + this.traitClasses = traitClasses; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTraitClassesItem(String traitClassesItem) { + if (this.traitClasses == null) { + this.traitClasses = new ArrayList(); + } + this.traitClasses.add(traitClassesItem); + return this; + } + + /** + * List of trait classes to filter search results + * + * @return traitClasses + **/ + public List getTraitClasses() { + return traitClasses; + } + + public void setTraitClasses(List traitClasses) { + this.traitClasses = traitClasses; + } + + public BrAPIGermplasmAttributeSearchRequest traitDbIds(List traitDbIds) { + this.traitDbIds = traitDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTraitDbIdsItem(String traitDbIdsItem) { + if (this.traitDbIds == null) { + this.traitDbIds = new ArrayList(); + } + this.traitDbIds.add(traitDbIdsItem); + return this; + } + + /** + * The unique identifier for a Trait + * + * @return traitDbIds + **/ + public List getTraitDbIds() { + return traitDbIds; + } + + public void setTraitDbIds(List traitDbIds) { + this.traitDbIds = traitDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest traitEntities(List traitEntities) { + this.traitEntities = traitEntities; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTraitEntitiesItem(String traitEntitiesItem) { + if (this.traitEntities == null) { + this.traitEntities = new ArrayList(); + } + this.traitEntities.add(traitEntitiesItem); + return this; + } + + /** + * A trait can be decomposed as \"Trait\" = \"Entity\" + * + \"Attribute\", the entity is the part of the plant that the trait + * refers to e.g., for \"grain colour\", entity = + * \"grain\" + * + * @return traitEntities + **/ + public List getTraitEntities() { + return traitEntities; + } + + public void setTraitEntities(List traitEntities) { + this.traitEntities = traitEntities; + } + + public BrAPIGermplasmAttributeSearchRequest traitEntityPUIs(List traitEntityPUIs) { + this.traitEntityPUIs = traitEntityPUIs; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTraitEntityPUIsItem(String traitEntityPUIsItem) { + if (this.traitEntityPUIs == null) { + this.traitEntityPUIs = new ArrayList(); + } + this.traitEntityPUIs.add(traitEntityPUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Trait Entity, usually in the form of a + * URI <br/>A trait can be decomposed as \"Trait\" = + * \"Entity\" + \"Attribute\", the entity is the part of the + * plant that the trait refers to e.g., for \"grain colour\", entity + * = \"grain\" + * + * @return traitEntityPUIs + **/ + public List getTraitEntityPUIs() { + return traitEntityPUIs; + } + + public void setTraitEntityPUIs(List traitEntityPUIs) { + this.traitEntityPUIs = traitEntityPUIs; + } + + public BrAPIGermplasmAttributeSearchRequest traitNames(List traitNames) { + this.traitNames = traitNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTraitNamesItem(String traitNamesItem) { + if (this.traitNames == null) { + this.traitNames = new ArrayList(); + } + this.traitNames.add(traitNamesItem); + return this; + } + + /** + * The human readable name of a trait <br/>MIAPPE V1.1 (DM-86) Trait - + * Name of the (plant or environmental) trait under observation + * + * @return traitNames + **/ + public List getTraitNames() { + return traitNames; + } + + public void setTraitNames(List traitNames) { + this.traitNames = traitNames; + } + + public BrAPIGermplasmAttributeSearchRequest traitPUIs(List traitPUIs) { + this.traitPUIs = traitPUIs; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTraitPUIsItem(String traitPUIsItem) { + if (this.traitPUIs == null) { + this.traitPUIs = new ArrayList(); + } + this.traitPUIs.add(traitPUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Trait, usually in the form of a URI + * + * @return traitPUIs + **/ + public List getTraitPUIs() { + return traitPUIs; + } + + public void setTraitPUIs(List traitPUIs) { + this.traitPUIs = traitPUIs; + } + + public BrAPIGermplasmAttributeSearchRequest trialDbIds(List trialDbIds) { + this.trialDbIds = trialDbIds; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTrialDbIdsItem(String trialDbIdsItem) { + if (this.trialDbIds == null) { + this.trialDbIds = new ArrayList(); + } + this.trialDbIds.add(trialDbIdsItem); + return this; + } + + /** + * The ID which uniquely identifies a trial to search for + * + * @return trialDbIds + **/ + public List getTrialDbIds() { + return trialDbIds; + } + + public void setTrialDbIds(List trialDbIds) { + this.trialDbIds = trialDbIds; + } + + public BrAPIGermplasmAttributeSearchRequest trialNames(List trialNames) { + this.trialNames = trialNames; + return this; + } + + public BrAPIGermplasmAttributeSearchRequest addTrialNamesItem(String trialNamesItem) { + if (this.trialNames == null) { + this.trialNames = new ArrayList(); + } + this.trialNames.add(trialNamesItem); + return this; + } + + /** + * The human readable name of a trial to search for + * + * @return trialNames + **/ + public List getTrialNames() { + return trialNames; + } + + public void setTrialNames(List trialNames) { + this.trialNames = trialNames; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIGermplasmAttributeSearchRequest germplasmAttributeSearchRequest = (BrAPIGermplasmAttributeSearchRequest) o; + return Objects.equals(this.attributeCategories, germplasmAttributeSearchRequest.attributeCategories) + && Objects.equals(this.attributeDbIds, germplasmAttributeSearchRequest.attributeDbIds) + && Objects.equals(this.attributeNames, germplasmAttributeSearchRequest.attributeNames) + && Objects.equals(this.attributePUIs, germplasmAttributeSearchRequest.attributePUIs) + && Objects.equals(this.commonCropNames, germplasmAttributeSearchRequest.commonCropNames) + && Objects.equals(this.dataTypes, germplasmAttributeSearchRequest.dataTypes) + && Objects.equals(this.externalReferenceIDs, germplasmAttributeSearchRequest.externalReferenceIDs) + && Objects.equals(this.externalReferenceIds, germplasmAttributeSearchRequest.externalReferenceIds) + && Objects.equals(this.externalReferenceSources, + germplasmAttributeSearchRequest.externalReferenceSources) + && Objects.equals(this.germplasmDbIds, germplasmAttributeSearchRequest.germplasmDbIds) + && Objects.equals(this.germplasmNames, germplasmAttributeSearchRequest.germplasmNames) + && Objects.equals(this.methodDbIds, germplasmAttributeSearchRequest.methodDbIds) + && Objects.equals(this.methodNames, germplasmAttributeSearchRequest.methodNames) + && Objects.equals(this.methodPUIs, germplasmAttributeSearchRequest.methodPUIs) + && Objects.equals(this.ontologyDbIds, germplasmAttributeSearchRequest.ontologyDbIds) + && Objects.equals(this.programDbIds, germplasmAttributeSearchRequest.programDbIds) + && Objects.equals(this.programNames, germplasmAttributeSearchRequest.programNames) + && Objects.equals(this.scaleDbIds, germplasmAttributeSearchRequest.scaleDbIds) + && Objects.equals(this.scaleNames, germplasmAttributeSearchRequest.scaleNames) + && Objects.equals(this.scalePUIs, germplasmAttributeSearchRequest.scalePUIs) + && Objects.equals(this.studyDbId, germplasmAttributeSearchRequest.studyDbId) + && Objects.equals(this.studyDbIds, germplasmAttributeSearchRequest.studyDbIds) + && Objects.equals(this.studyNames, germplasmAttributeSearchRequest.studyNames) + && Objects.equals(this.traitAttributePUIs, germplasmAttributeSearchRequest.traitAttributePUIs) + && Objects.equals(this.traitAttributes, germplasmAttributeSearchRequest.traitAttributes) + && Objects.equals(this.traitClasses, germplasmAttributeSearchRequest.traitClasses) + && Objects.equals(this.traitDbIds, germplasmAttributeSearchRequest.traitDbIds) + && Objects.equals(this.traitEntities, germplasmAttributeSearchRequest.traitEntities) + && Objects.equals(this.traitEntityPUIs, germplasmAttributeSearchRequest.traitEntityPUIs) + && Objects.equals(this.traitNames, germplasmAttributeSearchRequest.traitNames) + && Objects.equals(this.traitPUIs, germplasmAttributeSearchRequest.traitPUIs) + && Objects.equals(this.trialDbIds, germplasmAttributeSearchRequest.trialDbIds) + && Objects.equals(this.trialNames, germplasmAttributeSearchRequest.trialNames); + } + + @Override + public int hashCode() { + return Objects.hash(attributeCategories, attributeDbIds, attributeNames, attributePUIs, commonCropNames, + dataTypes, externalReferenceIDs, externalReferenceIds, externalReferenceSources, germplasmDbIds, + germplasmNames, methodDbIds, methodNames, methodPUIs, ontologyDbIds, programDbIds, programNames, + scaleDbIds, scaleNames, scalePUIs, studyDbId, studyDbIds, studyNames, traitAttributePUIs, + traitAttributes, traitClasses, traitDbIds, traitEntities, traitEntityPUIs, traitNames, traitPUIs, + trialDbIds, trialNames); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BrAPIGermplasmAttributeSearchRequest {\n"); + + sb.append(" attributeCategories: ").append(toIndentedString(attributeCategories)).append("\n"); + sb.append(" attributeDbIds: ").append(toIndentedString(attributeDbIds)).append("\n"); + sb.append(" attributeNames: ").append(toIndentedString(attributeNames)).append("\n"); + sb.append(" attributePUIs: ").append(toIndentedString(attributePUIs)).append("\n"); + sb.append(" commonCropNames: ").append(toIndentedString(commonCropNames)).append("\n"); + sb.append(" dataTypes: ").append(toIndentedString(dataTypes)).append("\n"); + sb.append(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); + sb.append(" externalReferenceIds: ").append(toIndentedString(externalReferenceIds)).append("\n"); + sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); + sb.append(" germplasmDbIds: ").append(toIndentedString(germplasmDbIds)).append("\n"); + sb.append(" germplasmNames: ").append(toIndentedString(germplasmNames)).append("\n"); + sb.append(" methodDbIds: ").append(toIndentedString(methodDbIds)).append("\n"); + sb.append(" methodNames: ").append(toIndentedString(methodNames)).append("\n"); + sb.append(" methodPUIs: ").append(toIndentedString(methodPUIs)).append("\n"); + sb.append(" ontologyDbIds: ").append(toIndentedString(ontologyDbIds)).append("\n"); + sb.append(" programDbIds: ").append(toIndentedString(programDbIds)).append("\n"); + sb.append(" programNames: ").append(toIndentedString(programNames)).append("\n"); + sb.append(" scaleDbIds: ").append(toIndentedString(scaleDbIds)).append("\n"); + sb.append(" scaleNames: ").append(toIndentedString(scaleNames)).append("\n"); + sb.append(" scalePUIs: ").append(toIndentedString(scalePUIs)).append("\n"); + sb.append(" studyDbId: ").append(toIndentedString(studyDbId)).append("\n"); + sb.append(" studyDbIds: ").append(toIndentedString(studyDbIds)).append("\n"); + sb.append(" studyNames: ").append(toIndentedString(studyNames)).append("\n"); + sb.append(" traitAttributePUIs: ").append(toIndentedString(traitAttributePUIs)).append("\n"); + sb.append(" traitAttributes: ").append(toIndentedString(traitAttributes)).append("\n"); + sb.append(" traitClasses: ").append(toIndentedString(traitClasses)).append("\n"); + sb.append(" traitDbIds: ").append(toIndentedString(traitDbIds)).append("\n"); + sb.append(" traitEntities: ").append(toIndentedString(traitEntities)).append("\n"); + sb.append(" traitEntityPUIs: ").append(toIndentedString(traitEntityPUIs)).append("\n"); + sb.append(" traitNames: ").append(toIndentedString(traitNames)).append("\n"); + sb.append(" traitPUIs: ").append(toIndentedString(traitPUIs)).append("\n"); + sb.append(" trialDbIds: ").append(toIndentedString(trialDbIds)).append("\n"); + sb.append(" trialNames: ").append(toIndentedString(trialNames)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } -public class BrAPIGermplasmAttributeSearchRequest extends BrAPISearchRequestParametersPaging { - @JsonProperty("externalReferenceIDs") - @Valid - private List externalReferenceIDs = null; - - @JsonProperty("externalReferenceSources") - @Valid - private List externalReferenceSources = null; - - @JsonProperty("attributeDbIds") - @Valid - private List attributeDbIds = null; - - @JsonProperty("attributeNames") - @Valid - private List attributeNames = null; - - @JsonProperty("dataTypes") - @Valid - private List dataTypes = null; - - @JsonProperty("methodDbIds") - @Valid - private List methodDbIds = null; - - @JsonProperty("ontologyDbIds") - @Valid - private List ontologyDbIds = null; - - @JsonProperty("scaleDbIds") - @Valid - private List scaleDbIds = null; - - @JsonProperty("studyDbId") - @Valid - private List studyDbId = null; - - @JsonProperty("traitClasses") - @Valid - private List traitClasses = null; - - @JsonProperty("traitDbIds") - @Valid - private List traitDbIds = null; - - public BrAPIGermplasmAttributeSearchRequest externalReferenceIDs(List externalReferenceIDs) { - this.externalReferenceIDs = externalReferenceIDs; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addExternalReferenceIDsItem(String externalReferenceIDsItem) { - if (this.externalReferenceIDs == null) { - this.externalReferenceIDs = new ArrayList(); - } - this.externalReferenceIDs.add(externalReferenceIDsItem); - return this; - } - - /** - * List of external references for the trait to search for - * @return externalReferenceIDs - **/ - - - public List getExternalReferenceIDs() { - return externalReferenceIDs; - } - - public void setExternalReferenceIDs(List externalReferenceIDs) { - this.externalReferenceIDs = externalReferenceIDs; - } - - public BrAPIGermplasmAttributeSearchRequest externalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addExternalReferenceSourcesItem(String externalReferenceSourcesItem) { - if (this.externalReferenceSources == null) { - this.externalReferenceSources = new ArrayList(); - } - this.externalReferenceSources.add(externalReferenceSourcesItem); - return this; - } - - /** - * List of external references sources for the trait to search for - * @return externalReferenceSources - **/ - - - public List getExternalReferenceSources() { - return externalReferenceSources; - } - - public void setExternalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; - } - - public BrAPIGermplasmAttributeSearchRequest attributeDbIds(List attributeDbIds) { - this.attributeDbIds = attributeDbIds; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addAttributeDbIdsItem(String attributeDbIdsItem) { - if (this.attributeDbIds == null) { - this.attributeDbIds = new ArrayList(); - } - this.attributeDbIds.add(attributeDbIdsItem); - return this; - } - - /** - * List of Germplasm Attribute IDs to search for - * @return attributeDbIds - **/ - - - public List getAttributeDbIds() { - return attributeDbIds; - } - - public void setAttributeDbIds(List attributeDbIds) { - this.attributeDbIds = attributeDbIds; - } - - public BrAPIGermplasmAttributeSearchRequest attributeNames(List attributeNames) { - this.attributeNames = attributeNames; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addAttributeNamesItem(String attributeNamesItem) { - if (this.attributeNames == null) { - this.attributeNames = new ArrayList(); - } - this.attributeNames.add(attributeNamesItem); - return this; - } - - /** - * List of human readable Germplasm Attribute names to search for - * @return attributeNames - **/ - - - public List getAttributeNames() { - return attributeNames; - } - - public void setAttributeNames(List attributeNames) { - this.attributeNames = attributeNames; - } - - public BrAPIGermplasmAttributeSearchRequest dataTypes(List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addDataTypesItem(BrAPITraitDataType dataTypesItem) { - if (this.dataTypes == null) { - this.dataTypes = new ArrayList(); - } - this.dataTypes.add(dataTypesItem); - return this; - } - - /** - * List of scale data types to filter search results - * @return dataTypes - **/ - - @Valid - public List getDataTypes() { - return dataTypes; - } - - public void setDataTypes(List dataTypes) { - this.dataTypes = dataTypes; - } - - public BrAPIGermplasmAttributeSearchRequest methodDbIds(List methodDbIds) { - this.methodDbIds = methodDbIds; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addMethodDbIdsItem(String methodDbIdsItem) { - if (this.methodDbIds == null) { - this.methodDbIds = new ArrayList(); - } - this.methodDbIds.add(methodDbIdsItem); - return this; - } - - /** - * List of methods to filter search results - * @return methodDbIds - **/ - - - public List getMethodDbIds() { - return methodDbIds; - } - - public void setMethodDbIds(List methodDbIds) { - this.methodDbIds = methodDbIds; - } - - public BrAPIGermplasmAttributeSearchRequest ontologyDbIds(List ontologyDbIds) { - this.ontologyDbIds = ontologyDbIds; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addOntologyDbIdsItem(String ontologyDbIdsItem) { - if (this.ontologyDbIds == null) { - this.ontologyDbIds = new ArrayList(); - } - this.ontologyDbIds.add(ontologyDbIdsItem); - return this; - } - - /** - * List of ontology IDs to search for - * @return ontologyDbIds - **/ - - - public List getOntologyDbIds() { - return ontologyDbIds; - } - - public void setOntologyDbIds(List ontologyDbIds) { - this.ontologyDbIds = ontologyDbIds; - } - - public BrAPIGermplasmAttributeSearchRequest scaleDbIds(List scaleDbIds) { - this.scaleDbIds = scaleDbIds; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addScaleDbIdsItem(String scaleDbIdsItem) { - if (this.scaleDbIds == null) { - this.scaleDbIds = new ArrayList(); - } - this.scaleDbIds.add(scaleDbIdsItem); - return this; - } - - /** - * List of scales to filter search results - * @return scaleDbIds - **/ - - - public List getScaleDbIds() { - return scaleDbIds; - } - - public void setScaleDbIds(List scaleDbIds) { - this.scaleDbIds = scaleDbIds; - } - - public BrAPIGermplasmAttributeSearchRequest studyDbId(List studyDbId) { - this.studyDbId = studyDbId; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addStudyDbIdItem(String studyDbIdItem) { - if (this.studyDbId == null) { - this.studyDbId = new ArrayList(); - } - this.studyDbId.add(studyDbIdItem); - return this; - } - - /** - * The unique ID of a studies to filter on - * @return studyDbId - **/ - - - public List getStudyDbId() { - return studyDbId; - } - - public void setStudyDbId(List studyDbId) { - this.studyDbId = studyDbId; - } - - public BrAPIGermplasmAttributeSearchRequest traitClasses(List traitClasses) { - this.traitClasses = traitClasses; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addTraitClassesItem(String traitClassesItem) { - if (this.traitClasses == null) { - this.traitClasses = new ArrayList(); - } - this.traitClasses.add(traitClassesItem); - return this; - } - - /** - * List of trait classes to filter search results - * @return traitClasses - **/ - - - public List getTraitClasses() { - return traitClasses; - } - - public void setTraitClasses(List traitClasses) { - this.traitClasses = traitClasses; - } - - public BrAPIGermplasmAttributeSearchRequest traitDbIds(List traitDbIds) { - this.traitDbIds = traitDbIds; - return this; - } - - public BrAPIGermplasmAttributeSearchRequest addTraitDbIdsItem(String traitDbIdsItem) { - if (this.traitDbIds == null) { - this.traitDbIds = new ArrayList(); - } - this.traitDbIds.add(traitDbIdsItem); - return this; - } - - /** - * List of trait unique ID to filter search results - * @return traitDbIds - **/ - - - public List getTraitDbIds() { - return traitDbIds; - } - - public void setTraitDbIds(List traitDbIds) { - this.traitDbIds = traitDbIds; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIGermplasmAttributeSearchRequest germplasmAttributeSearchRequest = (BrAPIGermplasmAttributeSearchRequest) o; - return Objects.equals(this.externalReferenceIDs, germplasmAttributeSearchRequest.externalReferenceIDs) && - Objects.equals(this.externalReferenceSources, germplasmAttributeSearchRequest.externalReferenceSources) && - Objects.equals(this.attributeDbIds, germplasmAttributeSearchRequest.attributeDbIds) && - Objects.equals(this.attributeNames, germplasmAttributeSearchRequest.attributeNames) && - Objects.equals(this.dataTypes, germplasmAttributeSearchRequest.dataTypes) && - Objects.equals(this.methodDbIds, germplasmAttributeSearchRequest.methodDbIds) && - Objects.equals(this.ontologyDbIds, germplasmAttributeSearchRequest.ontologyDbIds) && - Objects.equals(this.scaleDbIds, germplasmAttributeSearchRequest.scaleDbIds) && - Objects.equals(this.studyDbId, germplasmAttributeSearchRequest.studyDbId) && - Objects.equals(this.traitClasses, germplasmAttributeSearchRequest.traitClasses) && - Objects.equals(this.traitDbIds, germplasmAttributeSearchRequest.traitDbIds) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(externalReferenceIDs, externalReferenceSources, attributeDbIds, attributeNames, dataTypes, methodDbIds, ontologyDbIds, scaleDbIds, studyDbId, traitClasses, traitDbIds, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GermplasmAttributeSearchRequest {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); - sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); - sb.append(" attributeDbIds: ").append(toIndentedString(attributeDbIds)).append("\n"); - sb.append(" attributeNames: ").append(toIndentedString(attributeNames)).append("\n"); - sb.append(" dataTypes: ").append(toIndentedString(dataTypes)).append("\n"); - sb.append(" methodDbIds: ").append(toIndentedString(methodDbIds)).append("\n"); - sb.append(" ontologyDbIds: ").append(toIndentedString(ontologyDbIds)).append("\n"); - sb.append(" scaleDbIds: ").append(toIndentedString(scaleDbIds)).append("\n"); - sb.append(" studyDbId: ").append(toIndentedString(studyDbId)).append("\n"); - sb.append(" traitClasses: ").append(toIndentedString(traitClasses)).append("\n"); - sb.append(" traitDbIds: ").append(toIndentedString(traitDbIds)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/request/BrAPIGermplasmSearchRequest.java b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/request/BrAPIGermplasmSearchRequest.java index 13d73ebb..220288da 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/germ/request/BrAPIGermplasmSearchRequest.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/germ/request/BrAPIGermplasmSearchRequest.java @@ -6,546 +6,816 @@ import java.util.ArrayList; import java.util.List; -import javax.validation.Valid; - import org.brapi.v2.model.BrAPISearchRequestParametersPaging; /** - * GermplasmSearchRequest + * BrAPIGermplasmSearchRequest */ +public class BrAPIGermplasmSearchRequest extends BrAPISearchRequestParametersPaging { + @JsonProperty("accessionNumbers") + private List accessionNumbers = null; + + @JsonProperty("binomialNames") + private List binomialNames = null; + + @JsonProperty("collections") + private List collections = null; + + @JsonProperty("commonCropNames") + private List commonCropNames = null; + + @Deprecated + @JsonProperty("externalReferenceIDs") + private List externalReferenceIDs = null; + + @JsonProperty("externalReferenceIds") + private List externalReferenceIds = null; + + @JsonProperty("externalReferenceSources") + private List externalReferenceSources = null; + + @JsonProperty("familyCodes") + private List familyCodes = null; + + @JsonProperty("genus") + private List genus = null; + + @JsonProperty("germplasmDbIds") + private List germplasmDbIds = null; + + @JsonProperty("germplasmNames") + private List germplasmNames = null; + + @JsonProperty("germplasmPUIs") + private List germplasmPUIs = null; + + @JsonProperty("instituteCodes") + private List instituteCodes = null; + + @JsonProperty("parentDbIds") + private List parentDbIds = null; + + @JsonProperty("progenyDbIds") + private List progenyDbIds = null; + + @JsonProperty("programDbIds") + private List programDbIds = null; + + @JsonProperty("programNames") + private List programNames = null; + + @JsonProperty("species") + private List species = null; + + @JsonProperty("studyDbIds") + private List studyDbIds = null; + + @JsonProperty("studyNames") + private List studyNames = null; + + @JsonProperty("synonyms") + private List synonyms = null; + + @JsonProperty("trialDbIds") + private List trialDbIds = null; + + @JsonProperty("trialNames") + private List trialNames = null; + + public BrAPIGermplasmSearchRequest accessionNumbers(List accessionNumbers) { + this.accessionNumbers = accessionNumbers; + return this; + } + + public BrAPIGermplasmSearchRequest addAccessionNumbersItem(String accessionNumbersItem) { + if (this.accessionNumbers == null) { + this.accessionNumbers = new ArrayList(); + } + this.accessionNumbers.add(accessionNumbersItem); + return this; + } + + /** + * A collection of unique identifiers for materials or germplasm within a + * genebank MCPD (v2.1) (ACCENUMB) 2. This is the unique identifier for + * accessions within a genebank, and is assigned when a sample is entered into + * the genebank collection (e.g. \"PI 113869\"). + * + * @return accessionNumbers + **/ + + public List getAccessionNumbers() { + return accessionNumbers; + } + + public void setAccessionNumbers(List accessionNumbers) { + this.accessionNumbers = accessionNumbers; + } + + public BrAPIGermplasmSearchRequest binomialNames(List binomialNames) { + this.binomialNames = binomialNames; + return this; + } + + public BrAPIGermplasmSearchRequest addBinomialNamesItem(String binomialNamesItem) { + if (this.binomialNames == null) { + this.binomialNames = new ArrayList(); + } + this.binomialNames.add(binomialNamesItem); + return this; + } + + /** + * List of the full binomial name (scientific name) to identify a germplasm + * + * @return binomialNames + **/ + + public List getBinomialNames() { + return binomialNames; + } + + public void setBinomialNames(List binomialNames) { + this.binomialNames = binomialNames; + } + + public BrAPIGermplasmSearchRequest collections(List collections) { + this.collections = collections; + return this; + } + + public BrAPIGermplasmSearchRequest addCollectionsItem(String collectionsItem) { + if (this.collections == null) { + this.collections = new ArrayList(); + } + this.collections.add(collectionsItem); + return this; + } + + /** + * A specific panel/collection/population name this germplasm belongs to. + * + * @return collections + **/ + + public List getCollections() { + return collections; + } + + public void setCollections(List collections) { + this.collections = collections; + } + + public BrAPIGermplasmSearchRequest commonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + return this; + } + + public BrAPIGermplasmSearchRequest addCommonCropNamesItem(String commonCropNamesItem) { + if (this.commonCropNames == null) { + this.commonCropNames = new ArrayList(); + } + this.commonCropNames.add(commonCropNamesItem); + return this; + } + + /** + * The BrAPI Common Crop Name is the simple, generalized, widely accepted name + * of the organism being researched. It is most often used in multi-crop systems + * where digital resources need to be divided at a high level. Things like + * 'Maize', 'Wheat', and 'Rice' are examples of + * common crop names. Use this parameter to only return results associated with + * the given crops. Use `GET /commoncropnames` to find the list of + * available crops on a server. + * + * @return commonCropNames + **/ + + public List getCommonCropNames() { + return commonCropNames; + } + + public void setCommonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + } + + @Deprecated + public BrAPIGermplasmSearchRequest externalReferenceIDs(List externalReferenceIDs) { + this.externalReferenceIDs = externalReferenceIDs; + return this; + } + + @Deprecated + public BrAPIGermplasmSearchRequest addExternalReferenceIDsItem(String externalReferenceIDsItem) { + if (this.externalReferenceIDs == null) { + this.externalReferenceIDs = new ArrayList(); + } + this.externalReferenceIDs.add(externalReferenceIDsItem); + return this; + } + + /** + * **Deprecated in v2.1** Please use `externalReferenceIds`. Github + * issue number #460 <br>List of external reference IDs. Could be a simple + * strings or a URIs. (use with `externalReferenceSources` parameter) + * + * @return externalReferenceIDs + **/ + + @Deprecated + public List getExternalReferenceIDs() { + return externalReferenceIDs; + } + + @Deprecated + public void setExternalReferenceIDs(List externalReferenceIDs) { + this.externalReferenceIDs = externalReferenceIDs; + } + + public BrAPIGermplasmSearchRequest externalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; + return this; + } + + public BrAPIGermplasmSearchRequest addExternalReferenceIdsItem(String externalReferenceIdsItem) { + if (this.externalReferenceIds == null) { + this.externalReferenceIds = new ArrayList(); + } + this.externalReferenceIds.add(externalReferenceIdsItem); + return this; + } + + /** + * List of external reference IDs. Could be a simple strings or a URIs. (use + * with `externalReferenceSources` parameter) + * + * @return externalReferenceIds + **/ + + public List getExternalReferenceIds() { + return externalReferenceIds; + } + + public void setExternalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; + } + + public BrAPIGermplasmSearchRequest externalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; + return this; + } + + public BrAPIGermplasmSearchRequest addExternalReferenceSourcesItem(String externalReferenceSourcesItem) { + if (this.externalReferenceSources == null) { + this.externalReferenceSources = new ArrayList(); + } + this.externalReferenceSources.add(externalReferenceSourcesItem); + return this; + } + + /** + * List of identifiers for the source system or database of an external + * reference (use with `externalReferenceIDs` parameter) + * + * @return externalReferenceSources + **/ + + public List getExternalReferenceSources() { + return externalReferenceSources; + } + + public void setExternalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; + } + + public BrAPIGermplasmSearchRequest familyCodes(List familyCodes) { + this.familyCodes = familyCodes; + return this; + } + + public BrAPIGermplasmSearchRequest addFamilyCodesItem(String familyCodesItem) { + if (this.familyCodes == null) { + this.familyCodes = new ArrayList(); + } + this.familyCodes.add(familyCodesItem); + return this; + } + + /** + * A familyCode representing the family this germplasm belongs to. + * + * @return familyCodes + **/ + + public List getFamilyCodes() { + return familyCodes; + } + + public void setFamilyCodes(List familyCodes) { + this.familyCodes = familyCodes; + } + + public BrAPIGermplasmSearchRequest genus(List genus) { + this.genus = genus; + return this; + } + + public BrAPIGermplasmSearchRequest addGenusItem(String genusItem) { + if (this.genus == null) { + this.genus = new ArrayList(); + } + this.genus.add(genusItem); + return this; + } + + /** + * List of Genus names to identify germplasm + * + * @return genus + **/ + + public List getGenus() { + return genus; + } + + public void setGenus(List genus) { + this.genus = genus; + } + + public BrAPIGermplasmSearchRequest germplasmDbIds(List germplasmDbIds) { + this.germplasmDbIds = germplasmDbIds; + return this; + } + + public BrAPIGermplasmSearchRequest addGermplasmDbIdsItem(String germplasmDbIdsItem) { + if (this.germplasmDbIds == null) { + this.germplasmDbIds = new ArrayList(); + } + this.germplasmDbIds.add(germplasmDbIdsItem); + return this; + } + + /** + * List of IDs which uniquely identify germplasm to search for + * + * @return germplasmDbIds + **/ + + public List getGermplasmDbIds() { + return germplasmDbIds; + } + + public void setGermplasmDbIds(List germplasmDbIds) { + this.germplasmDbIds = germplasmDbIds; + } + + public BrAPIGermplasmSearchRequest germplasmNames(List germplasmNames) { + this.germplasmNames = germplasmNames; + return this; + } + + public BrAPIGermplasmSearchRequest addGermplasmNamesItem(String germplasmNamesItem) { + if (this.germplasmNames == null) { + this.germplasmNames = new ArrayList(); + } + this.germplasmNames.add(germplasmNamesItem); + return this; + } + + /** + * List of human readable names to identify germplasm to search for + * + * @return germplasmNames + **/ + + public List getGermplasmNames() { + return germplasmNames; + } + + public void setGermplasmNames(List germplasmNames) { + this.germplasmNames = germplasmNames; + } + + public BrAPIGermplasmSearchRequest germplasmPUIs(List germplasmPUIs) { + this.germplasmPUIs = germplasmPUIs; + return this; + } + + public BrAPIGermplasmSearchRequest addGermplasmPUIsItem(String germplasmPUIsItem) { + if (this.germplasmPUIs == null) { + this.germplasmPUIs = new ArrayList(); + } + this.germplasmPUIs.add(germplasmPUIsItem); + return this; + } + + /** + * List of Permanent Unique Identifiers to identify germplasm + * + * @return germplasmPUIs + **/ + + public List getGermplasmPUIs() { + return germplasmPUIs; + } + + public void setGermplasmPUIs(List germplasmPUIs) { + this.germplasmPUIs = germplasmPUIs; + } + + public BrAPIGermplasmSearchRequest instituteCodes(List instituteCodes) { + this.instituteCodes = instituteCodes; + return this; + } + + public BrAPIGermplasmSearchRequest addInstituteCodesItem(String instituteCodesItem) { + if (this.instituteCodes == null) { + this.instituteCodes = new ArrayList(); + } + this.instituteCodes.add(instituteCodesItem); + return this; + } + + /** + * The code for the institute that maintains the material. <br/> MCPD + * (v2.1) (INSTCODE) 1. FAO WIEWS code of the institute where the accession is + * maintained. The codes consist of the 3-letter ISO 3166 country code of the + * country where the institute is located plus a number (e.g. PER001). The + * current set of institute codes is available from http://www.fao.org/wiews. + * For those institutes not yet having an FAO Code, or for those with + * \"obsolete\" codes, see \"Common formatting rules (v)\". + * + * @return instituteCodes + **/ + + public List getInstituteCodes() { + return instituteCodes; + } + + public void setInstituteCodes(List instituteCodes) { + this.instituteCodes = instituteCodes; + } + + public BrAPIGermplasmSearchRequest parentDbIds(List parentDbIds) { + this.parentDbIds = parentDbIds; + return this; + } + + public BrAPIGermplasmSearchRequest addParentDbIdsItem(String parentDbIdsItem) { + if (this.parentDbIds == null) { + this.parentDbIds = new ArrayList(); + } + this.parentDbIds.add(parentDbIdsItem); + return this; + } + + /** + * Search for Germplasm with these parents + * + * @return parentDbIds + **/ + + public List getParentDbIds() { + return parentDbIds; + } + + public void setParentDbIds(List parentDbIds) { + this.parentDbIds = parentDbIds; + } + + public BrAPIGermplasmSearchRequest progenyDbIds(List progenyDbIds) { + this.progenyDbIds = progenyDbIds; + return this; + } + + public BrAPIGermplasmSearchRequest addProgenyDbIdsItem(String progenyDbIdsItem) { + if (this.progenyDbIds == null) { + this.progenyDbIds = new ArrayList(); + } + this.progenyDbIds.add(progenyDbIdsItem); + return this; + } + + /** + * Search for Germplasm with these children + * + * @return progenyDbIds + **/ + + public List getProgenyDbIds() { + return progenyDbIds; + } + + public void setProgenyDbIds(List progenyDbIds) { + this.progenyDbIds = progenyDbIds; + } + + public BrAPIGermplasmSearchRequest programDbIds(List programDbIds) { + this.programDbIds = programDbIds; + return this; + } + + public BrAPIGermplasmSearchRequest addProgramDbIdsItem(String programDbIdsItem) { + if (this.programDbIds == null) { + this.programDbIds = new ArrayList(); + } + this.programDbIds.add(programDbIdsItem); + return this; + } + + /** + * A BrAPI Program represents the high level organization or group who is + * responsible for conducting trials and studies. Things like Breeding Programs + * and Funded Projects are considered BrAPI Programs. Use this parameter to only + * return results associated with the given programs. Use `GET + * /programs` to find the list of available programs on a server. + * + * @return programDbIds + **/ + + public List getProgramDbIds() { + return programDbIds; + } + + public void setProgramDbIds(List programDbIds) { + this.programDbIds = programDbIds; + } + + public BrAPIGermplasmSearchRequest programNames(List programNames) { + this.programNames = programNames; + return this; + } + + public BrAPIGermplasmSearchRequest addProgramNamesItem(String programNamesItem) { + if (this.programNames == null) { + this.programNames = new ArrayList(); + } + this.programNames.add(programNamesItem); + return this; + } + + /** + * Use this parameter to only return results associated with the given program + * names. Program names are not required to be unique. Use `GET + * /programs` to find the list of available programs on a server. + * + * @return programNames + **/ + + public List getProgramNames() { + return programNames; + } + + public void setProgramNames(List programNames) { + this.programNames = programNames; + } + + public BrAPIGermplasmSearchRequest species(List species) { + this.species = species; + return this; + } + + public BrAPIGermplasmSearchRequest addSpeciesItem(String speciesItem) { + if (this.species == null) { + this.species = new ArrayList(); + } + this.species.add(speciesItem); + return this; + } + + /** + * List of Species names to identify germplasm + * + * @return species + **/ + + public List getSpecies() { + return species; + } + + public void setSpecies(List species) { + this.species = species; + } + + public BrAPIGermplasmSearchRequest studyDbIds(List studyDbIds) { + this.studyDbIds = studyDbIds; + return this; + } + + public BrAPIGermplasmSearchRequest addStudyDbIdsItem(String studyDbIdsItem) { + if (this.studyDbIds == null) { + this.studyDbIds = new ArrayList(); + } + this.studyDbIds.add(studyDbIdsItem); + return this; + } + + /** + * List of study identifiers to search for + * + * @return studyDbIds + **/ + + public List getStudyDbIds() { + return studyDbIds; + } + + public void setStudyDbIds(List studyDbIds) { + this.studyDbIds = studyDbIds; + } + + public BrAPIGermplasmSearchRequest studyNames(List studyNames) { + this.studyNames = studyNames; + return this; + } + + public BrAPIGermplasmSearchRequest addStudyNamesItem(String studyNamesItem) { + if (this.studyNames == null) { + this.studyNames = new ArrayList(); + } + this.studyNames.add(studyNamesItem); + return this; + } + + /** + * List of study names to filter search results + * + * @return studyNames + **/ + + public List getStudyNames() { + return studyNames; + } + + public void setStudyNames(List studyNames) { + this.studyNames = studyNames; + } + + public BrAPIGermplasmSearchRequest synonyms(List synonyms) { + this.synonyms = synonyms; + return this; + } + + public BrAPIGermplasmSearchRequest addSynonymsItem(String synonymsItem) { + if (this.synonyms == null) { + this.synonyms = new ArrayList(); + } + this.synonyms.add(synonymsItem); + return this; + } + + /** + * List of alternative names or IDs used to reference this germplasm + * + * @return synonyms + **/ + + public List getSynonyms() { + return synonyms; + } + + public void setSynonyms(List synonyms) { + this.synonyms = synonyms; + } + + public BrAPIGermplasmSearchRequest trialDbIds(List trialDbIds) { + this.trialDbIds = trialDbIds; + return this; + } + + public BrAPIGermplasmSearchRequest addTrialDbIdsItem(String trialDbIdsItem) { + if (this.trialDbIds == null) { + this.trialDbIds = new ArrayList(); + } + this.trialDbIds.add(trialDbIdsItem); + return this; + } + + /** + * The ID which uniquely identifies a trial to search for + * + * @return trialDbIds + **/ + + public List getTrialDbIds() { + return trialDbIds; + } + + public void setTrialDbIds(List trialDbIds) { + this.trialDbIds = trialDbIds; + } + + public BrAPIGermplasmSearchRequest trialNames(List trialNames) { + this.trialNames = trialNames; + return this; + } + + public BrAPIGermplasmSearchRequest addTrialNamesItem(String trialNamesItem) { + if (this.trialNames == null) { + this.trialNames = new ArrayList(); + } + this.trialNames.add(trialNamesItem); + return this; + } + + /** + * The human readable name of a trial to search for + * + * @return trialNames + **/ + + public List getTrialNames() { + return trialNames; + } + + public void setTrialNames(List trialNames) { + this.trialNames = trialNames; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIGermplasmSearchRequest germplasmSearchRequest = (BrAPIGermplasmSearchRequest) o; + return Objects.equals(this.accessionNumbers, germplasmSearchRequest.accessionNumbers) + && Objects.equals(this.binomialNames, germplasmSearchRequest.binomialNames) + && Objects.equals(this.collections, germplasmSearchRequest.collections) + && Objects.equals(this.commonCropNames, germplasmSearchRequest.commonCropNames) + && Objects.equals(this.externalReferenceIDs, germplasmSearchRequest.externalReferenceIDs) + && Objects.equals(this.externalReferenceIds, germplasmSearchRequest.externalReferenceIds) + && Objects.equals(this.externalReferenceSources, germplasmSearchRequest.externalReferenceSources) + && Objects.equals(this.familyCodes, germplasmSearchRequest.familyCodes) + && Objects.equals(this.genus, germplasmSearchRequest.genus) + && Objects.equals(this.germplasmDbIds, germplasmSearchRequest.germplasmDbIds) + && Objects.equals(this.germplasmNames, germplasmSearchRequest.germplasmNames) + && Objects.equals(this.germplasmPUIs, germplasmSearchRequest.germplasmPUIs) + && Objects.equals(this.instituteCodes, germplasmSearchRequest.instituteCodes) + && Objects.equals(this.parentDbIds, germplasmSearchRequest.parentDbIds) + && Objects.equals(this.progenyDbIds, germplasmSearchRequest.progenyDbIds) + && Objects.equals(this.programDbIds, germplasmSearchRequest.programDbIds) + && Objects.equals(this.programNames, germplasmSearchRequest.programNames) + && Objects.equals(this.species, germplasmSearchRequest.species) + && Objects.equals(this.studyDbIds, germplasmSearchRequest.studyDbIds) + && Objects.equals(this.studyNames, germplasmSearchRequest.studyNames) + && Objects.equals(this.synonyms, germplasmSearchRequest.synonyms) + && Objects.equals(this.trialDbIds, germplasmSearchRequest.trialDbIds) + && Objects.equals(this.trialNames, germplasmSearchRequest.trialNames); + } + + @Override + public int hashCode() { + return Objects.hash(accessionNumbers, binomialNames, collections, commonCropNames, externalReferenceIDs, + externalReferenceIds, externalReferenceSources, familyCodes, genus, germplasmDbIds, germplasmNames, + germplasmPUIs, instituteCodes, parentDbIds, progenyDbIds, programDbIds, programNames, species, + studyDbIds, studyNames, synonyms, trialDbIds, trialNames); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BrAPIGermplasmSearchRequest {\n"); + + sb.append(" accessionNumbers: ").append(toIndentedString(accessionNumbers)).append("\n"); + sb.append(" binomialNames: ").append(toIndentedString(binomialNames)).append("\n"); + sb.append(" collections: ").append(toIndentedString(collections)).append("\n"); + sb.append(" commonCropNames: ").append(toIndentedString(commonCropNames)).append("\n"); + sb.append(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); + sb.append(" externalReferenceIds: ").append(toIndentedString(externalReferenceIds)).append("\n"); + sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); + sb.append(" familyCodes: ").append(toIndentedString(familyCodes)).append("\n"); + sb.append(" genus: ").append(toIndentedString(genus)).append("\n"); + sb.append(" germplasmDbIds: ").append(toIndentedString(germplasmDbIds)).append("\n"); + sb.append(" germplasmNames: ").append(toIndentedString(germplasmNames)).append("\n"); + sb.append(" germplasmPUIs: ").append(toIndentedString(germplasmPUIs)).append("\n"); + sb.append(" instituteCodes: ").append(toIndentedString(instituteCodes)).append("\n"); + sb.append(" parentDbIds: ").append(toIndentedString(parentDbIds)).append("\n"); + sb.append(" progenyDbIds: ").append(toIndentedString(progenyDbIds)).append("\n"); + sb.append(" programDbIds: ").append(toIndentedString(programDbIds)).append("\n"); + sb.append(" programNames: ").append(toIndentedString(programNames)).append("\n"); + sb.append(" species: ").append(toIndentedString(species)).append("\n"); + sb.append(" studyDbIds: ").append(toIndentedString(studyDbIds)).append("\n"); + sb.append(" studyNames: ").append(toIndentedString(studyNames)).append("\n"); + sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); + sb.append(" trialDbIds: ").append(toIndentedString(trialDbIds)).append("\n"); + sb.append(" trialNames: ").append(toIndentedString(trialNames)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } -public class BrAPIGermplasmSearchRequest extends BrAPISearchRequestParametersPaging { - @JsonProperty("commonCropNames") - @Valid - private List commonCropNames = null; - - @JsonProperty("germplasmDbIds") - @Valid - private List germplasmDbIds = null; - - @JsonProperty("germplasmNames") - @Valid - private List germplasmNames = null; - - @JsonProperty("studyDbIds") - @Valid - private List studyDbIds = null; - - @JsonProperty("studyNames") - @Valid - private List studyNames = null; - - @JsonProperty("externalReferenceIDs") - @Valid - private List externalReferenceIDs = null; - - @JsonProperty("externalReferenceSources") - @Valid - private List externalReferenceSources = null; - - @JsonProperty("accessionNumbers") - @Valid - private List accessionNumbers = null; - - @JsonProperty("collections") - @Valid - private List collections = null; - - @JsonProperty("genus") - @Valid - private List genus = null; - - @JsonProperty("germplasmPUIs") - @Valid - private List germplasmPUIs = null; - - @JsonProperty("parentDbIds") - @Valid - private List parentDbIds = null; - - @JsonProperty("progenyDbIds") - @Valid - private List progenyDbIds = null; - - @JsonProperty("species") - @Valid - private List species = null; - - @JsonProperty("synonyms") - @Valid - private List synonyms = null; - - public BrAPIGermplasmSearchRequest commonCropNames(List commonCropNames) { - this.commonCropNames = commonCropNames; - return this; - } - - public BrAPIGermplasmSearchRequest addCommonCropNamesItem(String commonCropNamesItem) { - if (this.commonCropNames == null) { - this.commonCropNames = new ArrayList(); - } - this.commonCropNames.add(commonCropNamesItem); - return this; - } - - /** - * Common name for the crop which this program is for - * @return commonCropNames - **/ - - - public List getCommonCropNames() { - return commonCropNames; - } - - public void setCommonCropNames(List commonCropNames) { - this.commonCropNames = commonCropNames; - } - - public BrAPIGermplasmSearchRequest germplasmDbIds(List germplasmDbIds) { - this.germplasmDbIds = germplasmDbIds; - return this; - } - - public BrAPIGermplasmSearchRequest addGermplasmDbIdsItem(String germplasmDbIdsItem) { - if (this.germplasmDbIds == null) { - this.germplasmDbIds = new ArrayList(); - } - this.germplasmDbIds.add(germplasmDbIdsItem); - return this; - } - - /** - * List of IDs which uniquely identify germplasm to search for - * @return germplasmDbIds - **/ - - - public List getGermplasmDbIds() { - return germplasmDbIds; - } - - public void setGermplasmDbIds(List germplasmDbIds) { - this.germplasmDbIds = germplasmDbIds; - } - - public BrAPIGermplasmSearchRequest germplasmNames(List germplasmNames) { - this.germplasmNames = germplasmNames; - return this; - } - - public BrAPIGermplasmSearchRequest addGermplasmNamesItem(String germplasmNamesItem) { - if (this.germplasmNames == null) { - this.germplasmNames = new ArrayList(); - } - this.germplasmNames.add(germplasmNamesItem); - return this; - } - - /** - * List of human readable names to identify germplasm to search for - * @return germplasmNames - **/ - - - public List getGermplasmNames() { - return germplasmNames; - } - - public void setGermplasmNames(List germplasmNames) { - this.germplasmNames = germplasmNames; - } - - public BrAPIGermplasmSearchRequest studyDbIds(List studyDbIds) { - this.studyDbIds = studyDbIds; - return this; - } - - public BrAPIGermplasmSearchRequest addStudyDbIdsItem(String studyDbIdsItem) { - if (this.studyDbIds == null) { - this.studyDbIds = new ArrayList(); - } - this.studyDbIds.add(studyDbIdsItem); - return this; - } - - /** - * List of study identifiers to search for - * @return studyDbIds - **/ - - - public List getStudyDbIds() { - return studyDbIds; - } - - public void setStudyDbIds(List studyDbIds) { - this.studyDbIds = studyDbIds; - } - - public BrAPIGermplasmSearchRequest studyNames(List studyNames) { - this.studyNames = studyNames; - return this; - } - - public BrAPIGermplasmSearchRequest addStudyNamesItem(String studyNamesItem) { - if (this.studyNames == null) { - this.studyNames = new ArrayList(); - } - this.studyNames.add(studyNamesItem); - return this; - } - - /** - * List of study names to filter search results - * @return studyNames - **/ - - - public List getStudyNames() { - return studyNames; - } - - public void setStudyNames(List studyNames) { - this.studyNames = studyNames; - } - - public BrAPIGermplasmSearchRequest externalReferenceIDs(List externalReferenceIDs) { - this.externalReferenceIDs = externalReferenceIDs; - return this; - } - - public BrAPIGermplasmSearchRequest addExternalReferenceIDsItem(String externalReferenceIDsItem) { - if (this.externalReferenceIDs == null) { - this.externalReferenceIDs = new ArrayList(); - } - this.externalReferenceIDs.add(externalReferenceIDsItem); - return this; - } - - /** - * List of external references for the trait to search for - * @return externalReferenceIDs - **/ - - - public List getExternalReferenceIDs() { - return externalReferenceIDs; - } - - public void setExternalReferenceIDs(List externalReferenceIDs) { - this.externalReferenceIDs = externalReferenceIDs; - } - - public BrAPIGermplasmSearchRequest externalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; - return this; - } - - public BrAPIGermplasmSearchRequest addExternalReferenceSourcesItem(String externalReferenceSourcesItem) { - if (this.externalReferenceSources == null) { - this.externalReferenceSources = new ArrayList(); - } - this.externalReferenceSources.add(externalReferenceSourcesItem); - return this; - } - - /** - * List of external references sources for the trait to search for - * @return externalReferenceSources - **/ - - - public List getExternalReferenceSources() { - return externalReferenceSources; - } - - public void setExternalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; - } - - public BrAPIGermplasmSearchRequest accessionNumbers(List accessionNumbers) { - this.accessionNumbers = accessionNumbers; - return this; - } - - public BrAPIGermplasmSearchRequest addAccessionNumbersItem(String accessionNumbersItem) { - if (this.accessionNumbers == null) { - this.accessionNumbers = new ArrayList(); - } - this.accessionNumbers.add(accessionNumbersItem); - return this; - } - - /** - * List unique identifiers for accessions within a genebank - * @return accessionNumbers - **/ - - - public List getAccessionNumbers() { - return accessionNumbers; - } - - public void setAccessionNumbers(List accessionNumbers) { - this.accessionNumbers = accessionNumbers; - } - - public BrAPIGermplasmSearchRequest collections(List collections) { - this.collections = collections; - return this; - } - - public BrAPIGermplasmSearchRequest addCollectionsItem(String collectionsItem) { - if (this.collections == null) { - this.collections = new ArrayList(); - } - this.collections.add(collectionsItem); - return this; - } - - /** - * A specific panel/collection/population name this germplasm belongs to. - * @return collections - **/ - - - public List getCollections() { - return collections; - } - - public void setCollections(List collections) { - this.collections = collections; - } - - public BrAPIGermplasmSearchRequest genus(List genus) { - this.genus = genus; - return this; - } - - public BrAPIGermplasmSearchRequest addGenusItem(String genusItem) { - if (this.genus == null) { - this.genus = new ArrayList(); - } - this.genus.add(genusItem); - return this; - } - - /** - * List of Genus names to identify germplasm - * @return genus - **/ - - - public List getGenus() { - return genus; - } - - public void setGenus(List genus) { - this.genus = genus; - } - - public BrAPIGermplasmSearchRequest germplasmPUIs(List germplasmPUIs) { - this.germplasmPUIs = germplasmPUIs; - return this; - } - - public BrAPIGermplasmSearchRequest addGermplasmPUIsItem(String germplasmPUIsItem) { - if (this.germplasmPUIs == null) { - this.germplasmPUIs = new ArrayList(); - } - this.germplasmPUIs.add(germplasmPUIsItem); - return this; - } - - /** - * List of Permanent Unique Identifiers to identify germplasm - * @return germplasmPUIs - **/ - - - public List getGermplasmPUIs() { - return germplasmPUIs; - } - - public void setGermplasmPUIs(List germplasmPUIs) { - this.germplasmPUIs = germplasmPUIs; - } - - public BrAPIGermplasmSearchRequest parentDbIds(List parentDbIds) { - this.parentDbIds = parentDbIds; - return this; - } - - public BrAPIGermplasmSearchRequest addParentDbIdsItem(String parentDbIdsItem) { - if (this.parentDbIds == null) { - this.parentDbIds = new ArrayList(); - } - this.parentDbIds.add(parentDbIdsItem); - return this; - } - - /** - * Search for Germplasm with these parents - * @return parentDbIds - **/ - - - public List getParentDbIds() { - return parentDbIds; - } - - public void setParentDbIds(List parentDbIds) { - this.parentDbIds = parentDbIds; - } - - public BrAPIGermplasmSearchRequest progenyDbIds(List progenyDbIds) { - this.progenyDbIds = progenyDbIds; - return this; - } - - public BrAPIGermplasmSearchRequest addProgenyDbIdsItem(String progenyDbIdsItem) { - if (this.progenyDbIds == null) { - this.progenyDbIds = new ArrayList(); - } - this.progenyDbIds.add(progenyDbIdsItem); - return this; - } - - /** - * Search for Germplasm with these children - * @return progenyDbIds - **/ - - - public List getProgenyDbIds() { - return progenyDbIds; - } - - public void setProgenyDbIds(List progenyDbIds) { - this.progenyDbIds = progenyDbIds; - } - - public BrAPIGermplasmSearchRequest species(List species) { - this.species = species; - return this; - } - - public BrAPIGermplasmSearchRequest addSpeciesItem(String speciesItem) { - if (this.species == null) { - this.species = new ArrayList(); - } - this.species.add(speciesItem); - return this; - } - - /** - * List of Species names to identify germplasm - * @return species - **/ - - - public List getSpecies() { - return species; - } - - public void setSpecies(List species) { - this.species = species; - } - - public BrAPIGermplasmSearchRequest synonyms(List synonyms) { - this.synonyms = synonyms; - return this; - } - - public BrAPIGermplasmSearchRequest addSynonymsItem(String synonymsItem) { - if (this.synonyms == null) { - this.synonyms = new ArrayList(); - } - this.synonyms.add(synonymsItem); - return this; - } - - /** - * List of alternative names or IDs used to reference this germplasm - * @return synonyms - **/ - - - public List getSynonyms() { - return synonyms; - } - - public void setSynonyms(List synonyms) { - this.synonyms = synonyms; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIGermplasmSearchRequest germplasmSearchRequest = (BrAPIGermplasmSearchRequest) o; - return Objects.equals(this.commonCropNames, germplasmSearchRequest.commonCropNames) && - Objects.equals(this.germplasmDbIds, germplasmSearchRequest.germplasmDbIds) && - Objects.equals(this.germplasmNames, germplasmSearchRequest.germplasmNames) && - Objects.equals(this.studyDbIds, germplasmSearchRequest.studyDbIds) && - Objects.equals(this.studyNames, germplasmSearchRequest.studyNames) && - Objects.equals(this.externalReferenceIDs, germplasmSearchRequest.externalReferenceIDs) && - Objects.equals(this.externalReferenceSources, germplasmSearchRequest.externalReferenceSources) && - Objects.equals(this.accessionNumbers, germplasmSearchRequest.accessionNumbers) && - Objects.equals(this.collections, germplasmSearchRequest.collections) && - Objects.equals(this.genus, germplasmSearchRequest.genus) && - Objects.equals(this.germplasmPUIs, germplasmSearchRequest.germplasmPUIs) && - Objects.equals(this.parentDbIds, germplasmSearchRequest.parentDbIds) && - Objects.equals(this.progenyDbIds, germplasmSearchRequest.progenyDbIds) && - Objects.equals(this.species, germplasmSearchRequest.species) && - Objects.equals(this.synonyms, germplasmSearchRequest.synonyms) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(commonCropNames, germplasmDbIds, germplasmNames, studyDbIds, studyNames, externalReferenceIDs, externalReferenceSources, accessionNumbers, collections, genus, germplasmPUIs, parentDbIds, progenyDbIds, species, synonyms, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GermplasmSearchRequest {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" commonCropNames: ").append(toIndentedString(commonCropNames)).append("\n"); - sb.append(" germplasmDbIds: ").append(toIndentedString(germplasmDbIds)).append("\n"); - sb.append(" germplasmNames: ").append(toIndentedString(germplasmNames)).append("\n"); - sb.append(" studyDbIds: ").append(toIndentedString(studyDbIds)).append("\n"); - sb.append(" studyNames: ").append(toIndentedString(studyNames)).append("\n"); - sb.append(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); - sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); - sb.append(" accessionNumbers: ").append(toIndentedString(accessionNumbers)).append("\n"); - sb.append(" collections: ").append(toIndentedString(collections)).append("\n"); - sb.append(" genus: ").append(toIndentedString(genus)).append("\n"); - sb.append(" germplasmPUIs: ").append(toIndentedString(germplasmPUIs)).append("\n"); - sb.append(" parentDbIds: ").append(toIndentedString(parentDbIds)).append("\n"); - sb.append(" progenyDbIds: ").append(toIndentedString(progenyDbIds)).append("\n"); - sb.append(" species: ").append(toIndentedString(species)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIMethod.java b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIMethod.java index 3409e2c8..1f37a000 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIMethod.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIMethod.java @@ -1,8 +1,6 @@ package org.brapi.v2.model.pheno; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; @@ -10,302 +8,308 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.annotations.JsonAdapter; -import lombok.*; -import lombok.experimental.Accessors; import org.brapi.v2.model.BrAPIExternalReference; import org.brapi.v2.model.BrAPIOntologyReference; import org.brapi.v2.model.NullableJsonElementTypeAdapterFactory; -import javax.validation.Valid; - - /** * Method */ - public class BrAPIMethod { - @JsonProperty("methodDbId") - private String methodDbId = null; - - @JsonProperty("additionalInfo") - @Valid - @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) - private JsonObject additionalInfo = null; - - @JsonProperty("bibliographicalReference") - private String bibliographicalReference = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("externalReferences") - private List externalReferences = null; - - @JsonProperty("formula") - private String formula = null; - - @JsonProperty("methodClass") - private String methodClass = null; - - @JsonProperty("methodName") - private String methodName = null; - - @JsonProperty("ontologyReference") - private BrAPIOntologyReference ontologyReference = null; - - private final transient Gson gson = new Gson(); - - public BrAPIMethod methodDbId(String methodDbId) { - this.methodDbId = methodDbId; - return this; - } - - /** - * Method unique identifier - * @return methodDbId - **/ - - - public String getMethodDbId() { - return methodDbId; - } - - public void setMethodDbId(String methodDbId) { - this.methodDbId = methodDbId; - } - - public BrAPIMethod additionalInfo(JsonObject additionalInfo) { - this.additionalInfo = additionalInfo; - return this; - } - - public BrAPIMethod putAdditionalInfoItem(String key, Object additionalInfoItem) { - if (this.additionalInfo == null) { - this.additionalInfo = new JsonObject(); - } - JsonElement newElement = gson.toJsonTree(additionalInfoItem); - this.additionalInfo.add(key, newElement); - return this; - } - - /** - * Additional arbitrary info - * - * @return additionalInfo - **/ - - - public JsonObject getAdditionalInfo() { - return additionalInfo; - } - - public void setAdditionalInfo(JsonObject additionalInfo) { - this.additionalInfo = additionalInfo; - } - - public BrAPIMethod bibliographicalReference(String bibliographicalReference) { - this.bibliographicalReference = bibliographicalReference; - return this; - } - - /** - * Bibliographical reference describing the method. MIAPPE V1.1 (DM-91) - * Reference associated to the method - URI/DOI of reference describing the - * method. - * - * @return bibliographicalReference - **/ - - - public String getBibliographicalReference() { - return bibliographicalReference; - } - - public void setBibliographicalReference(String bibliographicalReference) { - this.bibliographicalReference = bibliographicalReference; - } - - public BrAPIMethod description(String description) { - this.description = description; - return this; - } - - /** - * Method description MIAPPE V1.1 (DM-90) Method description - Textual - * description of the method, which may extend a method defined in an external - * reference with specific parameters, e.g. growth stage, inoculation precise - * organ (leaf number) - * - * @return description - **/ - - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public BrAPIMethod externalReferences(List externalReferences) { - this.externalReferences = externalReferences; - return this; - } - - /** - * Get externalReferences - * - * @return externalReferences - **/ - - - @Valid - public List getExternalReferences() { - return externalReferences; - } - - public void setExternalReferences(List externalReferences) { - this.externalReferences = externalReferences; - } - - public BrAPIMethod formula(String formula) { - this.formula = formula; - return this; - } - - /** - * For computational methods i.e., when the method consists in assessing the - * trait by computing measurements, write the generic formula used for the - * calculation - * - * @return formula - **/ - - - public String getFormula() { - return formula; - } - - public void setFormula(String formula) { - this.formula = formula; - } - - public BrAPIMethod methodClass(String methodClass) { - this.methodClass = methodClass; - return this; - } - - /** - * Method class (examples: \"Measurement\", \"Counting\", \"Estimation\", - * \"Computation\", etc.) - * - * @return methodClass - **/ - - - public String getMethodClass() { - return methodClass; - } - - public void setMethodClass(String methodClass) { - this.methodClass = methodClass; - } - - public BrAPIMethod methodName(String methodName) { - this.methodName = methodName; - return this; - } - - /** - * Human readable name for the method MIAPPE V1.1 (DM-88) Method Name of the - * method of observation - * - * @return methodName - **/ - - - public String getMethodName() { - return methodName; - } - - public void setMethodName(String methodName) { - this.methodName = methodName; - } - - public BrAPIMethod ontologyReference(BrAPIOntologyReference ontologyReference) { - this.ontologyReference = ontologyReference; - return this; - } - - /** - * Get ontologyReference - * - * @return ontologyReference - **/ - - - @Valid - public BrAPIOntologyReference getOntologyReference() { - return ontologyReference; - } - - public void setOntologyReference(BrAPIOntologyReference ontologyReference) { - this.ontologyReference = ontologyReference; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIMethod method = (BrAPIMethod) o; - return Objects.equals(this.methodDbId, method.methodDbId) - && Objects.equals(this.additionalInfo, method.additionalInfo) - && Objects.equals(this.bibliographicalReference, method.bibliographicalReference) - && Objects.equals(this.description, method.description) - && Objects.equals(this.externalReferences, method.externalReferences) - && Objects.equals(this.formula, method.formula) - && Objects.equals(this.methodClass, method.methodClass) - && Objects.equals(this.methodName, method.methodName) - && Objects.equals(this.ontologyReference, method.ontologyReference); - } - - @Override - public int hashCode() { - return Objects.hash(methodDbId, additionalInfo, bibliographicalReference, description, externalReferences, formula, - methodClass, methodName, ontologyReference); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Method {\n"); - sb.append(" methodDbId: ").append(toIndentedString(methodDbId)).append("\n"); - sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" bibliographicalReference: ").append(toIndentedString(bibliographicalReference)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); - sb.append(" formula: ").append(toIndentedString(formula)).append("\n"); - sb.append(" methodClass: ").append(toIndentedString(methodClass)).append("\n"); - sb.append(" methodName: ").append(toIndentedString(methodName)).append("\n"); - sb.append(" ontologyReference: ").append(toIndentedString(ontologyReference)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + @JsonProperty("methodDbId") + private String methodDbId = null; + + @JsonProperty("additionalInfo") + @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) + private JsonObject additionalInfo = null; + + @JsonProperty("bibliographicalReference") + private String bibliographicalReference = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("externalReferences") + private List externalReferences = null; + + @JsonProperty("formula") + private String formula = null; + + @JsonProperty("methodClass") + private String methodClass = null; + + @JsonProperty("methodName") + private String methodName = null; + + @JsonProperty("methodPUI") + private String methodPUI = null; + + @JsonProperty("ontologyReference") + private BrAPIOntologyReference ontologyReference = null; + + private final transient Gson gson = new Gson(); + + public BrAPIMethod methodDbId(String methodDbId) { + this.methodDbId = methodDbId; + return this; + } + + /** + * Method unique identifier + * + * @return methodDbId + **/ + + public String getMethodDbId() { + return methodDbId; + } + + public void setMethodDbId(String methodDbId) { + this.methodDbId = methodDbId; + } + + public BrAPIMethod additionalInfo(JsonObject additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + public BrAPIMethod putAdditionalInfoItem(String key, Object additionalInfoItem) { + if (this.additionalInfo == null) { + this.additionalInfo = new JsonObject(); + } + JsonElement newElement = gson.toJsonTree(additionalInfoItem); + this.additionalInfo.add(key, newElement); + return this; + } + + /** + * Additional arbitrary info + * + * @return additionalInfo + **/ + + public JsonObject getAdditionalInfo() { + return additionalInfo; + } + + public void setAdditionalInfo(JsonObject additionalInfo) { + this.additionalInfo = additionalInfo; + } + + public BrAPIMethod bibliographicalReference(String bibliographicalReference) { + this.bibliographicalReference = bibliographicalReference; + return this; + } + + /** + * Bibliographical reference describing the method. MIAPPE V1.1 (DM-91) + * Reference associated to the method - URI/DOI of reference describing the + * method. + * + * @return bibliographicalReference + **/ + + public String getBibliographicalReference() { + return bibliographicalReference; + } + + public void setBibliographicalReference(String bibliographicalReference) { + this.bibliographicalReference = bibliographicalReference; + } + + public BrAPIMethod description(String description) { + this.description = description; + return this; + } + + /** + * Method description MIAPPE V1.1 (DM-90) Method description - Textual + * description of the method, which may extend a method defined in an external + * reference with specific parameters, e.g. growth stage, inoculation precise + * organ (leaf number) + * + * @return description + **/ + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public BrAPIMethod externalReferences(List externalReferences) { + this.externalReferences = externalReferences; + return this; + } + + /** + * Get externalReferences + * + * @return externalReferences + **/ + + public List getExternalReferences() { + return externalReferences; + } + + public void setExternalReferences(List externalReferences) { + this.externalReferences = externalReferences; + } + + public BrAPIMethod formula(String formula) { + this.formula = formula; + return this; + } + + /** + * For computational methods i.e., when the method consists in assessing the + * trait by computing measurements, write the generic formula used for the + * calculation + * + * @return formula + **/ + + public String getFormula() { + return formula; + } + + public void setFormula(String formula) { + this.formula = formula; + } + + public BrAPIMethod methodClass(String methodClass) { + this.methodClass = methodClass; + return this; + } + + /** + * Method class (examples: \"Measurement\", \"Counting\", \"Estimation\", + * \"Computation\", etc.) + * + * @return methodClass + **/ + + public String getMethodClass() { + return methodClass; + } + + public void setMethodClass(String methodClass) { + this.methodClass = methodClass; + } + + public BrAPIMethod methodName(String methodName) { + this.methodName = methodName; + return this; + } + + /** + * Human readable name for the method MIAPPE V1.1 (DM-88) Method Name of the + * method of observation + * + * @return methodName + **/ + + public String getMethodName() { + return methodName; + } + + public void setMethodName(String methodName) { + this.methodName = methodName; + } + + public BrAPIMethod ontologyReference(BrAPIOntologyReference ontologyReference) { + this.ontologyReference = ontologyReference; + return this; + } + + public BrAPIMethod methodPUI(String methodPUI) { + this.methodPUI = methodPUI; + return this; + } + + /** + * The Permanent Unique Identifier of a Method, usually in the form of a URI + * + * @return methodPUI + **/ + public String getMethodPUI() { + return methodPUI; + } + + public void setMethodPUI(String methodPUI) { + this.methodPUI = methodPUI; + } + + /** + * Get ontologyReference + * + * @return ontologyReference + **/ + + public BrAPIOntologyReference getOntologyReference() { + return ontologyReference; + } + + public void setOntologyReference(BrAPIOntologyReference ontologyReference) { + this.ontologyReference = ontologyReference; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIMethod method = (BrAPIMethod) o; + return Objects.equals(this.additionalInfo, method.additionalInfo) + && Objects.equals(this.bibliographicalReference, method.bibliographicalReference) + && Objects.equals(this.description, method.description) + && Objects.equals(this.externalReferences, method.externalReferences) + && Objects.equals(this.formula, method.formula) && Objects.equals(this.methodClass, method.methodClass) + && Objects.equals(this.methodDbId, method.methodDbId) + && Objects.equals(this.methodName, method.methodName) + && Objects.equals(this.methodPUI, method.methodPUI) + && Objects.equals(this.ontologyReference, method.ontologyReference); + } + + @Override + public int hashCode() { + return Objects.hash(additionalInfo, bibliographicalReference, description, externalReferences, formula, + methodClass, methodDbId, methodName, methodPUI, ontologyReference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Method {\n"); + + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" bibliographicalReference: ").append(toIndentedString(bibliographicalReference)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); + sb.append(" formula: ").append(toIndentedString(formula)).append("\n"); + sb.append(" methodClass: ").append(toIndentedString(methodClass)).append("\n"); + sb.append(" methodDbId: ").append(toIndentedString(methodDbId)).append("\n"); + sb.append(" methodName: ").append(toIndentedString(methodName)).append("\n"); + sb.append(" methodPUI: ").append(toIndentedString(methodPUI)).append("\n"); + sb.append(" ontologyReference: ").append(toIndentedString(ontologyReference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIObservationVariable.java b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIObservationVariable.java index f63229a6..d73c025a 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIObservationVariable.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIObservationVariable.java @@ -27,6 +27,9 @@ public class BrAPIObservationVariable { @JsonProperty("observationVariableName") private String observationVariableName = null; + @JsonProperty("observationVariablePUI") + private String observationVariablePUI = null; + @JsonProperty("additionalInfo") @Valid @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) @@ -117,6 +120,26 @@ public void setObservationVariableDbId(String observationVariableDbId) { this.observationVariableDbId = observationVariableDbId; } + public BrAPIObservationVariable observationVariablePUI(String observationVariablePUI) { + this.observationVariablePUI = observationVariablePUI; + return this; + } + + /** + * Variable unique identifier MIAPPE V1.1 (DM-83) Variable ID - Code used to identify the variable in the data file. We recommend using a variable definition from the Crop Ontology where possible. Otherwise, the Crop Ontology naming convention is recommended: __). A variable ID must be unique within a given investigation. + * @return observationVariablePUI + **/ + + + + public String getObservationVariablePUI() { + return observationVariablePUI; + } + + public void setObservationVariablePUI(String observationVariablePUI) { + this.observationVariablePUI = observationVariablePUI; + } + public BrAPIObservationVariable additionalInfo(JsonObject additionalInfo) { this.additionalInfo = additionalInfo; return this; @@ -473,6 +496,7 @@ public boolean equals(java.lang.Object o) { } BrAPIObservationVariable observationVariable = (BrAPIObservationVariable) o; return Objects.equals(this.observationVariableDbId, observationVariable.observationVariableDbId) && + Objects.equals(this.observationVariablePUI, observationVariable.observationVariablePUI) && Objects.equals(this.observationVariableName, observationVariable.observationVariableName) && Objects.equals(this.additionalInfo, observationVariable.additionalInfo) && Objects.equals(this.commonCropName, observationVariable.commonCropName) && @@ -495,7 +519,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(observationVariableDbId, observationVariableName, additionalInfo, commonCropName, contextOfUse, defaultValue, documentationURL, externalReferences, growthStage, institution, language, method, ontologyReference, scale, scientist, status, submissionTimestamp, synonyms, trait); + return Objects.hash(observationVariableDbId, observationVariablePUI, observationVariableName, additionalInfo, commonCropName, contextOfUse, defaultValue, documentationURL, externalReferences, growthStage, institution, language, method, ontologyReference, scale, scientist, status, submissionTimestamp, synonyms, trait); } @Override @@ -503,6 +527,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ObservationVariable {\n"); sb.append(" observationVariableDbId: ").append(toIndentedString(observationVariableDbId)).append("\n"); + sb.append(" observationVariablePUI: ").append(toIndentedString(observationVariablePUI)).append("\n"); sb.append(" observationVariableName: ").append(toIndentedString(observationVariableName)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append(" commonCropName: ").append(toIndentedString(commonCropName)).append("\n"); diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIScale.java b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIScale.java index 4fa41b61..f704c0ac 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIScale.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIScale.java @@ -1,23 +1,14 @@ package org.brapi.v2.model.pheno; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; -import javax.validation.Valid; - import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.annotations.JsonAdapter; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.Accessors; import org.brapi.v2.model.BrAPIExternalReference; import org.brapi.v2.model.BrAPIOntologyReference; import org.brapi.v2.model.NullableJsonElementTypeAdapterFactory; @@ -28,9 +19,9 @@ public class BrAPIScale { @JsonProperty("additionalInfo") - @Valid - @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) + @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) private JsonObject additionalInfo = null; + @JsonProperty("dataType") private BrAPITraitDataType dataType = null; @@ -46,6 +37,12 @@ public class BrAPIScale { @JsonProperty("scaleName") private String scaleName = null; + @JsonProperty("scalePUI") + private String scalePUI = null; + + @JsonProperty("units") + private String units = null; + @JsonProperty("validValues") private BrAPIScaleValidValues validValues = null; @@ -60,13 +57,13 @@ public BrAPIScale additionalInfo(JsonObject additionalInfo) { } public BrAPIScale putAdditionalInfoItem(String key, Object additionalInfoItem) { - if (this.additionalInfo == null) { - this.additionalInfo = new JsonObject(); - } - JsonElement newElement = gson.toJsonTree(additionalInfoItem); - this.additionalInfo.add(key, newElement); - return this; - } + if (this.additionalInfo == null) { + this.additionalInfo = new JsonObject(); + } + JsonElement newElement = gson.toJsonTree(additionalInfoItem); + this.additionalInfo.add(key, newElement); + return this; + } /** * Additional arbitrary info @@ -74,7 +71,6 @@ public BrAPIScale putAdditionalInfoItem(String key, Object additionalInfoItem) { * @return additionalInfo **/ - public JsonObject getAdditionalInfo() { return additionalInfo; } @@ -94,8 +90,6 @@ public BrAPIScale dataType(BrAPITraitDataType dataType) { * @return dataType **/ - - @Valid public BrAPITraitDataType getDataType() { return dataType; } @@ -115,7 +109,6 @@ public BrAPIScale decimalPlaces(Integer decimalPlaces) { * @return decimalPlaces **/ - public Integer getDecimalPlaces() { return decimalPlaces; } @@ -135,8 +128,6 @@ public BrAPIScale externalReferences(List externalRefere * @return externalReferences **/ - - @Valid public List getExternalReferences() { return externalReferences; } @@ -156,8 +147,6 @@ public BrAPIScale ontologyReference(BrAPIOntologyReference ontologyReference) { * @return ontologyReference **/ - - @Valid public BrAPIOntologyReference getOntologyReference() { return ontologyReference; } @@ -179,6 +168,45 @@ public void setScaleName(String scaleName) { this.scaleName = scaleName; } + public BrAPIScale scalePUI(String scalePUI) { + this.scalePUI = scalePUI; + return this; + } + + /** + * The Permanent Unique Identifier of a Scale, usually in the form of a URI + * + * @return scalePUI + **/ + public String getScalePUI() { + return scalePUI; + } + + public void setScalePUI(String scalePUI) { + this.scalePUI = scalePUI; + } + + public BrAPIScale units(String units) { + this.units = units; + return this; + } + + /** + * This field can be used to describe the units used for this scale. This should + * be the abbreviated form of the units, intended to be displayed with every + * value using this scale. Usually this only applies when `dataType` + * is Numeric, but could also be included for other dataTypes when applicable. + * + * @return units + **/ + public String getUnits() { + return units; + } + + public void setUnits(String units) { + this.units = units; + } + public BrAPIScale validValues(BrAPIScaleValidValues validValues) { this.validValues = validValues; return this; @@ -190,8 +218,6 @@ public BrAPIScale validValues(BrAPIScaleValidValues validValues) { * @return validValues **/ - - @Valid public BrAPIScaleValidValues getValidValues() { return validValues; } @@ -206,12 +232,12 @@ public BrAPIScale scaleDbId(String scaleDbId) { } /** - * Unique identifier of the scale. If left blank, the upload system will automatically generate a scale ID. + * Unique identifier of the scale. If left blank, the upload system will + * automatically generate a scale ID. + * * @return scaleDbId **/ - - public String getScaleDbId() { return scaleDbId; } @@ -220,43 +246,51 @@ public void setScaleDbId(String scaleDbId) { this.scaleDbId = scaleDbId; } - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIScale scale = (BrAPIScale) o; - return Objects.equals(this.scaleDbId, scale.scaleDbId) - && Objects.equals(this.dataType, scale.dataType) - && Objects.equals(this.decimalPlaces, scale.decimalPlaces) - && Objects.equals(this.externalReferences, scale.externalReferences) - && Objects.equals(this.ontologyReference, scale.ontologyReference) - && Objects.equals(this.scaleName, scale.scaleName) - && Objects.equals(this.validValues, scale.validValues); - } - - @Override - public int hashCode() { - return Objects.hash(scaleDbId, dataType, decimalPlaces, externalReferences, ontologyReference, scaleName, validValues); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ScaleBaseClass {\n"); - sb.append(" scaleDbId: ").append(toIndentedString(scaleDbId)).append("\n"); - sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); - sb.append(" decimalPlaces: ").append(toIndentedString(decimalPlaces)).append("\n"); - sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); - sb.append(" ontologyReference: ").append(toIndentedString(ontologyReference)).append("\n"); - sb.append(" scaleName: ").append(toIndentedString(scaleName)).append("\n"); - sb.append(" validValues: ").append(toIndentedString(validValues)).append("\n"); - sb.append("}"); - return sb.toString(); - } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIScale scale = (BrAPIScale) o; + return Objects.equals(this.additionalInfo, scale.additionalInfo) && + Objects.equals(this.dataType, scale.dataType) && + Objects.equals(this.decimalPlaces, scale.decimalPlaces) && + Objects.equals(this.externalReferences, scale.externalReferences) && + Objects.equals(this.ontologyReference, scale.ontologyReference) && + Objects.equals(this.scaleDbId, scale.scaleDbId) && + Objects.equals(this.scaleName, scale.scaleName) && + Objects.equals(this.scalePUI, scale.scalePUI) && + Objects.equals(this.units, scale.units) && + Objects.equals(this.validValues, scale.validValues); + } + + @Override + public int hashCode() { + return Objects.hash(additionalInfo, dataType, decimalPlaces, externalReferences, ontologyReference, scaleDbId, scaleName, scalePUI, units, validValues); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Scale {\n"); + + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" decimalPlaces: ").append(toIndentedString(decimalPlaces)).append("\n"); + sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); + sb.append(" ontologyReference: ").append(toIndentedString(ontologyReference)).append("\n"); + sb.append(" scaleDbId: ").append(toIndentedString(scaleDbId)).append("\n"); + sb.append(" scaleName: ").append(toIndentedString(scaleName)).append("\n"); + sb.append(" scalePUI: ").append(toIndentedString(scalePUI)).append("\n"); + sb.append(" units: ").append(toIndentedString(units)).append("\n"); + sb.append(" validValues: ").append(toIndentedString(validValues)).append("\n"); + sb.append("}"); + return sb.toString(); + } /** * Convert the given object to string with each line indented by 4 spaces diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIScaleValidValues.java b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIScaleValidValues.java index 5cc10796..53aec6b8 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIScaleValidValues.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPIScaleValidValues.java @@ -12,123 +12,178 @@ * ScaleBaseClassValidValues */ - public class BrAPIScaleValidValues { - @JsonProperty("categories") - @Valid - private List categories = null; - - @JsonProperty("max") - private Integer max = null; - - @JsonProperty("min") - private Integer min = null; - - public BrAPIScaleValidValues categories(List categories) { - this.categories = categories; - return this; - } - - public BrAPIScaleValidValues addCategoriesItem(BrAPIScaleValidValuesCategories categoriesItem) { - if (this.categories == null) { - this.categories = new ArrayList(); - } - this.categories.add(categoriesItem); - return this; - } - - /** - * List of possible values with optional labels - * @return categories - **/ - - @Valid - public List getCategories() { - return categories; - } - - public void setCategories(List categories) { - this.categories = categories; - } - - public BrAPIScaleValidValues max(Integer max) { - this.max = max; - return this; - } - - /** - * Maximum value (used for field data capture control). - * @return max - **/ - - - public Integer getMax() { - return max; - } - - public void setMax(Integer max) { - this.max = max; - } - - public BrAPIScaleValidValues min(Integer min) { - this.min = min; - return this; - } - - /** - * Minimum value (used for data capture control) for numerical and date scales - * @return min - **/ - - - public Integer getMin() { - return min; - } - - public void setMin(Integer min) { - this.min = min; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIScaleValidValues scaleBaseClassValidValues = (BrAPIScaleValidValues) o; - return Objects.equals(this.categories, scaleBaseClassValidValues.categories) && - Objects.equals(this.max, scaleBaseClassValidValues.max) && - Objects.equals(this.min, scaleBaseClassValidValues.min); - } - - @Override - public int hashCode() { - return Objects.hash(categories, max, min); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ScaleBaseClassValidValues {\n"); - - sb.append(" categories: ").append(toIndentedString(categories)).append("\n"); - sb.append(" max: ").append(toIndentedString(max)).append("\n"); - sb.append(" min: ").append(toIndentedString(min)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + @JsonProperty("categories") + @Valid + private List categories = null; + + @JsonProperty("max") + @Deprecated + private Integer max = null; + + @JsonProperty("maximumValue") + private String maximumValue = null; + + @JsonProperty("min") + @Deprecated + private Integer min = null; + + @JsonProperty("minimumValue") + private String minimumValue = null; + + public BrAPIScaleValidValues categories(List categories) { + this.categories = categories; + return this; + } + + public BrAPIScaleValidValues addCategoriesItem(BrAPIScaleValidValuesCategories categoriesItem) { + if (this.categories == null) { + this.categories = new ArrayList(); + } + this.categories.add(categoriesItem); + return this; + } + + /** + * List of possible values with optional labels + * + * @return categories + **/ + + @Valid + public List getCategories() { + return categories; + } + + public void setCategories(List categories) { + this.categories = categories; + } + + public BrAPIScaleValidValues maximumValue(String maximumValue) { + this.maximumValue = maximumValue; + return this; + } + + /** + * Maximum value for numerical, date, and time scales. Typically used for data + * capture control and QC. + * + * @return maximumValue + **/ + public String getMaximumValue() { + return maximumValue; + } + + public void setMaximumValue(String maximumValue) { + this.maximumValue = maximumValue; + } + + public BrAPIScaleValidValues minimumValue(String minimumValue) { + this.minimumValue = minimumValue; + return this; + } + + /** + * Minimum value for numerical, date, and time scales. Typically used for data + * capture control and QC. + * + * @return minimumValue + **/ + public String getMinimumValue() { + return minimumValue; + } + + public void setMinimumValue(String minimumValue) { + this.minimumValue = minimumValue; + } + + @Deprecated + public BrAPIScaleValidValues max(Integer max) { + this.max = max; + return this; + } + + /** + * Maximum value (used for field data capture control). + * + * @return max + **/ + + @Deprecated + public Integer getMax() { + return max; + } + + @Deprecated + public void setMax(Integer max) { + this.max = max; + } + + @Deprecated + public BrAPIScaleValidValues min(Integer min) { + this.min = min; + return this; + } + + /** + * Minimum value (used for data capture control) for numerical and date scales + * + * @return min + **/ + + @Deprecated + public Integer getMin() { + return min; + } + + @Deprecated + public void setMin(Integer min) { + this.min = min; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIScaleValidValues scaleBaseClassValidValues = (BrAPIScaleValidValues) o; + return Objects.equals(this.categories, scaleBaseClassValidValues.categories) + && Objects.equals(this.max, scaleBaseClassValidValues.max) + && Objects.equals(this.maximumValue, scaleBaseClassValidValues.maximumValue) + && Objects.equals(this.min, scaleBaseClassValidValues.min) + && Objects.equals(this.minimumValue, scaleBaseClassValidValues.minimumValue); + } + + @Override + public int hashCode() { + return Objects.hash(categories, max, min); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScaleBaseClassValidValues {\n"); + + sb.append(" categories: ").append(toIndentedString(categories)).append("\n"); + sb.append(" max: ").append(toIndentedString(max)).append("\n"); + sb.append(" maximumValue: ").append(toIndentedString(maximumValue)).append("\n"); + sb.append(" min: ").append(toIndentedString(min)).append("\n"); + sb.append(" minimumValue: ").append(toIndentedString(minimumValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPITrait.java b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPITrait.java index 8dcedf5d..51686f8c 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPITrait.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPITrait.java @@ -5,16 +5,10 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.annotations.JsonAdapter; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.Accessors; import org.brapi.v2.model.BrAPIExternalReference; import org.brapi.v2.model.BrAPIOntologyReference; import org.brapi.v2.model.NullableJsonElementTypeAdapterFactory; -import javax.validation.Valid; import java.util.*; /** @@ -23,19 +17,24 @@ public class BrAPITrait { @JsonProperty("additionalInfo") - @Valid - @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) + @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) private JsonObject additionalInfo = null; + @JsonProperty("alternativeAbbreviations") - @Valid private List alternativeAbbreviations = null; @JsonProperty("attribute") private String attribute = null; + @JsonProperty("attributePUI") + private String attributePUI = null; + @JsonProperty("entity") private String entity = null; + @JsonProperty("entityPUI") + private String entityPUI = null; + @JsonProperty("externalReferences") private List externalReferences = null; @@ -49,7 +48,6 @@ public class BrAPITrait { private String status = null; @JsonProperty("synonyms") - @Valid private List synonyms = null; @JsonProperty("traitClass") @@ -61,6 +59,9 @@ public class BrAPITrait { @JsonProperty("traitName") private String traitName = null; + @JsonProperty("traitPUI") + private String traitPUI = null; + @JsonProperty("traitDbId") private String traitDbId = null; @@ -73,10 +74,10 @@ public BrAPITrait traitDbId(String traitDbId) { /** * The ID which uniquely identifies a trait + * * @return traitDbId **/ - public String getTraitDbId() { return traitDbId; } @@ -91,13 +92,13 @@ public BrAPITrait additionalInfo(JsonObject additionalInfo) { } public BrAPITrait putAdditionalInfoItem(String key, Object additionalInfoItem) { - if (this.additionalInfo == null) { - this.additionalInfo = new JsonObject(); - } - JsonElement newElement = gson.toJsonTree(additionalInfoItem); - this.additionalInfo.add(key, newElement); - return this; - } + if (this.additionalInfo == null) { + this.additionalInfo = new JsonObject(); + } + JsonElement newElement = gson.toJsonTree(additionalInfoItem); + this.additionalInfo.add(key, newElement); + return this; + } /** * Additional arbitrary info @@ -105,7 +106,6 @@ public BrAPITrait putAdditionalInfoItem(String key, Object additionalInfoItem) { * @return additionalInfo **/ - public JsonObject getAdditionalInfo() { return additionalInfo; } @@ -113,6 +113,7 @@ public JsonObject getAdditionalInfo() { public void setAdditionalInfo(JsonObject additionalInfo) { this.additionalInfo = additionalInfo; } + public BrAPITrait alternativeAbbreviations(List alternativeAbbreviations) { this.alternativeAbbreviations = alternativeAbbreviations; return this; @@ -133,7 +134,6 @@ public BrAPITrait addAlternativeAbbreviationsItem(String alternativeAbbreviation * @return alternativeAbbreviations **/ - public List getAlternativeAbbreviations() { return alternativeAbbreviations; } @@ -155,7 +155,6 @@ public BrAPITrait attribute(String attribute) { * @return attribute **/ - public String getAttribute() { return attribute; } @@ -164,6 +163,28 @@ public void setAttribute(String attribute) { this.attribute = attribute; } + public BrAPITrait attributePUI(String attributePUI) { + this.attributePUI = attributePUI; + return this; + } + + /** + * The Permanent Unique Identifier of a Trait Attribute, usually in the form of + * a URI <br/>A trait can be decomposed as \"Trait\" = + * \"Entity\" + \"Attribute\", the attribute is the observed + * feature (or characteristic) of the entity e.g., for \"grain + * colour\", attribute = \"colour\" + * + * @return attributePUI + **/ + public String getAttributePUI() { + return attributePUI; + } + + public void setAttributePUI(String attributePUI) { + this.attributePUI = attributePUI; + } + public BrAPITrait entity(String entity) { this.entity = entity; return this; @@ -177,7 +198,6 @@ public BrAPITrait entity(String entity) { * @return entity **/ - public String getEntity() { return entity; } @@ -186,6 +206,28 @@ public void setEntity(String entity) { this.entity = entity; } + public BrAPITrait entityPUI(String entityPUI) { + this.entityPUI = entityPUI; + return this; + } + + /** + * The Permanent Unique Identifier of a Trait Entity, usually in the form of a + * URI <br/>A Trait can be decomposed as \"Trait\" = + * \"Entity\" + \"Attribute\", the Entity is the part of the + * plant that the trait refers to e.g., for \"grain colour\", entity + * = \"grain\" + * + * @return entityPUI + **/ + public String getEntityPUI() { + return entityPUI; + } + + public void setEntityPUI(String entityPUI) { + this.entityPUI = entityPUI; + } + public BrAPITrait externalReferences(List externalReferences) { this.externalReferences = externalReferences; return this; @@ -197,8 +239,6 @@ public BrAPITrait externalReferences(List externalRefere * @return externalReferences **/ - - @Valid public List getExternalReferences() { return externalReferences; } @@ -219,7 +259,6 @@ public BrAPITrait mainAbbreviation(String mainAbbreviation) { * @return mainAbbreviation **/ - public String getMainAbbreviation() { return mainAbbreviation; } @@ -239,8 +278,6 @@ public BrAPITrait ontologyReference(BrAPIOntologyReference ontologyReference) { * @return ontologyReference **/ - - @Valid public BrAPIOntologyReference getOntologyReference() { return ontologyReference; } @@ -260,7 +297,6 @@ public BrAPITrait status(String status) { * @return status **/ - public String getStatus() { return status; } @@ -288,7 +324,6 @@ public BrAPITrait addSynonymsItem(String synonymsItem) { * @return synonyms **/ - public List getSynonyms() { return synonyms; } @@ -310,7 +345,6 @@ public BrAPITrait traitClass(String traitClass) { * @return traitClass **/ - public String getTraitClass() { return traitClass; } @@ -330,7 +364,6 @@ public BrAPITrait traitDescription(String traitDescription) { * @return traitDescription **/ - public String getTraitDescription() { return traitDescription; } @@ -351,7 +384,6 @@ public BrAPITrait traitName(String traitName) { * @return traitName **/ - public String getTraitName() { return traitName; } @@ -360,6 +392,24 @@ public void setTraitName(String traitName) { this.traitName = traitName; } + public BrAPITrait traitPUI(String traitPUI) { + this.traitPUI = traitPUI; + return this; + } + + /** + * The Permanent Unique Identifier of a Trait, usually in the form of a URI + * + * @return traitPUI + **/ + public String getTraitPUI() { + return traitPUI; + } + + public void setTraitPUI(String traitPUI) { + this.traitPUI = traitPUI; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -369,42 +419,46 @@ public boolean equals(java.lang.Object o) { return false; } BrAPITrait trait = (BrAPITrait) o; - return Objects.equals(this.traitDbId, trait.traitDbId) + return Objects.equals(this.additionalInfo, trait.additionalInfo) && Objects.equals(this.alternativeAbbreviations, trait.alternativeAbbreviations) && Objects.equals(this.attribute, trait.attribute) - && Objects.equals(this.entity, trait.entity) + && Objects.equals(this.attributePUI, trait.attributePUI) && Objects.equals(this.entity, trait.entity) + && Objects.equals(this.entityPUI, trait.entityPUI) && Objects.equals(this.externalReferences, trait.externalReferences) && Objects.equals(this.mainAbbreviation, trait.mainAbbreviation) && Objects.equals(this.ontologyReference, trait.ontologyReference) - && Objects.equals(this.status, trait.status) - && Objects.equals(this.synonyms, trait.synonyms) - && Objects.equals(this.traitClass, trait.traitClass) + && Objects.equals(this.status, trait.status) && Objects.equals(this.synonyms, trait.synonyms) + && Objects.equals(this.traitClass, trait.traitClass) && Objects.equals(this.traitDbId, trait.traitDbId) && Objects.equals(this.traitDescription, trait.traitDescription) - && Objects.equals(this.traitName, trait.traitName); + && Objects.equals(this.traitName, trait.traitName) && Objects.equals(this.traitPUI, trait.traitPUI); } @Override public int hashCode() { - return Objects.hash(traitDbId, alternativeAbbreviations, attribute, entity, externalReferences, mainAbbreviation, - ontologyReference, status, synonyms, traitClass, traitDescription, traitName); + return Objects.hash(traitDbId, alternativeAbbreviations, attribute, entity, externalReferences, + mainAbbreviation, ontologyReference, status, synonyms, traitClass, traitDescription, traitName); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Trait {\n"); - sb.append(" traitDbId: ").append(toIndentedString(traitDbId)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); sb.append(" alternativeAbbreviations: ").append(toIndentedString(alternativeAbbreviations)).append("\n"); sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); + sb.append(" attributePUI: ").append(toIndentedString(attributePUI)).append("\n"); sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); + sb.append(" entityPUI: ").append(toIndentedString(entityPUI)).append("\n"); sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); sb.append(" mainAbbreviation: ").append(toIndentedString(mainAbbreviation)).append("\n"); sb.append(" ontologyReference: ").append(toIndentedString(ontologyReference)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); sb.append(" traitClass: ").append(toIndentedString(traitClass)).append("\n"); + sb.append(" traitDbId: ").append(toIndentedString(traitDbId)).append("\n"); sb.append(" traitDescription: ").append(toIndentedString(traitDescription)).append("\n"); sb.append(" traitName: ").append(toIndentedString(traitName)).append("\n"); + sb.append(" traitPUI: ").append(toIndentedString(traitPUI)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPITraitDataType.java b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPITraitDataType.java index d9c4aa9f..f4eb17ed 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPITraitDataType.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/BrAPITraitDataType.java @@ -6,41 +6,74 @@ import com.fasterxml.jackson.annotation.JsonValue; /** - *

Class of the scale, entries can be

\"Code\" - This scale class is exceptionally used to express complex traits. Code is a nominal scale that combines the expressions of the different traits composing the complex trait. For example a severity trait might be expressed by a 2 digit and 2 character code. The first 2 digits are the percentage of the plant covered by a fungus and the 2 characters refer to the delay in development, e.g. \"75VD\" means \"75 %\" of the plant is infected and the plant is very delayed.

\"Date\" - The date class is for events expressed in a time format, See ISO 8601

\"Duration\" - The Duration class is for time elapsed between two events expressed in a time format, e.g. days, hours, months

\"Nominal\" - Categorical scale that can take one of a limited and fixed number of categories. There is no intrinsic ordering to the categories

\"Numerical\" - Numerical scales express the trait with real numbers. The numerical scale defines the unit e.g. centimeter, ton per hectare, branches

\"Ordinal\" - Ordinal scales are scales composed of ordered categories

\"Text\" - A free text is used to express the trait.

+ *

+ * Class of the scale, entries can be + *

+ *

+ * \"Code\" - This scale class is exceptionally used to express complex traits. + * Code is a nominal scale that combines the expressions of the different traits + * composing the complex trait. For example a severity trait might be expressed + * by a 2 digit and 2 character code. The first 2 digits are the percentage of + * the plant covered by a fungus and the 2 characters refer to the delay in + * development, e.g. \"75VD\" means \"75 %\" of the plant is infected and the + * plant is very delayed. + *

+ *

+ * \"Date\" - The date class is for events expressed in a time format, See ISO + * 8601 + *

+ *

+ * \"Duration\" - The Duration class is for time elapsed between two events + * expressed in a time format, e.g. days, hours, months + *

+ *

+ * \"Nominal\" - Categorical scale that can take one of a limited and fixed + * number of categories. There is no intrinsic ordering to the categories + *

+ *

+ * \"Numerical\" - Numerical scales express the trait with real numbers. The + * numerical scale defines the unit e.g. centimeter, ton per hectare, branches + *

+ *

+ * \"Ordinal\" - Ordinal scales are scales composed of ordered categories + *

+ *

+ * \"Text\" - A free text is used to express the trait. + *

*/ public enum BrAPITraitDataType implements BrAPIEnum { - CODE("Code"), - DATE("Date"), - DURATION("Duration"), - NOMINAL("Nominal"), - NUMERICAL("Numerical"), - ORDINAL("Ordinal"), - TEXT("Text"); - - private String value; - - BrAPITraitDataType(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static BrAPITraitDataType fromValue(String text) { - for (BrAPITraitDataType b : BrAPITraitDataType.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - -@Override -public String getBrapiValue() { - return value; -} + CODE("Code"), + DATE("Date"), + DURATION("Duration"), + NOMINAL("Nominal"), + NUMERICAL("Numerical"), + ORDINAL("Ordinal"), + TEXT("Text"); + + private String value; + + BrAPITraitDataType(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BrAPITraitDataType fromValue(String text) { + for (BrAPITraitDataType b : BrAPITraitDataType.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + @Override + public String getBrapiValue() { + return value; + } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/request/BrAPIObservationVariableSearchRequest.java b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/request/BrAPIObservationVariableSearchRequest.java index 50c7d4f9..c2b3cf32 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/request/BrAPIObservationVariableSearchRequest.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/pheno/request/BrAPIObservationVariableSearchRequest.java @@ -6,76 +6,173 @@ import java.util.ArrayList; import java.util.List; -import javax.validation.Valid; - import org.brapi.v2.model.BrAPISearchRequestParametersPaging; import org.brapi.v2.model.pheno.BrAPITraitDataType; /** - * ObservationVariableSearchRequest + * BrAPIObservationVariableSearchRequest */ - public class BrAPIObservationVariableSearchRequest extends BrAPISearchRequestParametersPaging { + @JsonProperty("commonCropNames") + private List commonCropNames = null; + + @JsonProperty("dataTypes") + private List dataTypes = null; + + @Deprecated @JsonProperty("externalReferenceIDs") - @Valid private List externalReferenceIDs = null; + @JsonProperty("externalReferenceIds") + private List externalReferenceIds = null; + @JsonProperty("externalReferenceSources") - @Valid private List externalReferenceSources = null; - @JsonProperty("dataTypes") - @Valid - private List dataTypes = null; - @JsonProperty("methodDbIds") - @Valid private List methodDbIds = null; + @JsonProperty("methodNames") + private List methodNames = null; + + @JsonProperty("methodPUIs") + private List methodPUIs = null; + @JsonProperty("observationVariableDbIds") - @Valid private List observationVariableDbIds = null; @JsonProperty("observationVariableNames") - @Valid private List observationVariableNames = null; + @JsonProperty("observationVariablePUIs") + private List observationVariablePUIs = null; + @JsonProperty("ontologyDbIds") - @Valid private List ontologyDbIds = null; + @JsonProperty("programDbIds") + private List programDbIds = null; + + @JsonProperty("programNames") + private List programNames = null; + @JsonProperty("scaleDbIds") - @Valid private List scaleDbIds = null; + @JsonProperty("scaleNames") + private List scaleNames = null; + + @JsonProperty("scalePUIs") + private List scalePUIs = null; + + @Deprecated @JsonProperty("studyDbId") - @Valid private List studyDbId = null; + @JsonProperty("studyDbIds") + private List studyDbIds = null; + + @JsonProperty("studyNames") + private List studyNames = null; + + @JsonProperty("traitAttributePUIs") + private List traitAttributePUIs = null; + + @JsonProperty("traitAttributes") + private List traitAttributes = null; + @JsonProperty("traitClasses") - @Valid private List traitClasses = null; @JsonProperty("traitDbIds") - @Valid private List traitDbIds = null; - private List observationUnitDbIds = null; + @JsonProperty("traitEntities") + private List traitEntities = null; + + @JsonProperty("traitEntityPUIs") + private List traitEntityPUIs = null; + + @JsonProperty("traitNames") + private List traitNames = null; + + @JsonProperty("traitPUIs") + private List traitPUIs = null; + + @JsonProperty("trialDbIds") + private List trialDbIds = null; + + @JsonProperty("trialNames") + private List trialNames = null; + + public BrAPIObservationVariableSearchRequest commonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + return this; + } + + public BrAPIObservationVariableSearchRequest addCommonCropNamesItem(String commonCropNamesItem) { + if (this.commonCropNames == null) { + this.commonCropNames = new ArrayList(); + } + this.commonCropNames.add(commonCropNamesItem); + return this; + } + + /** + * The BrAPI Common Crop Name is the simple, generalized, widely accepted name + * of the organism being researched. It is most often used in multi-crop systems + * where digital resources need to be divided at a high level. Things like + * 'Maize', 'Wheat', and 'Rice' are examples of + * common crop names. Use this parameter to only return results associated with + * the given crops. Use `GET /commoncropnames` to find the list of + * available crops on a server. + * + * @return commonCropNames + **/ + + public List getCommonCropNames() { + return commonCropNames; + } + + public void setCommonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + } + + public BrAPIObservationVariableSearchRequest dataTypes(List dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + public BrAPIObservationVariableSearchRequest addDataTypesItem(BrAPITraitDataType dataTypesItem) { + if (this.dataTypes == null) { + this.dataTypes = new ArrayList(); + } + this.dataTypes.add(dataTypesItem); + return this; + } + + /** + * List of scale data types to filter search results + * + * @return dataTypes + **/ - public List getObservationUnitDbIds() { - return observationUnitDbIds; + public List getDataTypes() { + return dataTypes; } - public void setObservationUnitDbIds(List observationUnitDbIds) { - this.observationUnitDbIds = observationUnitDbIds; + public void setDataTypes(List dataTypes) { + this.dataTypes = dataTypes; } + @Deprecated public BrAPIObservationVariableSearchRequest externalReferenceIDs(List externalReferenceIDs) { this.externalReferenceIDs = externalReferenceIDs; return this; } + @Deprecated public BrAPIObservationVariableSearchRequest addExternalReferenceIDsItem(String externalReferenceIDsItem) { if (this.externalReferenceIDs == null) { this.externalReferenceIDs = new ArrayList(); @@ -85,74 +182,77 @@ public BrAPIObservationVariableSearchRequest addExternalReferenceIDsItem(String } /** - * List of external references for the trait to search for - * + * **Deprecated in v2.1** Please use `externalReferenceIds`. Github + * issue number #460 <br>List of external reference IDs. Could be a simple + * strings or a URIs. (use with `externalReferenceSources` parameter) + * * @return externalReferenceIDs **/ - + @Deprecated public List getExternalReferenceIDs() { return externalReferenceIDs; } + @Deprecated public void setExternalReferenceIDs(List externalReferenceIDs) { this.externalReferenceIDs = externalReferenceIDs; } - public BrAPIObservationVariableSearchRequest externalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; + public BrAPIObservationVariableSearchRequest externalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; return this; } - public BrAPIObservationVariableSearchRequest addExternalReferenceSourcesItem(String externalReferenceSourcesItem) { - if (this.externalReferenceSources == null) { - this.externalReferenceSources = new ArrayList(); + public BrAPIObservationVariableSearchRequest addExternalReferenceIdsItem(String externalReferenceIdsItem) { + if (this.externalReferenceIds == null) { + this.externalReferenceIds = new ArrayList(); } - this.externalReferenceSources.add(externalReferenceSourcesItem); + this.externalReferenceIds.add(externalReferenceIdsItem); return this; } /** - * List of external references sources for the trait to search for - * - * @return externalReferenceSources + * List of external reference IDs. Could be a simple strings or a URIs. (use + * with `externalReferenceSources` parameter) + * + * @return externalReferenceIds **/ - - public List getExternalReferenceSources() { - return externalReferenceSources; + public List getExternalReferenceIds() { + return externalReferenceIds; } - public void setExternalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; + public void setExternalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; } - public BrAPIObservationVariableSearchRequest dataTypes(List dataTypes) { - this.dataTypes = dataTypes; + public BrAPIObservationVariableSearchRequest externalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; return this; } - public BrAPIObservationVariableSearchRequest addDataTypesItem(BrAPITraitDataType dataTypesItem) { - if (this.dataTypes == null) { - this.dataTypes = new ArrayList(); + public BrAPIObservationVariableSearchRequest addExternalReferenceSourcesItem(String externalReferenceSourcesItem) { + if (this.externalReferenceSources == null) { + this.externalReferenceSources = new ArrayList(); } - this.dataTypes.add(dataTypesItem); + this.externalReferenceSources.add(externalReferenceSourcesItem); return this; } /** - * List of scale data types to filter search results - * - * @return dataTypes + * List of identifiers for the source system or database of an external + * reference (use with `externalReferenceIDs` parameter) + * + * @return externalReferenceSources **/ - - @Valid - public List getDataTypes() { - return dataTypes; + + public List getExternalReferenceSources() { + return externalReferenceSources; } - public void setDataTypes(List dataTypes) { - this.dataTypes = dataTypes; + public void setExternalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; } public BrAPIObservationVariableSearchRequest methodDbIds(List methodDbIds) { @@ -170,10 +270,9 @@ public BrAPIObservationVariableSearchRequest addMethodDbIdsItem(String methodDbI /** * List of methods to filter search results - * + * * @return methodDbIds **/ - public List getMethodDbIds() { return methodDbIds; @@ -183,6 +282,61 @@ public void setMethodDbIds(List methodDbIds) { this.methodDbIds = methodDbIds; } + public BrAPIObservationVariableSearchRequest methodNames(List methodNames) { + this.methodNames = methodNames; + return this; + } + + public BrAPIObservationVariableSearchRequest addMethodNamesItem(String methodNamesItem) { + if (this.methodNames == null) { + this.methodNames = new ArrayList(); + } + this.methodNames.add(methodNamesItem); + return this; + } + + /** + * Human readable name for the method <br/>MIAPPE V1.1 (DM-88) Method Name + * of the method of observation + * + * @return methodNames + **/ + + public List getMethodNames() { + return methodNames; + } + + public void setMethodNames(List methodNames) { + this.methodNames = methodNames; + } + + public BrAPIObservationVariableSearchRequest methodPUIs(List methodPUIs) { + this.methodPUIs = methodPUIs; + return this; + } + + public BrAPIObservationVariableSearchRequest addMethodPUIsItem(String methodPUIsItem) { + if (this.methodPUIs == null) { + this.methodPUIs = new ArrayList(); + } + this.methodPUIs.add(methodPUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Method, usually in the form of a URI + * + * @return methodPUIs + **/ + + public List getMethodPUIs() { + return methodPUIs; + } + + public void setMethodPUIs(List methodPUIs) { + this.methodPUIs = methodPUIs; + } + public BrAPIObservationVariableSearchRequest observationVariableDbIds(List observationVariableDbIds) { this.observationVariableDbIds = observationVariableDbIds; return this; @@ -197,11 +351,10 @@ public BrAPIObservationVariableSearchRequest addObservationVariableDbIdsItem(Str } /** - * List of observation variable IDs to search for - * + * The DbIds of Variables to search for + * * @return observationVariableDbIds **/ - public List getObservationVariableDbIds() { return observationVariableDbIds; @@ -225,11 +378,10 @@ public BrAPIObservationVariableSearchRequest addObservationVariableNamesItem(Str } /** - * List of human readable observation variable names to search for - * + * The names of Variables to search for + * * @return observationVariableNames **/ - public List getObservationVariableNames() { return observationVariableNames; @@ -239,6 +391,34 @@ public void setObservationVariableNames(List observationVariableNames) { this.observationVariableNames = observationVariableNames; } + public BrAPIObservationVariableSearchRequest observationVariablePUIs(List observationVariablePUIs) { + this.observationVariablePUIs = observationVariablePUIs; + return this; + } + + public BrAPIObservationVariableSearchRequest addObservationVariablePUIsItem(String observationVariablePUIsItem) { + if (this.observationVariablePUIs == null) { + this.observationVariablePUIs = new ArrayList(); + } + this.observationVariablePUIs.add(observationVariablePUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of an Observation Variable, usually in the + * form of a URI + * + * @return observationVariablePUIs + **/ + + public List getObservationVariablePUIs() { + return observationVariablePUIs; + } + + public void setObservationVariablePUIs(List observationVariablePUIs) { + this.observationVariablePUIs = observationVariablePUIs; + } + public BrAPIObservationVariableSearchRequest ontologyDbIds(List ontologyDbIds) { this.ontologyDbIds = ontologyDbIds; return this; @@ -254,10 +434,9 @@ public BrAPIObservationVariableSearchRequest addOntologyDbIdsItem(String ontolog /** * List of ontology IDs to search for - * + * * @return ontologyDbIds **/ - public List getOntologyDbIds() { return ontologyDbIds; @@ -267,6 +446,66 @@ public void setOntologyDbIds(List ontologyDbIds) { this.ontologyDbIds = ontologyDbIds; } + public BrAPIObservationVariableSearchRequest programDbIds(List programDbIds) { + this.programDbIds = programDbIds; + return this; + } + + public BrAPIObservationVariableSearchRequest addProgramDbIdsItem(String programDbIdsItem) { + if (this.programDbIds == null) { + this.programDbIds = new ArrayList(); + } + this.programDbIds.add(programDbIdsItem); + return this; + } + + /** + * A BrAPI Program represents the high level organization or group who is + * responsible for conducting trials and studies. Things like Breeding Programs + * and Funded Projects are considered BrAPI Programs. Use this parameter to only + * return results associated with the given programs. Use `GET + * /programs` to find the list of available programs on a server. + * + * @return programDbIds + **/ + + public List getProgramDbIds() { + return programDbIds; + } + + public void setProgramDbIds(List programDbIds) { + this.programDbIds = programDbIds; + } + + public BrAPIObservationVariableSearchRequest programNames(List programNames) { + this.programNames = programNames; + return this; + } + + public BrAPIObservationVariableSearchRequest addProgramNamesItem(String programNamesItem) { + if (this.programNames == null) { + this.programNames = new ArrayList(); + } + this.programNames.add(programNamesItem); + return this; + } + + /** + * Use this parameter to only return results associated with the given program + * names. Program names are not required to be unique. Use `GET + * /programs` to find the list of available programs on a server. + * + * @return programNames + **/ + + public List getProgramNames() { + return programNames; + } + + public void setProgramNames(List programNames) { + this.programNames = programNames; + } + public BrAPIObservationVariableSearchRequest scaleDbIds(List scaleDbIds) { this.scaleDbIds = scaleDbIds; return this; @@ -281,11 +520,10 @@ public BrAPIObservationVariableSearchRequest addScaleDbIdsItem(String scaleDbIds } /** - * List of scales to filter search results - * + * The unique identifier for a Scale + * * @return scaleDbIds **/ - public List getScaleDbIds() { return scaleDbIds; @@ -295,11 +533,68 @@ public void setScaleDbIds(List scaleDbIds) { this.scaleDbIds = scaleDbIds; } + public BrAPIObservationVariableSearchRequest scaleNames(List scaleNames) { + this.scaleNames = scaleNames; + return this; + } + + public BrAPIObservationVariableSearchRequest addScaleNamesItem(String scaleNamesItem) { + if (this.scaleNames == null) { + this.scaleNames = new ArrayList(); + } + this.scaleNames.add(scaleNamesItem); + return this; + } + + /** + * Name of the scale <br/>MIAPPE V1.1 (DM-92) Scale Name of the scale + * associated with the variable + * + * @return scaleNames + **/ + + public List getScaleNames() { + return scaleNames; + } + + public void setScaleNames(List scaleNames) { + this.scaleNames = scaleNames; + } + + public BrAPIObservationVariableSearchRequest scalePUIs(List scalePUIs) { + this.scalePUIs = scalePUIs; + return this; + } + + public BrAPIObservationVariableSearchRequest addScalePUIsItem(String scalePUIsItem) { + if (this.scalePUIs == null) { + this.scalePUIs = new ArrayList(); + } + this.scalePUIs.add(scalePUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Scale, usually in the form of a URI + * + * @return scalePUIs + **/ + + public List getScalePUIs() { + return scalePUIs; + } + + public void setScalePUIs(List scalePUIs) { + this.scalePUIs = scalePUIs; + } + + @Deprecated public BrAPIObservationVariableSearchRequest studyDbId(List studyDbId) { this.studyDbId = studyDbId; return this; } + @Deprecated public BrAPIObservationVariableSearchRequest addStudyDbIdItem(String studyDbIdItem) { if (this.studyDbId == null) { this.studyDbId = new ArrayList(); @@ -309,20 +604,137 @@ public BrAPIObservationVariableSearchRequest addStudyDbIdItem(String studyDbIdIt } /** - * The unique ID of a studies to filter on - * + * **Deprecated in v2.1** Please use `studyDbIds`. Github issue number + * #483 <br>The unique ID of a studies to filter on + * * @return studyDbId **/ - + @Deprecated public List getStudyDbId() { return studyDbId; } + @Deprecated public void setStudyDbId(List studyDbId) { this.studyDbId = studyDbId; } + public BrAPIObservationVariableSearchRequest studyDbIds(List studyDbIds) { + this.studyDbIds = studyDbIds; + return this; + } + + public BrAPIObservationVariableSearchRequest addStudyDbIdsItem(String studyDbIdsItem) { + if (this.studyDbIds == null) { + this.studyDbIds = new ArrayList(); + } + this.studyDbIds.add(studyDbIdsItem); + return this; + } + + /** + * List of study identifiers to search for + * + * @return studyDbIds + **/ + + public List getStudyDbIds() { + return studyDbIds; + } + + public void setStudyDbIds(List studyDbIds) { + this.studyDbIds = studyDbIds; + } + + public BrAPIObservationVariableSearchRequest studyNames(List studyNames) { + this.studyNames = studyNames; + return this; + } + + public BrAPIObservationVariableSearchRequest addStudyNamesItem(String studyNamesItem) { + if (this.studyNames == null) { + this.studyNames = new ArrayList(); + } + this.studyNames.add(studyNamesItem); + return this; + } + + /** + * List of study names to filter search results + * + * @return studyNames + **/ + + public List getStudyNames() { + return studyNames; + } + + public void setStudyNames(List studyNames) { + this.studyNames = studyNames; + } + + public BrAPIObservationVariableSearchRequest traitAttributePUIs(List traitAttributePUIs) { + this.traitAttributePUIs = traitAttributePUIs; + return this; + } + + public BrAPIObservationVariableSearchRequest addTraitAttributePUIsItem(String traitAttributePUIsItem) { + if (this.traitAttributePUIs == null) { + this.traitAttributePUIs = new ArrayList(); + } + this.traitAttributePUIs.add(traitAttributePUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Trait Attribute, usually in the form of + * a URI <br/>A trait can be decomposed as \"Trait\" = + * \"Entity\" + \"Attribute\", the attribute is the observed + * feature (or characteristic) of the entity e.g., for \"grain + * colour\", attribute = \"colour\" + * + * @return traitAttributePUIs + **/ + + public List getTraitAttributePUIs() { + return traitAttributePUIs; + } + + public void setTraitAttributePUIs(List traitAttributePUIs) { + this.traitAttributePUIs = traitAttributePUIs; + } + + public BrAPIObservationVariableSearchRequest traitAttributes(List traitAttributes) { + this.traitAttributes = traitAttributes; + return this; + } + + public BrAPIObservationVariableSearchRequest addTraitAttributesItem(String traitAttributesItem) { + if (this.traitAttributes == null) { + this.traitAttributes = new ArrayList(); + } + this.traitAttributes.add(traitAttributesItem); + return this; + } + + /** + * A trait can be decomposed as \"Trait\" = \"Entity\" + * + \"Attribute\", the attribute is the observed feature (or + * characteristic) of the entity e.g., for \"grain colour\", attribute + * = \"colour\" + * + * @return traitAttributes + **/ + + public List getTraitAttributes() { + return traitAttributes; + } + + public void setTraitAttributes(List traitAttributes) { + this.traitAttributes = traitAttributes; + } + public BrAPIObservationVariableSearchRequest traitClasses(List traitClasses) { this.traitClasses = traitClasses; return this; @@ -338,10 +750,9 @@ public BrAPIObservationVariableSearchRequest addTraitClassesItem(String traitCla /** * List of trait classes to filter search results - * + * * @return traitClasses **/ - public List getTraitClasses() { return traitClasses; @@ -365,11 +776,10 @@ public BrAPIObservationVariableSearchRequest addTraitDbIdsItem(String traitDbIds } /** - * List of trait unique ID to filter search results - * + * The unique identifier for a Trait + * * @return traitDbIds **/ - public List getTraitDbIds() { return traitDbIds; @@ -379,8 +789,178 @@ public void setTraitDbIds(List traitDbIds) { this.traitDbIds = traitDbIds; } + public BrAPIObservationVariableSearchRequest traitEntities(List traitEntities) { + this.traitEntities = traitEntities; + return this; + } + + public BrAPIObservationVariableSearchRequest addTraitEntitiesItem(String traitEntitiesItem) { + if (this.traitEntities == null) { + this.traitEntities = new ArrayList(); + } + this.traitEntities.add(traitEntitiesItem); + return this; + } + + /** + * A trait can be decomposed as \"Trait\" = \"Entity\" + * + \"Attribute\", the entity is the part of the plant that the trait + * refers to e.g., for \"grain colour\", entity = + * \"grain\" + * + * @return traitEntities + **/ + + public List getTraitEntities() { + return traitEntities; + } + + public void setTraitEntities(List traitEntities) { + this.traitEntities = traitEntities; + } + + public BrAPIObservationVariableSearchRequest traitEntityPUIs(List traitEntityPUIs) { + this.traitEntityPUIs = traitEntityPUIs; + return this; + } + + public BrAPIObservationVariableSearchRequest addTraitEntityPUIsItem(String traitEntityPUIsItem) { + if (this.traitEntityPUIs == null) { + this.traitEntityPUIs = new ArrayList(); + } + this.traitEntityPUIs.add(traitEntityPUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Trait Entity, usually in the form of a + * URI <br/>A trait can be decomposed as \"Trait\" = + * \"Entity\" + \"Attribute\", the entity is the part of the + * plant that the trait refers to e.g., for \"grain colour\", entity + * = \"grain\" + * + * @return traitEntityPUIs + **/ + + public List getTraitEntityPUIs() { + return traitEntityPUIs; + } + + public void setTraitEntityPUIs(List traitEntityPUIs) { + this.traitEntityPUIs = traitEntityPUIs; + } + + public BrAPIObservationVariableSearchRequest traitNames(List traitNames) { + this.traitNames = traitNames; + return this; + } + + public BrAPIObservationVariableSearchRequest addTraitNamesItem(String traitNamesItem) { + if (this.traitNames == null) { + this.traitNames = new ArrayList(); + } + this.traitNames.add(traitNamesItem); + return this; + } + + /** + * The human readable name of a trait <br/>MIAPPE V1.1 (DM-86) Trait - + * Name of the (plant or environmental) trait under observation + * + * @return traitNames + **/ + + public List getTraitNames() { + return traitNames; + } + + public void setTraitNames(List traitNames) { + this.traitNames = traitNames; + } + + public BrAPIObservationVariableSearchRequest traitPUIs(List traitPUIs) { + this.traitPUIs = traitPUIs; + return this; + } + + public BrAPIObservationVariableSearchRequest addTraitPUIsItem(String traitPUIsItem) { + if (this.traitPUIs == null) { + this.traitPUIs = new ArrayList(); + } + this.traitPUIs.add(traitPUIsItem); + return this; + } + + /** + * The Permanent Unique Identifier of a Trait, usually in the form of a URI + * + * @return traitPUIs + **/ + + public List getTraitPUIs() { + return traitPUIs; + } + + public void setTraitPUIs(List traitPUIs) { + this.traitPUIs = traitPUIs; + } + + public BrAPIObservationVariableSearchRequest trialDbIds(List trialDbIds) { + this.trialDbIds = trialDbIds; + return this; + } + + public BrAPIObservationVariableSearchRequest addTrialDbIdsItem(String trialDbIdsItem) { + if (this.trialDbIds == null) { + this.trialDbIds = new ArrayList(); + } + this.trialDbIds.add(trialDbIdsItem); + return this; + } + + /** + * The ID which uniquely identifies a trial to search for + * + * @return trialDbIds + **/ + + public List getTrialDbIds() { + return trialDbIds; + } + + public void setTrialDbIds(List trialDbIds) { + this.trialDbIds = trialDbIds; + } + + public BrAPIObservationVariableSearchRequest trialNames(List trialNames) { + this.trialNames = trialNames; + return this; + } + + public BrAPIObservationVariableSearchRequest addTrialNamesItem(String trialNamesItem) { + if (this.trialNames == null) { + this.trialNames = new ArrayList(); + } + this.trialNames.add(trialNamesItem); + return this; + } + + /** + * The human readable name of a trial to search for + * + * @return trialNames + **/ + + public List getTrialNames() { + return trialNames; + } + + public void setTrialNames(List trialNames) { + this.trialNames = trialNames; + } + @Override - public boolean equals(java.lang.Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -388,45 +968,87 @@ public boolean equals(java.lang.Object o) { return false; } BrAPIObservationVariableSearchRequest observationVariableSearchRequest = (BrAPIObservationVariableSearchRequest) o; - return Objects.equals(this.externalReferenceIDs, observationVariableSearchRequest.externalReferenceIDs) + return Objects.equals(this.commonCropNames, observationVariableSearchRequest.commonCropNames) + && Objects.equals(this.dataTypes, observationVariableSearchRequest.dataTypes) + && Objects.equals(this.externalReferenceIDs, observationVariableSearchRequest.externalReferenceIDs) + && Objects.equals(this.externalReferenceIds, observationVariableSearchRequest.externalReferenceIds) && Objects.equals(this.externalReferenceSources, observationVariableSearchRequest.externalReferenceSources) - && Objects.equals(this.dataTypes, observationVariableSearchRequest.dataTypes) && Objects.equals(this.methodDbIds, observationVariableSearchRequest.methodDbIds) + && Objects.equals(this.methodNames, observationVariableSearchRequest.methodNames) + && Objects.equals(this.methodPUIs, observationVariableSearchRequest.methodPUIs) && Objects.equals(this.observationVariableDbIds, observationVariableSearchRequest.observationVariableDbIds) && Objects.equals(this.observationVariableNames, observationVariableSearchRequest.observationVariableNames) + && Objects.equals(this.observationVariablePUIs, + observationVariableSearchRequest.observationVariablePUIs) && Objects.equals(this.ontologyDbIds, observationVariableSearchRequest.ontologyDbIds) + && Objects.equals(this.programDbIds, observationVariableSearchRequest.programDbIds) + && Objects.equals(this.programNames, observationVariableSearchRequest.programNames) && Objects.equals(this.scaleDbIds, observationVariableSearchRequest.scaleDbIds) + && Objects.equals(this.scaleNames, observationVariableSearchRequest.scaleNames) + && Objects.equals(this.scalePUIs, observationVariableSearchRequest.scalePUIs) && Objects.equals(this.studyDbId, observationVariableSearchRequest.studyDbId) + && Objects.equals(this.studyDbIds, observationVariableSearchRequest.studyDbIds) + && Objects.equals(this.studyNames, observationVariableSearchRequest.studyNames) + && Objects.equals(this.traitAttributePUIs, observationVariableSearchRequest.traitAttributePUIs) + && Objects.equals(this.traitAttributes, observationVariableSearchRequest.traitAttributes) && Objects.equals(this.traitClasses, observationVariableSearchRequest.traitClasses) - && Objects.equals(this.traitDbIds, observationVariableSearchRequest.traitDbIds) && super.equals(o); + && Objects.equals(this.traitDbIds, observationVariableSearchRequest.traitDbIds) + && Objects.equals(this.traitEntities, observationVariableSearchRequest.traitEntities) + && Objects.equals(this.traitEntityPUIs, observationVariableSearchRequest.traitEntityPUIs) + && Objects.equals(this.traitNames, observationVariableSearchRequest.traitNames) + && Objects.equals(this.traitPUIs, observationVariableSearchRequest.traitPUIs) + && Objects.equals(this.trialDbIds, observationVariableSearchRequest.trialDbIds) + && Objects.equals(this.trialNames, observationVariableSearchRequest.trialNames); } @Override public int hashCode() { - return Objects.hash(externalReferenceIDs, externalReferenceSources, dataTypes, methodDbIds, - observationVariableDbIds, observationVariableNames, ontologyDbIds, scaleDbIds, studyDbId, traitClasses, - traitDbIds, super.hashCode()); + return Objects.hash(commonCropNames, dataTypes, externalReferenceIDs, externalReferenceIds, + externalReferenceSources, methodDbIds, methodNames, methodPUIs, observationVariableDbIds, + observationVariableNames, observationVariablePUIs, ontologyDbIds, programDbIds, programNames, + scaleDbIds, scaleNames, scalePUIs, studyDbId, studyDbIds, studyNames, traitAttributePUIs, + traitAttributes, traitClasses, traitDbIds, traitEntities, traitEntityPUIs, traitNames, traitPUIs, + trialDbIds, trialNames); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ObservationVariableSearchRequest {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("class BrAPIObservationVariableSearchRequest {\n"); + + sb.append(" commonCropNames: ").append(toIndentedString(commonCropNames)).append("\n"); + sb.append(" dataTypes: ").append(toIndentedString(dataTypes)).append("\n"); sb.append(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); + sb.append(" externalReferenceIds: ").append(toIndentedString(externalReferenceIds)).append("\n"); sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); - sb.append(" dataTypes: ").append(toIndentedString(dataTypes)).append("\n"); sb.append(" methodDbIds: ").append(toIndentedString(methodDbIds)).append("\n"); + sb.append(" methodNames: ").append(toIndentedString(methodNames)).append("\n"); + sb.append(" methodPUIs: ").append(toIndentedString(methodPUIs)).append("\n"); sb.append(" observationVariableDbIds: ").append(toIndentedString(observationVariableDbIds)).append("\n"); sb.append(" observationVariableNames: ").append(toIndentedString(observationVariableNames)).append("\n"); + sb.append(" observationVariablePUIs: ").append(toIndentedString(observationVariablePUIs)).append("\n"); sb.append(" ontologyDbIds: ").append(toIndentedString(ontologyDbIds)).append("\n"); + sb.append(" programDbIds: ").append(toIndentedString(programDbIds)).append("\n"); + sb.append(" programNames: ").append(toIndentedString(programNames)).append("\n"); sb.append(" scaleDbIds: ").append(toIndentedString(scaleDbIds)).append("\n"); + sb.append(" scaleNames: ").append(toIndentedString(scaleNames)).append("\n"); + sb.append(" scalePUIs: ").append(toIndentedString(scalePUIs)).append("\n"); sb.append(" studyDbId: ").append(toIndentedString(studyDbId)).append("\n"); + sb.append(" studyDbIds: ").append(toIndentedString(studyDbIds)).append("\n"); + sb.append(" studyNames: ").append(toIndentedString(studyNames)).append("\n"); + sb.append(" traitAttributePUIs: ").append(toIndentedString(traitAttributePUIs)).append("\n"); + sb.append(" traitAttributes: ").append(toIndentedString(traitAttributes)).append("\n"); sb.append(" traitClasses: ").append(toIndentedString(traitClasses)).append("\n"); sb.append(" traitDbIds: ").append(toIndentedString(traitDbIds)).append("\n"); + sb.append(" traitEntities: ").append(toIndentedString(traitEntities)).append("\n"); + sb.append(" traitEntityPUIs: ").append(toIndentedString(traitEntityPUIs)).append("\n"); + sb.append(" traitNames: ").append(toIndentedString(traitNames)).append("\n"); + sb.append(" traitPUIs: ").append(toIndentedString(traitPUIs)).append("\n"); + sb.append(" trialDbIds: ").append(toIndentedString(trialDbIds)).append("\n"); + sb.append(" trialNames: ").append(toIndentedString(trialNames)).append("\n"); sb.append("}"); return sb.toString(); } @@ -435,10 +1057,11 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(java.lang.Object o) { + private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } + }