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..cbef452f 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 @@ -47,7 +47,32 @@ public class GermplasmQueryParams extends BrAPIQueryParams { private String synonym; private String parentDbId; private String progenyDbId; - 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/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/ServerInfoApi.java b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ServerInfoApi.java index 338e9e84..45d3b34c 100644 --- a/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ServerInfoApi.java +++ b/brapi-java-client/src/main/java/org/brapi/client/v2/modules/core/ServerInfoApi.java @@ -28,93 +28,128 @@ import org.brapi.v2.model.core.response.BrAPIServerInfoResponse; public class ServerInfoApi { - private BrAPIClient apiClient; - - public ServerInfoApi() { - this(Configuration.getDefaultApiClient()); - } - - public ServerInfoApi(BrAPIClient apiClient) { - this.apiClient = apiClient; - } - - public BrAPIClient getApiClient() { - return apiClient; - } - - public void setApiClient(BrAPIClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Build call for serverinfoGet - * @param dataType The data format supported by the call. (optional) - - - - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - */ - private Call serverinfoGetCall(BrAPIWSMIMEDataTypes dataType) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/serverinfo"; - - Map localVarQueryParams = new HashMap<>(); - Map localVarCollectionQueryParams = new HashMap<>(); - if (dataType != null) - apiClient.prepQueryParameter(localVarQueryParams, "dataType", dataType); - - Map localVarHeaderParams = new HashMap(); - - - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "AuthorizationToken" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); - } - - /** - * Get the list of implemented Calls - * Implementation Notes Having a consistent structure for the path string of each call is very important for teams to be able to connect and find errors. Read more on Github. Here are the rules for the path of each call that should be returned Every word in the call path should match the documentation exactly, both in spelling and capitalization. Note that path strings are all lower case, but path parameters are camel case. Each path should start relative to \\\"/\\\" and therefore should not include \\\"/\\\" No leading or trailing slashes (\\\"/\\\") Path parameters are wrapped in curly braces (\\\"{}\\\"). The name of the path parameter should be spelled exactly as it is specified in the documentation. Examples GOOD \"call\": \"germplasm/{germplasmDbId}/pedigree\" BAD \"call\": \"germplasm/{id}/pedigree\" BAD \"call\": \"germplasm/{germplasmDBid}/pedigree\" BAD \"call\": \"brapi/v2/germplasm/{germplasmDbId}/pedigree\" BAD \"call\": \"/germplasm/{germplasmDbId}/pedigree/\" BAD \"call\": \"germplasm/<germplasmDbId>/pedigree\" - * @param dataType The data format supported by the call. (optional) - - * @return ApiResponse<ServerInfoResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse serverinfoGet(BrAPIWSMIMEDataTypes dataType) throws ApiException { - Call call = serverinfoGetCall(dataType); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Get the list of implemented Calls (asynchronously) - * Implementation Notes Having a consistent structure for the path string of each call is very important for teams to be able to connect and find errors. Read more on Github. Here are the rules for the path of each call that should be returned Every word in the call path should match the documentation exactly, both in spelling and capitalization. Note that path strings are all lower case, but path parameters are camel case. Each path should start relative to \\\"/\\\" and therefore should not include \\\"/\\\" No leading or trailing slashes (\\\"/\\\") Path parameters are wrapped in curly braces (\\\"{}\\\"). The name of the path parameter should be spelled exactly as it is specified in the documentation. Examples GOOD \"call\": \"germplasm/{germplasmDbId}/pedigree\" BAD \"call\": \"germplasm/{id}/pedigree\" BAD \"call\": \"germplasm/{germplasmDBid}/pedigree\" BAD \"call\": \"brapi/v2/germplasm/{germplasmDbId}/pedigree\" BAD \"call\": \"/germplasm/{germplasmDbId}/pedigree/\" BAD \"call\": \"germplasm/<germplasmDbId>/pedigree\" - * @param dataType The data format supported by the call. (optional) - - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public Call serverinfoGetAsync(BrAPIWSMIMEDataTypes dataType, final ApiCallback callback) throws ApiException { - Call call = serverinfoGetCall(dataType); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } + private BrAPIClient apiClient; + + public ServerInfoApi() { + this(Configuration.getDefaultApiClient()); + } + + public ServerInfoApi(BrAPIClient apiClient) { + this.apiClient = apiClient; + } + + public BrAPIClient getApiClient() { + return apiClient; + } + + public void setApiClient(BrAPIClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for serverinfoGet + * + * @param contentType The data format supported by the call. (optional) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + private Call serverinfoGetCall(BrAPIWSMIMEDataTypes contentType) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/serverinfo"; + + Map localVarQueryParams = new HashMap<>(); + Map localVarCollectionQueryParams = new HashMap<>(); + if (contentType != null) + apiClient.prepQueryParameter(localVarQueryParams, "dataType", contentType); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { "application/json" }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) + localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "AuthorizationToken" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, + localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); + } + + /** + * Get the list of implemented Calls Implementation Notes Having a consistent + * structure for the path string of each call is very important for teams to be + * able to connect and find errors. Read more on Github. Here are the rules for + * the path of each call that should be returned Every word in the call path + * should match the documentation exactly, both in spelling and capitalization. + * Note that path strings are all lower case, but path parameters are camel + * case. Each path should start relative to \\\"/\\\" and therefore + * should not include \\\"/\\\" No leading or trailing slashes + * (\\\"/\\\") Path parameters are wrapped in curly braces + * (\\\"{}\\\"). The name of the path parameter should be spelled + * exactly as it is specified in the documentation. Examples GOOD + * \"call\": \"germplasm/{germplasmDbId}/pedigree\" BAD + * \"call\": \"germplasm/{id}/pedigree\" BAD + * \"call\": \"germplasm/{germplasmDBid}/pedigree\" BAD + * \"call\": \"brapi/v2/germplasm/{germplasmDbId}/pedigree\" + * BAD \"call\": \"/germplasm/{germplasmDbId}/pedigree/\" + * BAD \"call\": + * \"germplasm/<germplasmDbId>/pedigree\" + * + * @param contentType The data format supported by the call. (optional) + * + * @return ApiResponse<ServerInfoResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot + * deserialize the response body + */ + public ApiResponse serverinfoGet(BrAPIWSMIMEDataTypes contentType) throws ApiException { + Call call = serverinfoGetCall(contentType); + Type localVarReturnType = new TypeToken() { + }.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the list of implemented Calls (asynchronously) Implementation Notes + * Having a consistent structure for the path string of each call is very + * important for teams to be able to connect and find errors. Read more on + * Github. Here are the rules for the path of each call that should be returned + * Every word in the call path should match the documentation exactly, both in + * spelling and capitalization. Note that path strings are all lower case, but + * path parameters are camel case. Each path should start relative to + * \\\"/\\\" and therefore should not include \\\"/\\\" No + * leading or trailing slashes (\\\"/\\\") Path parameters are wrapped + * in curly braces (\\\"{}\\\"). The name of the path parameter should + * be spelled exactly as it is specified in the documentation. Examples GOOD + * \"call\": \"germplasm/{germplasmDbId}/pedigree\" BAD + * \"call\": \"germplasm/{id}/pedigree\" BAD + * \"call\": \"germplasm/{germplasmDBid}/pedigree\" BAD + * \"call\": \"brapi/v2/germplasm/{germplasmDbId}/pedigree\" + * BAD \"call\": \"/germplasm/{germplasmDbId}/pedigree/\" + * BAD \"call\": + * \"germplasm/<germplasmDbId>/pedigree\" + * + * @param contentType The data format supported by the call. (optional) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the + * request body object + */ + public Call serverinfoGetAsync(BrAPIWSMIMEDataTypes contentType, + final ApiCallback callback) throws ApiException { + Call call = serverinfoGetCall(contentType); + Type localVarReturnType = new TypeToken() { + }.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } } 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/core/ServerInfoApiTest.java b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/ServerInfoApiTest.java index 2efe380f..e8f8e728 100644 --- a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/ServerInfoApiTest.java +++ b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/ServerInfoApiTest.java @@ -12,18 +12,23 @@ package org.brapi.client.v2.modules.core; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + import org.brapi.client.v2.ApiResponse; +import org.brapi.client.v2.BrAPIClientTest; import org.brapi.client.v2.model.exceptions.ApiException; import org.brapi.v2.model.BrAPIWSMIMEDataTypes; import org.brapi.v2.model.core.response.BrAPIServerInfoResponse; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; /** * API tests for ServerInfoApi */ -public class ServerInfoApiTest { +@TestInstance(TestInstance.Lifecycle.PER_CLASS) +public class ServerInfoApiTest extends BrAPIClientTest { - private final ServerInfoApi api = new ServerInfoApi(); + private final ServerInfoApi api = new ServerInfoApi(this.apiClient); /** * Get the list of implemented Calls @@ -39,6 +44,6 @@ public void serverinfoGetTest() throws ApiException { ApiResponse response = api.serverinfoGet(dataType); - // TODO: test validations + assertNotEquals(0, response.getBody().getResult().getCalls().size()); } } diff --git a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/StudiesApiTest.java b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/StudiesApiTest.java index 144ee1ad..cb0c2ce6 100644 --- a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/StudiesApiTest.java +++ b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/StudiesApiTest.java @@ -26,12 +26,15 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; -import java.time.OffsetDateTime; import java.util.Arrays; import java.util.List; import java.util.Optional; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; /** * API tests for StudiesApi @@ -39,148 +42,158 @@ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class StudiesApiTest extends BrAPIClientTest { - private final StudiesApi api = new StudiesApi(this.apiClient); - - /** - * Submit a search request for Studies - * - * Get list of studies StartDate and endDate should be ISO-8601 format for dates See Search Services for additional implementation details. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void searchStudiesPostTest() throws ApiException { - OffsetDateTime offsetDateTime = OffsetDateTime.parse("2014-02-02T00:00:00Z"); - BrAPIStudySearchRequest body = new BrAPIStudySearchRequest(); - - ApiResponse, Optional>> response = api.searchStudiesPost(body); - - // TODO: test validations - } - /** - * Get the results of a Studies search request - * - * Get list of studies StartDate and endDate should be ISO-8601 format for dates See Search Services for additional implementation details. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void searchStudiesSearchResultsDbIdGetTest() throws ApiException { - String searchResultsDbId = null; - Integer page = null; - Integer pageSize = null; - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse, Optional>> response = - api.searchStudiesSearchResultsDbIdGet(searchResultsDbId, page, pageSize); - }); - - // TODO: test validations - } - /** - * Get a filtered list of Studies - * - * Get list of studies StartDate and endDate should be ISO-8601 format for dates - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void studiesGetTest() throws ApiException { - String commonCropName = null; - String studyType = null; - String programDbId = null; - String locationDbId = null; - String seasonDbId = null; - String trialDbId = null; - String studyDbId = null; - String studyName = null; - String studyCode = null; - String studyPUI = null; - String germplasmDbId = null; - String observationVariableDbId = null; - Boolean active = null; - String sortBy = null; - String sortOrder = null; - String externalReferenceID = null; - String externalReferenceSource = null; - Integer page = null; - Integer pageSize = null; - - StudyQueryParams queryParams = new StudyQueryParams(); - ApiResponse response = api.studiesGet(queryParams); - - // TODO: test validations - } - /** - * Create new Studies. - * - * Create new studies Implementation Notes StartDate and endDate should be ISO-8601 format for dates `studDbId` is generated by the server. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void studiesPostTest() throws ApiException { - List body = Arrays.asList(new BrAPIStudy()); - - ApiResponse response = api.studiesPost(body); - - // TODO: test validations - } - /** - * Get the details for a specific Study - * - * Retrieve the information of the study required for field data collection An additionalInfo field was added to provide a controlled vocabulary for less common data fields. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void studiesStudyDbIdGetTest() throws ApiException { - String studyDbId = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse response = api.studiesStudyDbIdGet(studyDbId); - }); - - // TODO: test validations - } - /** - * Update an existing Study - * - * Update an existing Study with new data - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void studiesStudyDbIdPutTest() throws ApiException { - String studyDbId = null; - BrAPIStudy body = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse response = api.studiesStudyDbIdPut(studyDbId, body); - }); - - // TODO: test validations - } - /** - * Get the Study Types - * - * Call to retrieve the list of study types. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void studytypesGetTest() throws ApiException { - Integer page = null; - Integer pageSize = null; - - ApiResponse response = api.studytypesGet(page, pageSize); - - // TODO: test validations - } + private final StudiesApi api = new StudiesApi(this.apiClient); + + /** + * Submit a search request for Studies + * + * Get list of studies StartDate and endDate should be ISO-8601 format for dates + * See Search Services for additional implementation details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchStudiesPostTest() throws ApiException { + BrAPIStudySearchRequest body = new BrAPIStudySearchRequest().addStudyDbIdsItem("study1") + .addStudyDbIdsItem("study2"); + + ApiResponse, Optional>> response = api + .searchStudiesPost(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 Studies search request + * + * Get list of studies StartDate and endDate should be ISO-8601 format for dates + * See Search Services for additional implementation details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchStudiesSearchResultsDbIdGetTest() throws ApiException { + BrAPIStudySearchRequest body = new BrAPIStudySearchRequest().addStudyDbIdsItem("study1") + .addStudyDbIdsItem("study2").addStudyDbIdsItem("study1").addStudyDbIdsItem("study2") + .addStudyDbIdsItem("study1").addStudyDbIdsItem("study2"); + + ApiResponse, Optional>> response = this.api + .searchStudiesPost(body); + 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 + .searchStudiesSearchResultsDbIdGet(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"); + } + + /** + * Get a filtered list of Studies + * + * Get list of studies StartDate and endDate should be ISO-8601 format for dates + * + * @throws ApiException if the Api call fails + */ + @Test + public void studiesGetTest() throws ApiException { + String studyDbId = "study1"; + + StudyQueryParams queryParams = new StudyQueryParams().studyDbId(studyDbId); + ApiResponse response = api.studiesGet(queryParams); + + assertEquals(1, response.getBody().getResult().getData().size()); + assertEquals(studyDbId, response.getBody().getResult().getData().get(0).getStudyDbId()); + } + + /** + * Create new Studies. + * + * Create new studies Implementation Notes StartDate and endDate should be + * ISO-8601 format for dates `studDbId` is generated by the server. + * + * @throws ApiException if the Api call fails + */ + @Test + public void studiesPostTest() throws ApiException { + BrAPIStudy study = new BrAPIStudy().studyName("Study Name"); + List body = Arrays.asList(study); + + ApiResponse response = api.studiesPost(body); + + assertEquals(1, response.getBody().getResult().getData().size()); + assertEquals(study.getStudyName(), response.getBody().getResult().getData().get(0).getStudyName()); + assertNotNull(response.getBody().getResult().getData().get(0).getStudyDbId()); + + } + + /** + * Get the details for a specific Study + * + * Retrieve the information of the study required for field data collection An + * additionalInfo field was added to provide a controlled vocabulary for less + * common data fields. + * + * @throws ApiException if the Api call fails + */ + @Test + public void studiesStudyDbIdGetTest() throws ApiException { + String studyDbId = "study1"; + + ApiResponse response = api.studiesStudyDbIdGet(studyDbId); + + assertEquals(studyDbId, response.getBody().getResult().getStudyDbId()); + } + + /** + * Update an existing Study + * + * Update an existing Study with new data + * + * @throws ApiException if the Api call fails + */ + @Test + public void studiesStudyDbIdPutTest() throws ApiException { + String studyDbId = "study1"; + BrAPIStudy body = new BrAPIStudy().studyDbId(studyDbId).studyName("New Name"); + + ApiResponse response = api.studiesStudyDbIdPut(studyDbId, body); + + assertEquals(body.getStudyName(), response.getBody().getResult().getStudyName()); + assertEquals(studyDbId, response.getBody().getResult().getStudyDbId()); + } + + /** + * Get the Study Types + * + * Call to retrieve the list of study types. + * + * @throws ApiException if the Api call fails + */ + @Test + public void studytypesGetTest() throws ApiException { + Integer page = null; + Integer pageSize = null; + + ApiResponse response = api.studytypesGet(page, pageSize); + + assertNotEquals(0, response.getBody().getResult().getData().size()); + } } 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/core/BrAPIService.java b/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIService.java index 02690c25..b93359e7 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIService.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIService.java @@ -10,184 +10,84 @@ import java.util.ArrayList; import java.util.List; -import javax.validation.Valid; - +import org.brapi.v2.model.BrAPIEnum; import org.brapi.v2.model.BrAPIWSMIMEDataTypes; /** * Service */ - public class BrAPIService { - /** - * Gets or Sets methods - */ - public enum MethodsEnum { - GET("GET"), - - POST("POST"), - PUT("PUT"), - - DELETE("DELETE"); - - @JsonCreator - public static MethodsEnum fromValue(String text) { - for (MethodsEnum b : MethodsEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - - private String value; - - MethodsEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - } - - /** - * Gets or Sets versions - */ - public enum VersionsEnum { - _0("2.0"), - - _1("2.1"), - - _2("2.2"); - - @JsonCreator - public static VersionsEnum fromValue(String text) { - for (VersionsEnum b : VersionsEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - - private String value; - - VersionsEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - } + @JsonProperty("contentTypes") + private List contentTypes = null; + @Deprecated @JsonProperty("dataTypes") - @Valid private List dataTypes = null; @JsonProperty("methods") - @Valid private List methods = new ArrayList(); @JsonProperty("service") private String service = null; + @JsonProperty("versions") - @Valid private List versions = new ArrayList(); - public BrAPIService addDataTypesItem(BrAPIWSMIMEDataTypes dataTypesItem) { - if (this.dataTypes == null) { - this.dataTypes = new ArrayList(); + public BrAPIService addContentTypesItem(BrAPIWSMIMEDataTypes contentTypesItem) { + if (this.contentTypes == null) { + this.contentTypes = new ArrayList(); } - this.dataTypes.add(dataTypesItem); + this.contentTypes.add(contentTypesItem); return this; } - public BrAPIService addMethodsItem(MethodsEnum methodsItem) { - this.methods.add(methodsItem); + public BrAPIService contentTypes(List contentTypes) { + this.contentTypes = contentTypes; return this; } - public BrAPIService addVersionsItem(VersionsEnum versionsItem) { - this.versions.add(versionsItem); + public List getContentTypes() { + return contentTypes; + } + + public void setContentTypes(List contentTypes) { + this.contentTypes = contentTypes; + } + + @Deprecated + public BrAPIService addDataTypesItem(BrAPIWSMIMEDataTypes dataTypesItem) { + if (this.dataTypes == null) { + this.dataTypes = new ArrayList(); + } + this.dataTypes.add(dataTypesItem); return this; } + @Deprecated public BrAPIService dataTypes(List dataTypes) { this.dataTypes = dataTypes; return this; } - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIService service = (BrAPIService) o; - return Objects.equals(this.dataTypes, service.dataTypes) && Objects.equals(this.methods, service.methods) - && Objects.equals(this.service, service.service) && Objects.equals(this.versions, service.versions); - } - - /** - * The possible data formats returned by the available call - * - * @return dataTypes - **/ - - @Valid + @Deprecated public List getDataTypes() { return dataTypes; } - /** - * The possible HTTP Methods to be used with the available call - * - * @return methods - **/ - - - - public List getMethods() { - return methods; - } - - /** - * The name of the available call as recorded in the documentation - * - * @return service - **/ - - - - public String getService() { - return service; + @Deprecated + public void setDataTypes(List dataTypes) { + this.dataTypes = dataTypes; } - /** - * The supported versions of a particular call - * - * @return versions - **/ - - - - public List getVersions() { - return versions; + public BrAPIService addMethodsItem(MethodsEnum methodsItem) { + this.methods.add(methodsItem); + return this; } - @Override - public int hashCode() { - return Objects.hash(dataTypes, methods, service, versions); + public List getMethods() { + return methods; } public BrAPIService methods(List methods) { @@ -195,27 +95,56 @@ public BrAPIService methods(List methods) { return this; } + public void setMethods(List methods) { + this.methods = methods; + } + + public String getService() { + return service; + } + public BrAPIService service(String service) { this.service = service; return this; } - public void setDataTypes(List dataTypes) { - this.dataTypes = dataTypes; + public void setService(String service) { + this.service = service; } - public void setMethods(List methods) { - this.methods = methods; + public BrAPIService addVersionsItem(VersionsEnum versionsItem) { + this.versions.add(versionsItem); + return this; } - public void setService(String service) { - this.service = service; + public List getVersions() { + return versions; } public void setVersions(List versions) { this.versions = versions; } + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIService service = (BrAPIService) o; + return Objects.equals(this.dataTypes, service.dataTypes) + && Objects.equals(this.contentTypes, service.contentTypes) + && Objects.equals(this.methods, service.methods) && Objects.equals(this.service, service.service) + && Objects.equals(this.versions, service.versions); + } + + @Override + public int hashCode() { + return Objects.hash(dataTypes, methods, service, versions); + } + /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). @@ -244,4 +173,80 @@ public BrAPIService versions(List versions) { this.versions = versions; return this; } + + public enum MethodsEnum implements BrAPIEnum { + GET("GET"), + + POST("POST"), + + PUT("PUT"), + + DELETE("DELETE"); + + @JsonCreator + public static MethodsEnum fromValue(String text) { + for (MethodsEnum b : MethodsEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + private String value; + + MethodsEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @Override + public String getBrapiValue() { + // TODO Auto-generated method stub + return value; + } + } + + /** + * Gets or Sets versions + */ + public enum VersionsEnum implements BrAPIEnum { + _0("2.0"), + + _1("2.1"), + + _2("2.2"); + + @JsonCreator + public static VersionsEnum fromValue(String text) { + for (VersionsEnum b : VersionsEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + private String value; + + VersionsEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @Override + public String getBrapiValue() { + return value; + } + } } diff --git a/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIStudy.java b/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIStudy.java index 27a63bb6..39018004 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIStudy.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIStudy.java @@ -13,784 +13,818 @@ import org.brapi.v2.model.NullableJsonElementTypeAdapterFactory; import org.brapi.v2.model.pheno.BrAPIObservationUnitHierarchyLevel; -import javax.validation.Valid; - - /** * Study */ - public class BrAPIStudy { - @JsonProperty("studyDbId") - private String studyDbId = null; - - @JsonProperty("active") - private Boolean active = null; - - @JsonProperty("additionalInfo") - @Valid - @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) - private JsonObject additionalInfo = null; - - @JsonProperty("commonCropName") - private String commonCropName = null; - - @JsonProperty("contacts") - @Valid - private List contacts = null; - - @JsonProperty("culturalPractices") - private String culturalPractices = null; - - @JsonProperty("dataLinks") - @Valid - private List dataLinks = null; - - @JsonProperty("documentationURL") - private String documentationURL = null; - - @JsonProperty("endDate") - private OffsetDateTime endDate = null; - - @JsonProperty("environmentParameters") - @Valid - private List environmentParameters = null; - - @JsonProperty("experimentalDesign") - private BrAPIStudyExperimentalDesign experimentalDesign = null; - - @JsonProperty("externalReferences") - private List externalReferences = null; - - @JsonProperty("growthFacility") - private BrAPIStudyGrowthFacility growthFacility = null; - - @JsonProperty("lastUpdate") - private BrAPIStudyLastUpdate lastUpdate = null; - - @JsonProperty("license") - private String license = null; - - @JsonProperty("locationDbId") - private String locationDbId = null; - - @JsonProperty("locationName") - private String locationName = null; - - @JsonProperty("observationLevels") - @Valid - private List observationLevels = null; - - @JsonProperty("observationUnitsDescription") - private String observationUnitsDescription = null; - - @JsonProperty("seasons") - @Valid - private List seasons = null; - - @JsonProperty("startDate") - private OffsetDateTime startDate = null; - - @JsonProperty("studyCode") - private String studyCode = null; - - @JsonProperty("studyDescription") - private String studyDescription = null; - - @JsonProperty("studyName") - private String studyName = null; - - @JsonProperty("studyPUI") - private String studyPUI = null; - - @JsonProperty("studyType") - private String studyType = null; - - @JsonProperty("trialDbId") - private String trialDbId = null; - - @JsonProperty("trialName") - private String trialName = null; - - private final transient Gson gson = new Gson(); - - /** - * The ID which uniquely identifies a study within the given database server MIAPPE V1.1 (DM-11) Study unique ID - Unique identifier comprising the name or identifier for the institution/database hosting the submission of the study data, and the identifier of the study in that institution. - * @return studyDbId - **/ - - public String getStudyDbId() { - return studyDbId; - } + @JsonProperty("studyDbId") + private String studyDbId = null; - public void setStudyDbId(String studyDbId) { - this.studyDbId = studyDbId; - } + @JsonProperty("active") + private Boolean active = null; - public BrAPIStudy studyDbId(String studyDbId) { - this.studyDbId = studyDbId; - return this; - } + @JsonProperty("additionalInfo") + @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) + private JsonObject additionalInfo = null; - public BrAPIStudy active(Boolean active) { - this.active = active; - return this; - } + @JsonProperty("commonCropName") + private String commonCropName = null; - /** - * Is this study currently active - * @return active - **/ + @JsonProperty("contacts") + private List contacts = null; + @JsonProperty("culturalPractices") + private String culturalPractices = null; - public Boolean isActive() { - return active; - } + @JsonProperty("dataLinks") + private List dataLinks = null; - public void setActive(Boolean active) { - this.active = active; - } + @JsonProperty("documentationURL") + private String documentationURL = null; - public BrAPIStudy additionalInfo(JsonObject additionalInfo) { - this.additionalInfo = additionalInfo; - return this; - } + @JsonProperty("endDate") + private OffsetDateTime endDate = null; - public BrAPIStudy 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 - **/ + @JsonProperty("environmentParameters") + private List environmentParameters = null; + @JsonProperty("experimentalDesign") + private BrAPIStudyExperimentalDesign experimentalDesign = null; - public JsonObject getAdditionalInfo() { - return additionalInfo; - } - - public void setAdditionalInfo(JsonObject additionalInfo) { - this.additionalInfo = additionalInfo; - } - - public BrAPIStudy commonCropName(String commonCropName) { - this.commonCropName = commonCropName; - return this; - } - - /** - * Common name for the crop associated with this study - * @return commonCropName - **/ - - - public String getCommonCropName() { - return commonCropName; - } - - public void setCommonCropName(String commonCropName) { - this.commonCropName = commonCropName; - } - - public BrAPIStudy contacts(List contacts) { - this.contacts = contacts; - return this; - } - - public BrAPIStudy addContactsItem(BrAPIContact contactsItem) { - if (this.contacts == null) { - this.contacts = new ArrayList(); - } - this.contacts.add(contactsItem); - return this; - } - - /** - * List of contact entities associated with this study - * @return contacts - **/ - - @Valid - public List getContacts() { - return contacts; - } - - public void setContacts(List contacts) { - this.contacts = contacts; - } - - public BrAPIStudy culturalPractices(String culturalPractices) { - this.culturalPractices = culturalPractices; - return this; - } - - /** - * MIAPPE V1.1 (DM-28) Cultural practices - General description of the cultural practices of the study. - * @return culturalPractices - **/ - - - public String getCulturalPractices() { - return culturalPractices; - } - - public void setCulturalPractices(String culturalPractices) { - this.culturalPractices = culturalPractices; - } - - public BrAPIStudy dataLinks(List dataLinks) { - this.dataLinks = dataLinks; - return this; - } - - public BrAPIStudy addDataLinksItem(BrAPIDataLink dataLinksItem) { - if (this.dataLinks == null) { - this.dataLinks = new ArrayList(); - } - this.dataLinks.add(dataLinksItem); - return this; - } - - /** - * List of links to extra data files associated with this study. Extra data could include notes, images, and reference data. - * @return dataLinks - **/ - - @Valid - public List getDataLinks() { - return dataLinks; - } - - public void setDataLinks(List dataLinks) { - this.dataLinks = dataLinks; - } - - public BrAPIStudy 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; - } - - public BrAPIStudy endDate(OffsetDateTime endDate) { - this.endDate = endDate; - return this; - } - - /** - * The date the study ends MIAPPE V1.1 (DM-15) End date of study - Date and, if relevant, time when the experiment ended - * @return endDate - **/ - - - @Valid - public OffsetDateTime getEndDate() { - return endDate; - } - - public void setEndDate(OffsetDateTime endDate) { - this.endDate = endDate; - } - - public BrAPIStudy environmentParameters(List environmentParameters) { - this.environmentParameters = environmentParameters; - return this; - } - - public BrAPIStudy addEnvironmentParametersItem(BrAPIEnvironmentParameter environmentParametersItem) { - if (this.environmentParameters == null) { - this.environmentParameters = new ArrayList(); - } - this.environmentParameters.add(environmentParametersItem); - return this; - } - - /** - * Environmental parameters that were kept constant throughout the study and did not change between observation units. - * @return environmentParameters - **/ - - @Valid - public List getEnvironmentParameters() { - return environmentParameters; - } - - public void setEnvironmentParameters(List environmentParameters) { - this.environmentParameters = environmentParameters; - } - - public BrAPIStudy experimentalDesign(BrAPIStudyExperimentalDesign experimentalDesign) { - this.experimentalDesign = experimentalDesign; - return this; - } - - /** - * Get experimentalDesign - * @return experimentalDesign - **/ - - - @Valid - public BrAPIStudyExperimentalDesign getExperimentalDesign() { - return experimentalDesign; - } - - public void setExperimentalDesign(BrAPIStudyExperimentalDesign experimentalDesign) { - this.experimentalDesign = experimentalDesign; - } - - public BrAPIStudy 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 BrAPIStudy growthFacility(BrAPIStudyGrowthFacility growthFacility) { - this.growthFacility = growthFacility; - return this; - } - - /** - * Get growthFacility - * @return growthFacility - **/ - - - @Valid - public BrAPIStudyGrowthFacility getGrowthFacility() { - return growthFacility; - } - - public void setGrowthFacility(BrAPIStudyGrowthFacility growthFacility) { - this.growthFacility = growthFacility; - } - - public BrAPIStudy lastUpdate(BrAPIStudyLastUpdate lastUpdate) { - this.lastUpdate = lastUpdate; - return this; - } - - /** - * Get lastUpdate - * @return lastUpdate - **/ - - - @Valid - public BrAPIStudyLastUpdate getLastUpdate() { - return lastUpdate; - } - - public void setLastUpdate(BrAPIStudyLastUpdate lastUpdate) { - this.lastUpdate = lastUpdate; - } - - public BrAPIStudy license(String license) { - this.license = license; - return this; - } - - /** - * The usage license associated with the study data - * @return license - **/ - - - public String getLicense() { - return license; - } - - public void setLicense(String license) { - this.license = license; - } - - public BrAPIStudy locationDbId(String locationDbId) { - this.locationDbId = locationDbId; - return this; - } - - /** - * The unique identifier for a Location - * @return locationDbId - **/ + @JsonProperty("externalReferences") + private List externalReferences = null; + @JsonProperty("growthFacility") + private BrAPIStudyGrowthFacility growthFacility = null; - public String getLocationDbId() { - return locationDbId; - } - - public void setLocationDbId(String locationDbId) { - this.locationDbId = locationDbId; - } - - public BrAPIStudy locationName(String locationName) { - this.locationName = locationName; - return this; - } - - /** - * A human readable name for this location MIAPPE V1.1 (DM-18) Experimental site name - The name of the natural site, experimental field, greenhouse, phenotyping facility, etc. where the experiment took place. - * @return locationName - **/ - - - public String getLocationName() { - return locationName; - } - - public void setLocationName(String locationName) { - this.locationName = locationName; - } - - public BrAPIStudy observationLevels(List observationLevels) { - this.observationLevels = observationLevels; - return this; - } - - public BrAPIStudy addObservationLevelsItem(BrAPIObservationUnitHierarchyLevel observationLevelsItem) { - if (this.observationLevels == null) { - this.observationLevels = new ArrayList(); - } - this.observationLevels.add(observationLevelsItem); - return this; - } + @JsonProperty("lastUpdate") + private BrAPIStudyLastUpdate lastUpdate = null; - /** - * Observation levels indicate the granularity level at which the measurements are taken. `levelName` defines the level, `levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`s lower numbers are at the top of the hierarchy (ie field > 0) and higher numbers are at the bottom of the hierarchy (ie plant > 6). - * @return observationLevels - **/ - - @Valid - public List getObservationLevels() { - return observationLevels; - } + @JsonProperty("license") + private String license = null; - public void setObservationLevels(List observationLevels) { - this.observationLevels = observationLevels; - } + @JsonProperty("locationDbId") + private String locationDbId = null; - public BrAPIStudy observationUnitsDescription(String observationUnitsDescription) { - this.observationUnitsDescription = observationUnitsDescription; - return this; - } + @JsonProperty("locationName") + private String locationName = null; - /** - * MIAPPE V1.1 (DM-25) Observation unit description - General description of the observation units in the study. - * @return observationUnitsDescription - **/ - - - public String getObservationUnitsDescription() { - return observationUnitsDescription; - } + @JsonProperty("observationLevels") + private List observationLevels = null; - public void setObservationUnitsDescription(String observationUnitsDescription) { - this.observationUnitsDescription = observationUnitsDescription; - } + @JsonProperty("observationUnitsDescription") + private String observationUnitsDescription = null; - public BrAPIStudy seasons(List seasons) { - this.seasons = seasons; - return this; - } - - public BrAPIStudy addSeasonsItem(String seasonsItem) { - if (this.seasons == null) { - this.seasons = new ArrayList(); - } - this.seasons.add(seasonsItem); - return this; - } - - /** - * List of seasons over which this study was performed. - * @return seasons - **/ + @JsonProperty("observationVariableDbIds") + private List observationVariableDbIds = null; + @JsonProperty("seasons") + private List seasons = null; - public List getSeasons() { - return seasons; - } - - public void setSeasons(List seasons) { - this.seasons = seasons; - } - - public BrAPIStudy startDate(OffsetDateTime startDate) { - this.startDate = startDate; - return this; - } - - /** - * The date this study started MIAPPE V1.1 (DM-14) Start date of study - Date and, if relevant, time when the experiment started - * @return startDate - **/ + @JsonProperty("startDate") + private OffsetDateTime startDate = null; + @JsonProperty("studyCode") + private String studyCode = null; - @Valid - public OffsetDateTime getStartDate() { - return startDate; - } + @JsonProperty("studyDescription") + private String studyDescription = null; - public void setStartDate(OffsetDateTime startDate) { - this.startDate = startDate; - } - - public BrAPIStudy studyCode(String studyCode) { - this.studyCode = studyCode; - return this; - } - - /** - * A short human readable code for a study - * @return studyCode - **/ + @JsonProperty("studyName") + private String studyName = null; + @JsonProperty("studyPUI") + private String studyPUI = null; - public String getStudyCode() { - return studyCode; - } + @JsonProperty("studyType") + private String studyType = null; - public void setStudyCode(String studyCode) { - this.studyCode = studyCode; - } + @JsonProperty("trialDbId") + private String trialDbId = null; - public BrAPIStudy studyDescription(String studyDescription) { - this.studyDescription = studyDescription; - return this; - } + @JsonProperty("trialName") + private String trialName = null; - /** - * The description of this study MIAPPE V1.1 (DM-13) Study description - Human-readable text describing the study - * @return studyDescription - **/ + private final transient Gson gson = new Gson(); + /** + * The ID which uniquely identifies a study within the given database server + * MIAPPE V1.1 (DM-11) Study unique ID - Unique identifier comprising the name + * or identifier for the institution/database hosting the submission of the + * study data, and the identifier of the study in that institution. + * + * @return studyDbId + **/ - public String getStudyDescription() { - return studyDescription; - } + public String getStudyDbId() { + return studyDbId; + } - public void setStudyDescription(String studyDescription) { - this.studyDescription = studyDescription; - } + public void setStudyDbId(String studyDbId) { + this.studyDbId = studyDbId; + } - public BrAPIStudy studyName(String studyName) { - this.studyName = studyName; - return this; - } + public BrAPIStudy studyDbId(String studyDbId) { + this.studyDbId = studyDbId; + return this; + } - /** - * The human readable name for a study MIAPPE V1.1 (DM-12) Study title - Human-readable text summarising the study - * @return studyName - **/ - - - public String getStudyName() { - return studyName; - } - - public void setStudyName(String studyName) { - this.studyName = studyName; - } - - public BrAPIStudy studyPUI(String studyPUI) { - this.studyPUI = studyPUI; - return this; - } - - /** - * A permanent unique identifier associated with this study data. For example, a URI or DOI - * @return studyPUI - **/ - - - public String getStudyPUI() { - return studyPUI; - } - - public void setStudyPUI(String studyPUI) { - this.studyPUI = studyPUI; - } - - public BrAPIStudy studyType(String studyType) { - this.studyType = studyType; - return this; - } - - /** - * The type of study being performed. ex. \"Yield Trial\", etc - * @return studyType - **/ - - - public String getStudyType() { - return studyType; - } - - public void setStudyType(String studyType) { - this.studyType = studyType; - } - - public BrAPIStudy trialDbId(String trialDbId) { - this.trialDbId = trialDbId; - return this; - } - - /** - * The ID which uniquely identifies a trial - * @return trialDbId - **/ - - - public String getTrialDbId() { - return trialDbId; - } - - public void setTrialDbId(String trialDbId) { - this.trialDbId = trialDbId; - } - - public BrAPIStudy trialName(String trialName) { - this.trialName = trialName; - return this; - } - - /** - * The human readable name of a trial - * @return trialName - **/ - - - public String getTrialName() { - return trialName; - } - - public void setTrialName(String trialName) { - this.trialName = trialName; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIStudy study = (BrAPIStudy) o; - return Objects.equals(this.studyDbId, study.studyDbId) - && Objects.equals(this.active, study.active) && - Objects.equals(this.additionalInfo, study.additionalInfo) && - Objects.equals(this.commonCropName, study.commonCropName) && - Objects.equals(this.contacts, study.contacts) && - Objects.equals(this.culturalPractices, study.culturalPractices) && - Objects.equals(this.dataLinks, study.dataLinks) && - Objects.equals(this.documentationURL, study.documentationURL) && - Objects.equals(this.endDate, study.endDate) && - Objects.equals(this.environmentParameters, study.environmentParameters) && - Objects.equals(this.experimentalDesign, study.experimentalDesign) && - Objects.equals(this.externalReferences, study.externalReferences) && - Objects.equals(this.growthFacility, study.growthFacility) && - Objects.equals(this.lastUpdate, study.lastUpdate) && - Objects.equals(this.license, study.license) && - Objects.equals(this.locationDbId, study.locationDbId) && - Objects.equals(this.locationName, study.locationName) && - Objects.equals(this.observationLevels, study.observationLevels) && - Objects.equals(this.observationUnitsDescription, study.observationUnitsDescription) && - Objects.equals(this.seasons, study.seasons) && - Objects.equals(this.startDate, study.startDate) && - Objects.equals(this.studyCode, study.studyCode) && - Objects.equals(this.studyDescription, study.studyDescription) && - Objects.equals(this.studyName, study.studyName) && - Objects.equals(this.studyPUI, study.studyPUI) && - Objects.equals(this.studyType, study.studyType) && - Objects.equals(this.trialDbId, study.trialDbId) && - Objects.equals(this.trialName, study.trialName); - } - - @Override - public int hashCode() { - return Objects.hash(studyDbId, active, additionalInfo, commonCropName, contacts, culturalPractices, dataLinks, documentationURL, endDate, environmentParameters, experimentalDesign, externalReferences, growthFacility, lastUpdate, license, locationDbId, locationName, observationLevels, observationUnitsDescription, seasons, startDate, studyCode, studyDescription, studyName, studyPUI, studyType, trialDbId, trialName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Study{\n"); - sb.append(" studyDbId: ").append(toIndentedString(studyDbId)).append("\n"); - sb.append(" active: ").append(toIndentedString(active)).append("\n"); - sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" commonCropName: ").append(toIndentedString(commonCropName)).append("\n"); - sb.append(" contacts: ").append(toIndentedString(contacts)).append("\n"); - sb.append(" culturalPractices: ").append(toIndentedString(culturalPractices)).append("\n"); - sb.append(" dataLinks: ").append(toIndentedString(dataLinks)).append("\n"); - sb.append(" documentationURL: ").append(toIndentedString(documentationURL)).append("\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" environmentParameters: ").append(toIndentedString(environmentParameters)).append("\n"); - sb.append(" experimentalDesign: ").append(toIndentedString(experimentalDesign)).append("\n"); - sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); - sb.append(" growthFacility: ").append(toIndentedString(growthFacility)).append("\n"); - sb.append(" lastUpdate: ").append(toIndentedString(lastUpdate)).append("\n"); - sb.append(" license: ").append(toIndentedString(license)).append("\n"); - sb.append(" locationDbId: ").append(toIndentedString(locationDbId)).append("\n"); - sb.append(" locationName: ").append(toIndentedString(locationName)).append("\n"); - sb.append(" observationLevels: ").append(toIndentedString(observationLevels)).append("\n"); - sb.append(" observationUnitsDescription: ").append(toIndentedString(observationUnitsDescription)).append("\n"); - sb.append(" seasons: ").append(toIndentedString(seasons)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" studyCode: ").append(toIndentedString(studyCode)).append("\n"); - sb.append(" studyDescription: ").append(toIndentedString(studyDescription)).append("\n"); - sb.append(" studyName: ").append(toIndentedString(studyName)).append("\n"); - sb.append(" studyPUI: ").append(toIndentedString(studyPUI)).append("\n"); - sb.append(" studyType: ").append(toIndentedString(studyType)).append("\n"); - sb.append(" trialDbId: ").append(toIndentedString(trialDbId)).append("\n"); - sb.append(" trialName: ").append(toIndentedString(trialName)).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 BrAPIStudy active(Boolean active) { + this.active = active; + return this; + } + + /** + * Is this study currently active + * + * @return active + **/ + + public Boolean isActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public BrAPIStudy additionalInfo(JsonObject additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + public BrAPIStudy 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 BrAPIStudy commonCropName(String commonCropName) { + this.commonCropName = commonCropName; + return this; + } + + /** + * Common name for the crop associated with this study + * + * @return commonCropName + **/ + + public String getCommonCropName() { + return commonCropName; + } + + public void setCommonCropName(String commonCropName) { + this.commonCropName = commonCropName; + } + + public BrAPIStudy contacts(List contacts) { + this.contacts = contacts; + return this; + } + + public BrAPIStudy addContactsItem(BrAPIContact contactsItem) { + if (this.contacts == null) { + this.contacts = new ArrayList(); + } + this.contacts.add(contactsItem); + return this; + } + + /** + * List of contact entities associated with this study + * + * @return contacts + **/ + + public List getContacts() { + return contacts; + } + + public void setContacts(List contacts) { + this.contacts = contacts; + } + + public BrAPIStudy culturalPractices(String culturalPractices) { + this.culturalPractices = culturalPractices; + return this; + } + + /** + * MIAPPE V1.1 (DM-28) Cultural practices - General description of the cultural + * practices of the study. + * + * @return culturalPractices + **/ + + public String getCulturalPractices() { + return culturalPractices; + } + + public void setCulturalPractices(String culturalPractices) { + this.culturalPractices = culturalPractices; + } + + public BrAPIStudy dataLinks(List dataLinks) { + this.dataLinks = dataLinks; + return this; + } + + public BrAPIStudy addDataLinksItem(BrAPIDataLink dataLinksItem) { + if (this.dataLinks == null) { + this.dataLinks = new ArrayList(); + } + this.dataLinks.add(dataLinksItem); + return this; + } + + /** + * List of links to extra data files associated with this study. Extra data + * could include notes, images, and reference data. + * + * @return dataLinks + **/ + + public List getDataLinks() { + return dataLinks; + } + + public void setDataLinks(List dataLinks) { + this.dataLinks = dataLinks; + } + + public BrAPIStudy 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; + } + + public BrAPIStudy endDate(OffsetDateTime endDate) { + this.endDate = endDate; + return this; + } + + /** + * The date the study ends MIAPPE V1.1 (DM-15) End date of study - Date and, if + * relevant, time when the experiment ended + * + * @return endDate + **/ + + public OffsetDateTime getEndDate() { + return endDate; + } + + public void setEndDate(OffsetDateTime endDate) { + this.endDate = endDate; + } + + public BrAPIStudy environmentParameters(List environmentParameters) { + this.environmentParameters = environmentParameters; + return this; + } + + public BrAPIStudy addEnvironmentParametersItem(BrAPIEnvironmentParameter environmentParametersItem) { + if (this.environmentParameters == null) { + this.environmentParameters = new ArrayList(); + } + this.environmentParameters.add(environmentParametersItem); + return this; + } + + /** + * Environmental parameters that were kept constant throughout the study and did + * not change between observation units. + * + * @return environmentParameters + **/ + + public List getEnvironmentParameters() { + return environmentParameters; + } + + public void setEnvironmentParameters(List environmentParameters) { + this.environmentParameters = environmentParameters; + } + + public BrAPIStudy experimentalDesign(BrAPIStudyExperimentalDesign experimentalDesign) { + this.experimentalDesign = experimentalDesign; + return this; + } + + /** + * Get experimentalDesign + * + * @return experimentalDesign + **/ + + public BrAPIStudyExperimentalDesign getExperimentalDesign() { + return experimentalDesign; + } + + public void setExperimentalDesign(BrAPIStudyExperimentalDesign experimentalDesign) { + this.experimentalDesign = experimentalDesign; + } + + public BrAPIStudy 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 BrAPIStudy growthFacility(BrAPIStudyGrowthFacility growthFacility) { + this.growthFacility = growthFacility; + return this; + } + + /** + * Get growthFacility + * + * @return growthFacility + **/ + + public BrAPIStudyGrowthFacility getGrowthFacility() { + return growthFacility; + } + + public void setGrowthFacility(BrAPIStudyGrowthFacility growthFacility) { + this.growthFacility = growthFacility; + } + + public BrAPIStudy lastUpdate(BrAPIStudyLastUpdate lastUpdate) { + this.lastUpdate = lastUpdate; + return this; + } + + /** + * Get lastUpdate + * + * @return lastUpdate + **/ + + public BrAPIStudyLastUpdate getLastUpdate() { + return lastUpdate; + } + + public void setLastUpdate(BrAPIStudyLastUpdate lastUpdate) { + this.lastUpdate = lastUpdate; + } + + public BrAPIStudy license(String license) { + this.license = license; + return this; + } + + /** + * The usage license associated with the study data + * + * @return license + **/ + + public String getLicense() { + return license; + } + + public void setLicense(String license) { + this.license = license; + } + + public BrAPIStudy locationDbId(String locationDbId) { + this.locationDbId = locationDbId; + return this; + } + + /** + * The unique identifier for a Location + * + * @return locationDbId + **/ + + public String getLocationDbId() { + return locationDbId; + } + + public void setLocationDbId(String locationDbId) { + this.locationDbId = locationDbId; + } + + public BrAPIStudy locationName(String locationName) { + this.locationName = locationName; + return this; + } + + /** + * A human readable name for this location MIAPPE V1.1 (DM-18) Experimental site + * name - The name of the natural site, experimental field, greenhouse, + * phenotyping facility, etc. where the experiment took place. + * + * @return locationName + **/ + + public String getLocationName() { + return locationName; + } + + public void setLocationName(String locationName) { + this.locationName = locationName; + } + + public BrAPIStudy observationLevels(List observationLevels) { + this.observationLevels = observationLevels; + return this; + } + + public BrAPIStudy addObservationLevelsItem(BrAPIObservationUnitHierarchyLevel observationLevelsItem) { + if (this.observationLevels == null) { + this.observationLevels = new ArrayList(); + } + this.observationLevels.add(observationLevelsItem); + return this; + } + + /** + * Observation levels indicate the granularity level at which the measurements + * are taken. `levelName` defines the level, `levelOrder` defines where that + * level exists in the hierarchy of levels. `levelOrder`s lower numbers are at + * the top of the hierarchy (ie field > 0) and higher numbers are at the bottom + * of the hierarchy (ie plant > 6). + * + * @return observationLevels + **/ + + public List getObservationLevels() { + return observationLevels; + } + + public void setObservationLevels(List observationLevels) { + this.observationLevels = observationLevels; + } + + public BrAPIStudy observationUnitsDescription(String observationUnitsDescription) { + this.observationUnitsDescription = observationUnitsDescription; + return this; + } + + /** + * MIAPPE V1.1 (DM-25) Observation unit description - General description of the + * observation units in the study. + * + * @return observationUnitsDescription + **/ + + public String getObservationUnitsDescription() { + return observationUnitsDescription; + } + + public void setObservationUnitsDescription(String observationUnitsDescription) { + this.observationUnitsDescription = observationUnitsDescription; + } + + public BrAPIStudy observationVariableDbIds(List observationVariableDbIds) { + this.observationVariableDbIds = observationVariableDbIds; + return this; + } + + public BrAPIStudy addObservationVariableDbIdsItem(String observationVariableDbIdsItem) { + if (this.observationVariableDbIds == null) { + this.observationVariableDbIds = new ArrayList(); + } + this.observationVariableDbIds.add(observationVariableDbIdsItem); + return this; + } + + /** + * List of observationVariableDbIds over which this study was performed. + * + * @return observationVariableDbIds + **/ + + public List getObservationVariableDbIds() { + return observationVariableDbIds; + } + + public void setObservationVariableDbIds(List observationVariableDbIds) { + this.observationVariableDbIds = observationVariableDbIds; + } + + public BrAPIStudy seasons(List seasons) { + this.seasons = seasons; + return this; + } + + public BrAPIStudy addSeasonsItem(String seasonsItem) { + if (this.seasons == null) { + this.seasons = new ArrayList(); + } + this.seasons.add(seasonsItem); + return this; + } + + /** + * List of seasons over which this study was performed. + * + * @return seasons + **/ + + public List getSeasons() { + return seasons; + } + + public void setSeasons(List seasons) { + this.seasons = seasons; + } + + public BrAPIStudy startDate(OffsetDateTime startDate) { + this.startDate = startDate; + return this; + } + + /** + * The date this study started MIAPPE V1.1 (DM-14) Start date of study - Date + * and, if relevant, time when the experiment started + * + * @return startDate + **/ + + public OffsetDateTime getStartDate() { + return startDate; + } + + public void setStartDate(OffsetDateTime startDate) { + this.startDate = startDate; + } + + public BrAPIStudy studyCode(String studyCode) { + this.studyCode = studyCode; + return this; + } + + /** + * A short human readable code for a study + * + * @return studyCode + **/ + + public String getStudyCode() { + return studyCode; + } + + public void setStudyCode(String studyCode) { + this.studyCode = studyCode; + } + + public BrAPIStudy studyDescription(String studyDescription) { + this.studyDescription = studyDescription; + return this; + } + + /** + * The description of this study MIAPPE V1.1 (DM-13) Study description - + * Human-readable text describing the study + * + * @return studyDescription + **/ + + public String getStudyDescription() { + return studyDescription; + } + + public void setStudyDescription(String studyDescription) { + this.studyDescription = studyDescription; + } + + public BrAPIStudy studyName(String studyName) { + this.studyName = studyName; + return this; + } + + /** + * The human readable name for a study MIAPPE V1.1 (DM-12) Study title - + * Human-readable text summarising the study + * + * @return studyName + **/ + + public String getStudyName() { + return studyName; + } + + public void setStudyName(String studyName) { + this.studyName = studyName; + } + + public BrAPIStudy studyPUI(String studyPUI) { + this.studyPUI = studyPUI; + return this; + } + + /** + * A permanent unique identifier associated with this study data. For example, a + * URI or DOI + * + * @return studyPUI + **/ + + public String getStudyPUI() { + return studyPUI; + } + + public void setStudyPUI(String studyPUI) { + this.studyPUI = studyPUI; + } + + public BrAPIStudy studyType(String studyType) { + this.studyType = studyType; + return this; + } + + /** + * The type of study being performed. ex. \"Yield Trial\", etc + * + * @return studyType + **/ + + public String getStudyType() { + return studyType; + } + + public void setStudyType(String studyType) { + this.studyType = studyType; + } + + public BrAPIStudy trialDbId(String trialDbId) { + this.trialDbId = trialDbId; + return this; + } + + /** + * The ID which uniquely identifies a trial + * + * @return trialDbId + **/ + + public String getTrialDbId() { + return trialDbId; + } + + public void setTrialDbId(String trialDbId) { + this.trialDbId = trialDbId; + } + + public BrAPIStudy trialName(String trialName) { + this.trialName = trialName; + return this; + } + + /** + * The human readable name of a trial + * + * @return trialName + **/ + + public String getTrialName() { + return trialName; + } + + public void setTrialName(String trialName) { + this.trialName = trialName; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIStudy study = (BrAPIStudy) o; + return Objects.equals(this.studyDbId, study.studyDbId) && Objects.equals(this.active, study.active) + && Objects.equals(this.additionalInfo, study.additionalInfo) + && Objects.equals(this.commonCropName, study.commonCropName) + && Objects.equals(this.contacts, study.contacts) + && Objects.equals(this.culturalPractices, study.culturalPractices) + && Objects.equals(this.dataLinks, study.dataLinks) + && Objects.equals(this.documentationURL, study.documentationURL) + && Objects.equals(this.endDate, study.endDate) + && Objects.equals(this.environmentParameters, study.environmentParameters) + && Objects.equals(this.experimentalDesign, study.experimentalDesign) + && Objects.equals(this.externalReferences, study.externalReferences) + && Objects.equals(this.growthFacility, study.growthFacility) + && Objects.equals(this.lastUpdate, study.lastUpdate) && Objects.equals(this.license, study.license) + && Objects.equals(this.locationDbId, study.locationDbId) + && Objects.equals(this.locationName, study.locationName) + && Objects.equals(this.observationLevels, study.observationLevels) + && Objects.equals(this.observationUnitsDescription, study.observationUnitsDescription) + && Objects.equals(this.seasons, study.seasons) + && Objects.equals(this.observationVariableDbIds, study.observationVariableDbIds) + && Objects.equals(this.startDate, study.startDate) && Objects.equals(this.studyCode, study.studyCode) + && Objects.equals(this.studyDescription, study.studyDescription) + && Objects.equals(this.studyName, study.studyName) && Objects.equals(this.studyPUI, study.studyPUI) + && Objects.equals(this.studyType, study.studyType) && Objects.equals(this.trialDbId, study.trialDbId) + && Objects.equals(this.trialName, study.trialName); + } + + @Override + public int hashCode() { + return Objects.hash(studyDbId, active, additionalInfo, commonCropName, contacts, culturalPractices, dataLinks, + documentationURL, endDate, environmentParameters, experimentalDesign, externalReferences, + growthFacility, lastUpdate, license, locationDbId, locationName, observationLevels, + observationUnitsDescription, observationVariableDbIds, seasons, startDate, studyCode, studyDescription, + studyName, studyPUI, studyType, trialDbId, trialName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Study{\n"); + sb.append(" studyDbId: ").append(toIndentedString(studyDbId)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" commonCropName: ").append(toIndentedString(commonCropName)).append("\n"); + sb.append(" contacts: ").append(toIndentedString(contacts)).append("\n"); + sb.append(" culturalPractices: ").append(toIndentedString(culturalPractices)).append("\n"); + sb.append(" dataLinks: ").append(toIndentedString(dataLinks)).append("\n"); + sb.append(" documentationURL: ").append(toIndentedString(documentationURL)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" environmentParameters: ").append(toIndentedString(environmentParameters)).append("\n"); + sb.append(" experimentalDesign: ").append(toIndentedString(experimentalDesign)).append("\n"); + sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); + sb.append(" growthFacility: ").append(toIndentedString(growthFacility)).append("\n"); + sb.append(" lastUpdate: ").append(toIndentedString(lastUpdate)).append("\n"); + sb.append(" license: ").append(toIndentedString(license)).append("\n"); + sb.append(" locationDbId: ").append(toIndentedString(locationDbId)).append("\n"); + sb.append(" locationName: ").append(toIndentedString(locationName)).append("\n"); + sb.append(" observationLevels: ").append(toIndentedString(observationLevels)).append("\n"); + sb.append(" observationUnitsDescription: ").append(toIndentedString(observationUnitsDescription)) + .append("\n"); + sb.append(" ObservationVariableDbIds: ").append(toIndentedString(observationVariableDbIds)).append("\n"); + sb.append(" seasons: ").append(toIndentedString(seasons)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" studyCode: ").append(toIndentedString(studyCode)).append("\n"); + sb.append(" studyDescription: ").append(toIndentedString(studyDescription)).append("\n"); + sb.append(" studyName: ").append(toIndentedString(studyName)).append("\n"); + sb.append(" studyPUI: ").append(toIndentedString(studyPUI)).append("\n"); + sb.append(" studyType: ").append(toIndentedString(studyType)).append("\n"); + sb.append(" trialDbId: ").append(toIndentedString(trialDbId)).append("\n"); + sb.append(" trialName: ").append(toIndentedString(trialName)).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/core/request/BrAPIStudySearchRequest.java b/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPIStudySearchRequest.java index 054721c5..b00076a7 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPIStudySearchRequest.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPIStudySearchRequest.java @@ -7,8 +7,6 @@ import java.util.ArrayList; import java.util.List; -import javax.validation.Valid; - import org.brapi.v2.model.BrAPISearchRequestParametersPaging; import org.brapi.v2.model.BrAPISortBy; import org.brapi.v2.model.BrAPISortOrder; @@ -17,742 +15,795 @@ * StudySearchRequest */ +public class BrAPIStudySearchRequest extends BrAPISearchRequestParametersPaging { + @JsonProperty("commonCropNames") + private List commonCropNames = null; + + @JsonProperty("programDbIds") + private List programDbIds = null; + + @JsonProperty("programNames") + private List programNames = null; + + @JsonProperty("trialDbIds") + private List trialDbIds = null; + + @JsonProperty("trialNames") + private List trialNames = null; + + @JsonProperty("studyDbIds") + private List studyDbIds = null; + + @JsonProperty("studyNames") + private List studyNames = null; + + @JsonProperty("locationDbIds") + private List locationDbIds = null; + + @JsonProperty("locationNames") + private List locationNames = null; + + @JsonProperty("germplasmDbIds") + private List germplasmDbIds = null; + + @JsonProperty("germplasmNames") + private List germplasmNames = null; + + @JsonProperty("observationVariableDbIds") + private List observationVariableDbIds = null; + + @JsonProperty("observationVariableNames") + private List observationVariableNames = null; + + @JsonProperty("observationVariablePUIs") + private List observationVariablePUIs = null; + + @JsonProperty("externalReferenceIds") + private List externalReferenceIds = null; + + @Deprecated + @JsonProperty("externalReferenceIDs") + private List externalReferenceIDs = null; + + @JsonProperty("externalReferenceSources") + private List externalReferenceSources = null; + + @JsonProperty("active") + private Boolean active = null; + + @JsonProperty("seasonDbIds") + private List seasonDbIds = null; + + @JsonProperty("sortBy") + private BrAPISortBy sortBy = null; -public class BrAPIStudySearchRequest extends BrAPISearchRequestParametersPaging { - @JsonProperty("commonCropNames") - @Valid - private List commonCropNames = null; + @JsonProperty("sortOrder") + private BrAPISortOrder sortOrder = null; - @JsonProperty("programDbIds") - @Valid - private List programDbIds = null; + @JsonProperty("studyCodes") + private List studyCodes = null; - @JsonProperty("programNames") - @Valid - private List programNames = null; + @JsonProperty("studyPUIs") + private List studyPUIs = null; + + @JsonProperty("studyTypes") + private List studyTypes = null; - @JsonProperty("trialDbIds") - @Valid - private List trialDbIds = null; - - @JsonProperty("trialNames") - @Valid - private List trialNames = null; - - @JsonProperty("studyDbIds") - @Valid - private List studyDbIds = null; - - @JsonProperty("studyNames") - @Valid - private List studyNames = null; - - @JsonProperty("locationDbIds") - @Valid - private List locationDbIds = null; - - @JsonProperty("locationNames") - @Valid - private List locationNames = null; - - @JsonProperty("germplasmDbIds") - @Valid - private List germplasmDbIds = null; - - @JsonProperty("germplasmNames") - @Valid - private List germplasmNames = null; - - @JsonProperty("observationVariableDbIds") - @Valid - private List observationVariableDbIds = null; - - @JsonProperty("observationVariableNames") - @Valid - private List observationVariableNames = null; - - @JsonProperty("externalReferenceIDs") - @Valid - private List externalReferenceIDs = null; - - @JsonProperty("externalReferenceSources") - @Valid - private List externalReferenceSources = null; - - @JsonProperty("active") - private Boolean active = null; - - @JsonProperty("seasonDbIds") - @Valid - private List seasonDbIds = null; - - @JsonProperty("sortBy") - private BrAPISortBy sortBy = null; - - @JsonProperty("sortOrder") - private BrAPISortOrder sortOrder = null; - - @JsonProperty("studyCodes") - @Valid - private List studyCodes = null; - - @JsonProperty("studyPUIs") - @Valid - private List studyPUIs = null; - - @JsonProperty("studyTypes") - @Valid - private List studyTypes = null; - - public BrAPIStudySearchRequest commonCropNames(List commonCropNames) { - this.commonCropNames = commonCropNames; - return this; - } - - public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest programDbIds(List programDbIds) { - this.programDbIds = programDbIds; - return this; - } - - public BrAPIStudySearchRequest addProgramDbIdsItem(String programDbIdsItem) { - if (this.programDbIds == null) { - this.programDbIds = new ArrayList(); - } - this.programDbIds.add(programDbIdsItem); - return this; - } - - /** - * A program identifier to search for - * @return programDbIds - **/ - - - public List getProgramDbIds() { - return programDbIds; - } - - public void setProgramDbIds(List programDbIds) { - this.programDbIds = programDbIds; - } - - public BrAPIStudySearchRequest programNames(List programNames) { - this.programNames = programNames; - return this; - } - - public BrAPIStudySearchRequest addProgramNamesItem(String programNamesItem) { - if (this.programNames == null) { - this.programNames = new ArrayList(); - } - this.programNames.add(programNamesItem); - return this; - } - - /** - * A name of a program to search for - * @return programNames - **/ - - - public List getProgramNames() { - return programNames; - } - - public void setProgramNames(List programNames) { - this.programNames = programNames; - } - - public BrAPIStudySearchRequest trialDbIds(List trialDbIds) { - this.trialDbIds = trialDbIds; - return this; - } - - public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest trialNames(List trialNames) { - this.trialNames = trialNames; - return this; - } - - public BrAPIStudySearchRequest 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; - } - - public BrAPIStudySearchRequest studyDbIds(List studyDbIds) { - this.studyDbIds = studyDbIds; - return this; - } - - public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest studyNames(List studyNames) { - this.studyNames = studyNames; - return this; - } - - public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest locationDbIds(List locationDbIds) { - this.locationDbIds = locationDbIds; - return this; - } - - public BrAPIStudySearchRequest addLocationDbIdsItem(String locationDbIdsItem) { - if (this.locationDbIds == null) { - this.locationDbIds = new ArrayList(); - } - this.locationDbIds.add(locationDbIdsItem); - return this; - } - - /** - * The location ids to search for - * @return locationDbIds - **/ - - - public List getLocationDbIds() { - return locationDbIds; - } - - public void setLocationDbIds(List locationDbIds) { - this.locationDbIds = locationDbIds; - } - - public BrAPIStudySearchRequest locationNames(List locationNames) { - this.locationNames = locationNames; - return this; - } - - public BrAPIStudySearchRequest addLocationNamesItem(String locationNamesItem) { - if (this.locationNames == null) { - this.locationNames = new ArrayList(); - } - this.locationNames.add(locationNamesItem); - return this; - } - - /** - * A human readable names to search for - * @return locationNames - **/ - - - public List getLocationNames() { - return locationNames; - } - - public void setLocationNames(List locationNames) { - this.locationNames = locationNames; - } - - public BrAPIStudySearchRequest germplasmDbIds(List germplasmDbIds) { - this.germplasmDbIds = germplasmDbIds; - return this; - } - - public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest germplasmNames(List germplasmNames) { - this.germplasmNames = germplasmNames; - return this; - } - - public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest observationVariableDbIds(List observationVariableDbIds) { - this.observationVariableDbIds = observationVariableDbIds; - return this; - } - - public BrAPIStudySearchRequest addObservationVariableDbIdsItem(String observationVariableDbIdsItem) { - if (this.observationVariableDbIds == null) { - this.observationVariableDbIds = new ArrayList(); - } - this.observationVariableDbIds.add(observationVariableDbIdsItem); - return this; - } - - /** - * List of observation variable IDs to search for - * @return observationVariableDbIds - **/ - - - public List getObservationVariableDbIds() { - return observationVariableDbIds; - } - - public void setObservationVariableDbIds(List observationVariableDbIds) { - this.observationVariableDbIds = observationVariableDbIds; - } - - public BrAPIStudySearchRequest observationVariableNames(List observationVariableNames) { - this.observationVariableNames = observationVariableNames; - return this; - } - - public BrAPIStudySearchRequest addObservationVariableNamesItem(String observationVariableNamesItem) { - if (this.observationVariableNames == null) { - this.observationVariableNames = new ArrayList(); - } - this.observationVariableNames.add(observationVariableNamesItem); - return this; - } - - /** - * The names of Variables to search for - * @return observationVariableNames - **/ - - - public List getObservationVariableNames() { - return observationVariableNames; - } - - public void setObservationVariableNames(List observationVariableNames) { - this.observationVariableNames = observationVariableNames; - } - - public BrAPIStudySearchRequest externalReferenceIDs(List externalReferenceIDs) { - this.externalReferenceIDs = externalReferenceIDs; - return this; - } - - public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest externalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; - return this; - } - - public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest active(Boolean active) { - this.active = active; - return this; - } - - /** - * Is this study currently active - * @return active - **/ - - - public Boolean isActive() { - return active; - } - - public void setActive(Boolean active) { - this.active = active; - } - - public BrAPIStudySearchRequest seasonDbIds(List seasonDbIds) { - this.seasonDbIds = seasonDbIds; - return this; - } - - public BrAPIStudySearchRequest addSeasonDbIdsItem(String seasonDbIdsItem) { - if (this.seasonDbIds == null) { - this.seasonDbIds = new ArrayList(); - } - this.seasonDbIds.add(seasonDbIdsItem); - return this; - } - - /** - * The ID which uniquely identifies a season - * @return seasonDbIds - **/ - - - public List getSeasonDbIds() { - return seasonDbIds; - } - - public void setSeasonDbIds(List seasonDbIds) { - this.seasonDbIds = seasonDbIds; - } - - public BrAPIStudySearchRequest sortBy(BrAPISortBy sortBy) { - this.sortBy = sortBy; - return this; - } - - /** - * Name of one of the fields within the study object on which results can be sorted - * @return sortBy - **/ - - - public BrAPISortBy getSortBy() { - return sortBy; - } - - public void setSortBy(BrAPISortBy sortBy) { - this.sortBy = sortBy; - } - - public BrAPIStudySearchRequest sortOrder(BrAPISortOrder sortOrder) { - this.sortOrder = sortOrder; - return this; - } - - /** - * Order results should be sorted. ex. \"ASC\" or \"DESC\" - * @return sortOrder - **/ - - - public BrAPISortOrder getSortOrder() { - return sortOrder; - } - - public void setSortOrder(BrAPISortOrder sortOrder) { - this.sortOrder = sortOrder; - } - - public BrAPIStudySearchRequest studyCodes(List studyCodes) { - this.studyCodes = studyCodes; - return this; - } - - public BrAPIStudySearchRequest addStudyCodesItem(String studyCodesItem) { - if (this.studyCodes == null) { - this.studyCodes = new ArrayList(); - } - this.studyCodes.add(studyCodesItem); - return this; - } - - /** - * A short human readable code for a study - * @return studyCodes - **/ - - - public List getStudyCodes() { - return studyCodes; - } - - public void setStudyCodes(List studyCodes) { - this.studyCodes = studyCodes; - } - - public BrAPIStudySearchRequest studyPUIs(List studyPUIs) { - this.studyPUIs = studyPUIs; - return this; - } - - public BrAPIStudySearchRequest addStudyPUIsItem(String studyPUIsItem) { - if (this.studyPUIs == null) { - this.studyPUIs = new ArrayList(); - } - this.studyPUIs.add(studyPUIsItem); - return this; - } - - /** - * Permanent unique identifier associated with study data. For example, a URI or DOI - * @return studyPUIs - **/ - - - public List getStudyPUIs() { - return studyPUIs; - } - - public void setStudyPUIs(List studyPUIs) { - this.studyPUIs = studyPUIs; - } - - public BrAPIStudySearchRequest studyTypes(List studyTypes) { - this.studyTypes = studyTypes; - return this; - } - - public BrAPIStudySearchRequest addStudyTypesItem(String studyTypesItem) { - if (this.studyTypes == null) { - this.studyTypes = new ArrayList(); - } - this.studyTypes.add(studyTypesItem); - return this; - } - - /** - * The type of study being performed. ex. \"Yield Trial\", etc - * @return studyTypes - **/ - - - public List getStudyTypes() { - return studyTypes; - } - - public void setStudyTypes(List studyTypes) { - this.studyTypes = studyTypes; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIStudySearchRequest studySearchRequest = (BrAPIStudySearchRequest) o; - return Objects.equals(this.commonCropNames, studySearchRequest.commonCropNames) && - Objects.equals(this.programDbIds, studySearchRequest.programDbIds) && - Objects.equals(this.programNames, studySearchRequest.programNames) && - Objects.equals(this.trialDbIds, studySearchRequest.trialDbIds) && - Objects.equals(this.trialNames, studySearchRequest.trialNames) && - Objects.equals(this.studyDbIds, studySearchRequest.studyDbIds) && - Objects.equals(this.studyNames, studySearchRequest.studyNames) && - Objects.equals(this.locationDbIds, studySearchRequest.locationDbIds) && - Objects.equals(this.locationNames, studySearchRequest.locationNames) && - Objects.equals(this.germplasmDbIds, studySearchRequest.germplasmDbIds) && - Objects.equals(this.germplasmNames, studySearchRequest.germplasmNames) && - Objects.equals(this.observationVariableDbIds, studySearchRequest.observationVariableDbIds) && - Objects.equals(this.observationVariableNames, studySearchRequest.observationVariableNames) && - Objects.equals(this.externalReferenceIDs, studySearchRequest.externalReferenceIDs) && - Objects.equals(this.externalReferenceSources, studySearchRequest.externalReferenceSources) && - Objects.equals(this.active, studySearchRequest.active) && - Objects.equals(this.seasonDbIds, studySearchRequest.seasonDbIds) && - Objects.equals(this.sortBy, studySearchRequest.sortBy) && - Objects.equals(this.sortOrder, studySearchRequest.sortOrder) && - Objects.equals(this.studyCodes, studySearchRequest.studyCodes) && - Objects.equals(this.studyPUIs, studySearchRequest.studyPUIs) && - Objects.equals(this.studyTypes, studySearchRequest.studyTypes) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(commonCropNames, programDbIds, programNames, trialDbIds, trialNames, studyDbIds, studyNames, locationDbIds, locationNames, germplasmDbIds, germplasmNames, observationVariableDbIds, observationVariableNames, externalReferenceIDs, externalReferenceSources, active, seasonDbIds, sortBy, sortOrder, studyCodes, studyPUIs, studyTypes, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StudySearchRequest {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" commonCropNames: ").append(toIndentedString(commonCropNames)).append("\n"); - sb.append(" programDbIds: ").append(toIndentedString(programDbIds)).append("\n"); - sb.append(" programNames: ").append(toIndentedString(programNames)).append("\n"); - sb.append(" trialDbIds: ").append(toIndentedString(trialDbIds)).append("\n"); - sb.append(" trialNames: ").append(toIndentedString(trialNames)).append("\n"); - sb.append(" studyDbIds: ").append(toIndentedString(studyDbIds)).append("\n"); - sb.append(" studyNames: ").append(toIndentedString(studyNames)).append("\n"); - sb.append(" locationDbIds: ").append(toIndentedString(locationDbIds)).append("\n"); - sb.append(" locationNames: ").append(toIndentedString(locationNames)).append("\n"); - sb.append(" germplasmDbIds: ").append(toIndentedString(germplasmDbIds)).append("\n"); - sb.append(" germplasmNames: ").append(toIndentedString(germplasmNames)).append("\n"); - sb.append(" observationVariableDbIds: ").append(toIndentedString(observationVariableDbIds)).append("\n"); - sb.append(" observationVariableNames: ").append(toIndentedString(observationVariableNames)).append("\n"); - sb.append(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); - sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); - sb.append(" active: ").append(toIndentedString(active)).append("\n"); - sb.append(" seasonDbIds: ").append(toIndentedString(seasonDbIds)).append("\n"); - sb.append(" sortBy: ").append(toIndentedString(sortBy)).append("\n"); - sb.append(" sortOrder: ").append(toIndentedString(sortOrder)).append("\n"); - sb.append(" studyCodes: ").append(toIndentedString(studyCodes)).append("\n"); - sb.append(" studyPUIs: ").append(toIndentedString(studyPUIs)).append("\n"); - sb.append(" studyTypes: ").append(toIndentedString(studyTypes)).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 BrAPIStudySearchRequest commonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + return this; + } + + public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest programDbIds(List programDbIds) { + this.programDbIds = programDbIds; + return this; + } + + public BrAPIStudySearchRequest addProgramDbIdsItem(String programDbIdsItem) { + if (this.programDbIds == null) { + this.programDbIds = new ArrayList(); + } + this.programDbIds.add(programDbIdsItem); + return this; + } + + /** + * A program identifier to search for + * + * @return programDbIds + **/ + + public List getProgramDbIds() { + return programDbIds; + } + + public void setProgramDbIds(List programDbIds) { + this.programDbIds = programDbIds; + } + + public BrAPIStudySearchRequest programNames(List programNames) { + this.programNames = programNames; + return this; + } + + public BrAPIStudySearchRequest addProgramNamesItem(String programNamesItem) { + if (this.programNames == null) { + this.programNames = new ArrayList(); + } + this.programNames.add(programNamesItem); + return this; + } + + /** + * A name of a program to search for + * + * @return programNames + **/ + + public List getProgramNames() { + return programNames; + } + + public void setProgramNames(List programNames) { + this.programNames = programNames; + } + + public BrAPIStudySearchRequest trialDbIds(List trialDbIds) { + this.trialDbIds = trialDbIds; + return this; + } + + public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest trialNames(List trialNames) { + this.trialNames = trialNames; + return this; + } + + public BrAPIStudySearchRequest 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; + } + + public BrAPIStudySearchRequest studyDbIds(List studyDbIds) { + this.studyDbIds = studyDbIds; + return this; + } + + public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest studyNames(List studyNames) { + this.studyNames = studyNames; + return this; + } + + public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest locationDbIds(List locationDbIds) { + this.locationDbIds = locationDbIds; + return this; + } + + public BrAPIStudySearchRequest addLocationDbIdsItem(String locationDbIdsItem) { + if (this.locationDbIds == null) { + this.locationDbIds = new ArrayList(); + } + this.locationDbIds.add(locationDbIdsItem); + return this; + } + + /** + * The location ids to search for + * + * @return locationDbIds + **/ + + public List getLocationDbIds() { + return locationDbIds; + } + + public void setLocationDbIds(List locationDbIds) { + this.locationDbIds = locationDbIds; + } + + public BrAPIStudySearchRequest locationNames(List locationNames) { + this.locationNames = locationNames; + return this; + } + + public BrAPIStudySearchRequest addLocationNamesItem(String locationNamesItem) { + if (this.locationNames == null) { + this.locationNames = new ArrayList(); + } + this.locationNames.add(locationNamesItem); + return this; + } + + /** + * A human readable names to search for + * + * @return locationNames + **/ + + public List getLocationNames() { + return locationNames; + } + + public void setLocationNames(List locationNames) { + this.locationNames = locationNames; + } + + public BrAPIStudySearchRequest germplasmDbIds(List germplasmDbIds) { + this.germplasmDbIds = germplasmDbIds; + return this; + } + + public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest germplasmNames(List germplasmNames) { + this.germplasmNames = germplasmNames; + return this; + } + + public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest observationVariableDbIds(List observationVariableDbIds) { + this.observationVariableDbIds = observationVariableDbIds; + return this; + } + + public BrAPIStudySearchRequest addObservationVariableDbIdsItem(String observationVariableDbIdsItem) { + if (this.observationVariableDbIds == null) { + this.observationVariableDbIds = new ArrayList(); + } + this.observationVariableDbIds.add(observationVariableDbIdsItem); + return this; + } + + /** + * List of observation variable IDs to search for + * + * @return observationVariableDbIds + **/ + + public List getObservationVariableDbIds() { + return observationVariableDbIds; + } + + public void setObservationVariableDbIds(List observationVariableDbIds) { + this.observationVariableDbIds = observationVariableDbIds; + } + + public BrAPIStudySearchRequest observationVariablePUIs(List observationVariablePUIs) { + this.observationVariablePUIs = observationVariablePUIs; + return this; + } + + public BrAPIStudySearchRequest addObservationVariablePUIsItem(String observationVariablePUIsItem) { + if (this.observationVariablePUIs == null) { + this.observationVariablePUIs = new ArrayList(); + } + this.observationVariablePUIs.add(observationVariablePUIsItem); + return this; + } + + /** + * The names of Variables to search for + * + * @return observationVariablePUIs + **/ + + public List getObservationVariablePUIs() { + return observationVariablePUIs; + } + + public void setObservationVariablePUIs(List observationVariablePUIs) { + this.observationVariablePUIs = observationVariablePUIs; + } + + public BrAPIStudySearchRequest observationVariableNames(List observationVariableNames) { + this.observationVariableNames = observationVariableNames; + return this; + } + + public BrAPIStudySearchRequest addObservationVariableNamesItem(String observationVariableNamesItem) { + if (this.observationVariableNames == null) { + this.observationVariableNames = new ArrayList(); + } + this.observationVariableNames.add(observationVariableNamesItem); + return this; + } + + /** + * The names of Variables to search for + * + * @return observationVariableNames + **/ + + public List getObservationVariableNames() { + return observationVariableNames; + } + + public void setObservationVariableNames(List observationVariableNames) { + this.observationVariableNames = observationVariableNames; + } + + public BrAPIStudySearchRequest externalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; + return this; + } + + public BrAPIStudySearchRequest 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; + } + + @Deprecated + public BrAPIStudySearchRequest externalReferenceIDs(List externalReferenceIDs) { + this.externalReferenceIDs = externalReferenceIDs; + return this; + } + + @Deprecated + public BrAPIStudySearchRequest 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 + **/ + + @Deprecated + public List getExternalReferenceIDs() { + return externalReferenceIDs; + } + + @Deprecated + public void setExternalReferenceIDs(List externalReferenceIDs) { + this.externalReferenceIDs = externalReferenceIDs; + } + + public BrAPIStudySearchRequest externalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; + return this; + } + + public BrAPIStudySearchRequest 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 BrAPIStudySearchRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Is this study currently active + * + * @return active + **/ + + public Boolean isActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public BrAPIStudySearchRequest seasonDbIds(List seasonDbIds) { + this.seasonDbIds = seasonDbIds; + return this; + } + + public BrAPIStudySearchRequest addSeasonDbIdsItem(String seasonDbIdsItem) { + if (this.seasonDbIds == null) { + this.seasonDbIds = new ArrayList(); + } + this.seasonDbIds.add(seasonDbIdsItem); + return this; + } + + /** + * The ID which uniquely identifies a season + * + * @return seasonDbIds + **/ + + public List getSeasonDbIds() { + return seasonDbIds; + } + + public void setSeasonDbIds(List seasonDbIds) { + this.seasonDbIds = seasonDbIds; + } + + public BrAPIStudySearchRequest sortBy(BrAPISortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Name of one of the fields within the study object on which results can be + * sorted + * + * @return sortBy + **/ + + public BrAPISortBy getSortBy() { + return sortBy; + } + + public void setSortBy(BrAPISortBy sortBy) { + this.sortBy = sortBy; + } + + public BrAPIStudySearchRequest sortOrder(BrAPISortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Order results should be sorted. ex. \"ASC\" or \"DESC\" + * + * @return sortOrder + **/ + + public BrAPISortOrder getSortOrder() { + return sortOrder; + } + + public void setSortOrder(BrAPISortOrder sortOrder) { + this.sortOrder = sortOrder; + } + + public BrAPIStudySearchRequest studyCodes(List studyCodes) { + this.studyCodes = studyCodes; + return this; + } + + public BrAPIStudySearchRequest addStudyCodesItem(String studyCodesItem) { + if (this.studyCodes == null) { + this.studyCodes = new ArrayList(); + } + this.studyCodes.add(studyCodesItem); + return this; + } + + /** + * A short human readable code for a study + * + * @return studyCodes + **/ + + public List getStudyCodes() { + return studyCodes; + } + + public void setStudyCodes(List studyCodes) { + this.studyCodes = studyCodes; + } + + public BrAPIStudySearchRequest studyPUIs(List studyPUIs) { + this.studyPUIs = studyPUIs; + return this; + } + + public BrAPIStudySearchRequest addStudyPUIsItem(String studyPUIsItem) { + if (this.studyPUIs == null) { + this.studyPUIs = new ArrayList(); + } + this.studyPUIs.add(studyPUIsItem); + return this; + } + + /** + * Permanent unique identifier associated with study data. For example, a URI or + * DOI + * + * @return studyPUIs + **/ + + public List getStudyPUIs() { + return studyPUIs; + } + + public void setStudyPUIs(List studyPUIs) { + this.studyPUIs = studyPUIs; + } + + public BrAPIStudySearchRequest studyTypes(List studyTypes) { + this.studyTypes = studyTypes; + return this; + } + + public BrAPIStudySearchRequest addStudyTypesItem(String studyTypesItem) { + if (this.studyTypes == null) { + this.studyTypes = new ArrayList(); + } + this.studyTypes.add(studyTypesItem); + return this; + } + + /** + * The type of study being performed. ex. \"Yield Trial\", etc + * + * @return studyTypes + **/ + + public List getStudyTypes() { + return studyTypes; + } + + public void setStudyTypes(List studyTypes) { + this.studyTypes = studyTypes; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIStudySearchRequest studySearchRequest = (BrAPIStudySearchRequest) o; + return Objects.equals(this.commonCropNames, studySearchRequest.commonCropNames) + && Objects.equals(this.programDbIds, studySearchRequest.programDbIds) + && Objects.equals(this.programNames, studySearchRequest.programNames) + && Objects.equals(this.trialDbIds, studySearchRequest.trialDbIds) + && Objects.equals(this.trialNames, studySearchRequest.trialNames) + && Objects.equals(this.studyDbIds, studySearchRequest.studyDbIds) + && Objects.equals(this.studyNames, studySearchRequest.studyNames) + && Objects.equals(this.locationDbIds, studySearchRequest.locationDbIds) + && Objects.equals(this.locationNames, studySearchRequest.locationNames) + && Objects.equals(this.germplasmDbIds, studySearchRequest.germplasmDbIds) + && Objects.equals(this.germplasmNames, studySearchRequest.germplasmNames) + && Objects.equals(this.observationVariableDbIds, studySearchRequest.observationVariableDbIds) + && Objects.equals(this.observationVariableNames, studySearchRequest.observationVariableNames) + && Objects.equals(this.observationVariablePUIs, studySearchRequest.observationVariablePUIs) + && Objects.equals(this.externalReferenceIds, studySearchRequest.externalReferenceIds) + && Objects.equals(this.externalReferenceIDs, studySearchRequest.externalReferenceIDs) + && Objects.equals(this.externalReferenceSources, studySearchRequest.externalReferenceSources) + && Objects.equals(this.active, studySearchRequest.active) + && Objects.equals(this.seasonDbIds, studySearchRequest.seasonDbIds) + && Objects.equals(this.sortBy, studySearchRequest.sortBy) + && Objects.equals(this.sortOrder, studySearchRequest.sortOrder) + && Objects.equals(this.studyCodes, studySearchRequest.studyCodes) + && Objects.equals(this.studyPUIs, studySearchRequest.studyPUIs) + && Objects.equals(this.studyTypes, studySearchRequest.studyTypes) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(commonCropNames, programDbIds, programNames, trialDbIds, trialNames, studyDbIds, studyNames, + locationDbIds, locationNames, germplasmDbIds, germplasmNames, observationVariableDbIds, + observationVariableNames, observationVariablePUIs, externalReferenceIds, externalReferenceIDs, + externalReferenceSources, active, seasonDbIds, sortBy, sortOrder, studyCodes, studyPUIs, studyTypes, + super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StudySearchRequest {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" commonCropNames: ").append(toIndentedString(commonCropNames)).append("\n"); + sb.append(" programDbIds: ").append(toIndentedString(programDbIds)).append("\n"); + sb.append(" programNames: ").append(toIndentedString(programNames)).append("\n"); + sb.append(" trialDbIds: ").append(toIndentedString(trialDbIds)).append("\n"); + sb.append(" trialNames: ").append(toIndentedString(trialNames)).append("\n"); + sb.append(" studyDbIds: ").append(toIndentedString(studyDbIds)).append("\n"); + sb.append(" studyNames: ").append(toIndentedString(studyNames)).append("\n"); + sb.append(" locationDbIds: ").append(toIndentedString(locationDbIds)).append("\n"); + sb.append(" locationNames: ").append(toIndentedString(locationNames)).append("\n"); + sb.append(" germplasmDbIds: ").append(toIndentedString(germplasmDbIds)).append("\n"); + sb.append(" germplasmNames: ").append(toIndentedString(germplasmNames)).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(" externalReferenceIds: ").append(toIndentedString(externalReferenceIds)).append("\n"); + sb.append(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); + sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" seasonDbIds: ").append(toIndentedString(seasonDbIds)).append("\n"); + sb.append(" sortBy: ").append(toIndentedString(sortBy)).append("\n"); + sb.append(" sortOrder: ").append(toIndentedString(sortOrder)).append("\n"); + sb.append(" studyCodes: ").append(toIndentedString(studyCodes)).append("\n"); + sb.append(" studyPUIs: ").append(toIndentedString(studyPUIs)).append("\n"); + sb.append(" studyTypes: ").append(toIndentedString(studyTypes)).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/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/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/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 "); } + }