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/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/TrialsApiTest.java b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/TrialsApiTest.java index a41497fe..cf8bdb40 100644 --- a/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/TrialsApiTest.java +++ b/brapi-java-client/src/test/java/org/brapi/client/v2/modules/core/TrialsApiTest.java @@ -25,12 +25,14 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; -import java.time.LocalDate; 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; /** * API tests for TrialsApi @@ -38,129 +40,145 @@ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TrialsApiTest extends BrAPIClientTest { - private final TrialsApi api = new TrialsApi(this.apiClient); - - /** - * Submit a search request for Trials - * - * Advanced searching for the programs resource. See Search Services for additional implementation details. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void searchTrialsPostTest() throws ApiException { - BrAPITrialSearchRequest body = new BrAPITrialSearchRequest(); - - ApiResponse, Optional>> response = api.searchTrialsPost(body); - - // TODO: test validations - } - /** - * Get the results of a Trials search request - * - * Advanced searching for the trials resource. See Search Services for additional implementation details. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void searchTrialsSearchResultsDbIdGetTest() throws ApiException { - String searchResultsDbId = null; - Integer page = null; - Integer pageSize = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse, Optional>> response = - api.searchTrialsSearchResultsDbIdGet(searchResultsDbId, page, pageSize); - }); - - // TODO: test validations - } - /** - * Get a filtered list of Trials - * - * Retrieve a filtered list of breeding Trials. A Trial is a collection of Studies - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void trialsGetTest() throws ApiException { - Boolean active = null; - String commonCropName = null; - String contactDbId = null; - String programDbId = null; - String locationDbId = null; - LocalDate searchDateRangeStart = null; - LocalDate searchDateRangeEnd = null; - String studyDbId = null; - String trialDbId = null; - String trialName = null; - String trialPUI = null; - String sortBy = null; - String sortOrder = null; - String externalReferenceID = null; - String externalReferenceSource = null; - Integer page = null; - Integer pageSize = null; - - TrialQueryParams queryParams = new TrialQueryParams(); - ApiResponse response = api.trialsGet(queryParams); - - // TODO: test validations - } - /** - * Create new trials - * - * Create new breeding Trials. A Trial represents a collection of related Studies. `trialDbId` is generated by the server. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void trialsPostTest() throws ApiException { - List body = Arrays.asList(new BrAPITrial()); - - ApiResponse response = api.trialsPost(body); - - // TODO: test validations - } - /** - * Get the details of a specific Trial - * - * Get the details of a specific Trial - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void trialsTrialDbIdGetTest() throws ApiException { - String trialDbId = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse response = api.trialsTrialDbIdGet(trialDbId); - }); - - // TODO: test validations - } - /** - * Update the details of an existing Trial - * - * Update the details of an existing Trial - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void trialsTrialDbIdPutTest() throws ApiException { - String trialDbId = null; - BrAPITrial body = null; - - IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { - ApiResponse response = api.trialsTrialDbIdPut(trialDbId, body); - }); - - // TODO: test validations - } + private final TrialsApi api = new TrialsApi(this.apiClient); + + /** + * Submit a search request for Trials + * + * Advanced searching for the programs resource. See Search Services for + * additional implementation details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchTrialsPostTest() throws ApiException { + BrAPITrialSearchRequest body = new BrAPITrialSearchRequest() + .addTrialDbIdsItem("trial1") + .addTrialDbIdsItem("trial2"); + + ApiResponse, Optional>> response = api + .searchTrialsPost(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 Trials search request + * + * Advanced searching for the trials resource. See Search Services for + * additional implementation details. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchTrialsSearchResultsDbIdGetTest() throws ApiException { + BrAPITrialSearchRequest body = new BrAPITrialSearchRequest() + .addTrialDbIdsItem("trial1") + .addTrialDbIdsItem("trial2") + .addTrialDbIdsItem("trial3") + .addTrialDbIdsItem("trial2") + .addTrialDbIdsItem("trial1"); + + ApiResponse, Optional>> response = api + .searchTrialsPost(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 + .searchTrialsSearchResultsDbIdGet(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(3, listResponse2.get().getResult().getData().size(), + "unexpected number of pedigree nodes returned"); + } + + /** + * Get a filtered list of Trials + * + * Retrieve a filtered list of breeding Trials. A Trial is a collection of + * Studies + * + * @throws ApiException if the Api call fails + */ + @Test + public void trialsGetTest() throws ApiException { + String trialDbId = "trial1"; + + TrialQueryParams queryParams = new TrialQueryParams().trialDbId(trialDbId); + ApiResponse response = api.trialsGet(queryParams); + + assertEquals(1, response.getBody().getResult().getData().size()); + assertEquals(trialDbId, response.getBody().getResult().getData().get(0).getTrialDbId()); + } + + /** + * Create new trials + * + * Create new breeding Trials. A Trial represents a collection of related + * Studies. `trialDbId` is generated by the server. + * + * @throws ApiException if the Api call fails + */ + @Test + public void trialsPostTest() throws ApiException { + BrAPITrial trial = new BrAPITrial() + .trialName("New Trial Name"); + List body = Arrays.asList(trial); + + ApiResponse response = api.trialsPost(body); + + assertEquals(1, response.getBody().getResult().getData().size()); + assertEquals(trial.getTrialName(), response.getBody().getResult().getData().get(0).getTrialName()); + assertNotNull(response.getBody().getResult().getData().get(0).getTrialDbId()); + } + + /** + * Get the details of a specific Trial + * + * Get the details of a specific Trial + * + * @throws ApiException if the Api call fails + */ + @Test + public void trialsTrialDbIdGetTest() throws ApiException { + String trialDbId = "trial1"; + + ApiResponse response = api.trialsTrialDbIdGet(trialDbId); + + assertEquals(trialDbId, response.getBody().getResult().getTrialDbId()); + } + + /** + * Update the details of an existing Trial + * + * Update the details of an existing Trial + * + * @throws ApiException if the Api call fails + */ + @Test + public void trialsTrialDbIdPutTest() throws ApiException { + String trialDbId = "trial1"; + BrAPITrial body = new BrAPITrial().trialName("New Trial Name"); + + ApiResponse response = api.trialsTrialDbIdPut(trialDbId, body); + + assertEquals(trialDbId, response.getBody().getResult().getTrialDbId()); + assertEquals(body.getTrialName(), response.getBody().getResult().getTrialName()); + } } 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/BrAPIProgram.java b/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIProgram.java index 82d58012..6eafe27f 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIProgram.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/core/BrAPIProgram.java @@ -1,8 +1,6 @@ package org.brapi.v2.model.core; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.gson.Gson; @@ -12,304 +10,346 @@ import org.brapi.v2.model.BrAPIExternalReference; import org.brapi.v2.model.NullableJsonElementTypeAdapterFactory; -import javax.validation.Valid; - - /** * Program */ - public class BrAPIProgram { - @JsonProperty("programDbId") - private String programDbId = null; - - @JsonProperty("abbreviation") - private String abbreviation = null; - - @JsonProperty("additionalInfo") - @Valid - @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) - private JsonObject additionalInfo = null; - - @JsonProperty("commonCropName") - private String commonCropName = null; - - @JsonProperty("documentationURL") - private String documentationURL = null; - - @JsonProperty("externalReferences") - private List externalReferences = null; - - @JsonProperty("leadPersonDbId") - private String leadPersonDbId = null; - - @JsonProperty("leadPersonName") - private String leadPersonName = null; - - @JsonProperty("objective") - private String objective = null; - - @JsonProperty("programName") - private String programName = null; - - private final transient Gson gson = new Gson(); - - public BrAPIProgram programDbId(String programDbId) { - this.programDbId = programDbId; - return this; - } - - /** - * The ID which uniquely identifies the program - * @return programDbId - **/ - - - - public String getProgramDbId() { - return programDbId; - } - - public void setProgramDbId(String programDbId) { - this.programDbId = programDbId; - } - - public BrAPIProgram abbreviation(String abbreviation) { - this.abbreviation = abbreviation; - return this; - } - - /** - * An abbreviation which represents this program - * @return abbreviation - **/ - - - public String getAbbreviation() { - return abbreviation; - } - - public void setAbbreviation(String abbreviation) { - this.abbreviation = abbreviation; - } - - public BrAPIProgram additionalInfo(JsonObject additionalInfo) { - this.additionalInfo = additionalInfo; - return this; - } - - public BrAPIProgram 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 BrAPIProgram commonCropName(String commonCropName) { - this.commonCropName = commonCropName; - return this; - } - - /** - * Common name for the crop which this program is for - * @return commonCropName - **/ - - - public String getCommonCropName() { - return commonCropName; - } - - public void setCommonCropName(String commonCropName) { - this.commonCropName = commonCropName; - } - - public BrAPIProgram 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; - } + @JsonProperty("programDbId") + private String programDbId = null; - public void setDocumentationURL(String documentationURL) { - this.documentationURL = documentationURL; - } + @JsonProperty("abbreviation") + private String abbreviation = null; - public BrAPIProgram externalReferences(List externalReferences) { - this.externalReferences = externalReferences; - return this; - } + @JsonProperty("additionalInfo") + @JsonAdapter(NullableJsonElementTypeAdapterFactory.class) + private JsonObject additionalInfo = null; - /** - * Get externalReferences - * @return externalReferences - **/ - - - @Valid - public List getExternalReferences() { - return externalReferences; - } - - public void setExternalReferences(List externalReferences) { - this.externalReferences = externalReferences; - } - - public BrAPIProgram leadPersonDbId(String leadPersonDbId) { - this.leadPersonDbId = leadPersonDbId; - return this; - } - - /** - * The unique identifier of the program leader - * @return leadPersonDbId - **/ - - - public String getLeadPersonDbId() { - return leadPersonDbId; - } - - public void setLeadPersonDbId(String leadPersonDbId) { - this.leadPersonDbId = leadPersonDbId; - } - - public BrAPIProgram leadPersonName(String leadPersonName) { - this.leadPersonName = leadPersonName; - return this; - } - - /** - * The name of the program leader - * @return leadPersonName - **/ - - - public String getLeadPersonName() { - return leadPersonName; - } - - public void setLeadPersonName(String leadPersonName) { - this.leadPersonName = leadPersonName; - } - - public BrAPIProgram objective(String objective) { - this.objective = objective; - return this; - } - - /** - * The primary objective of the program - * @return objective - **/ - - - public String getObjective() { - return objective; - } - - public void setObjective(String objective) { - this.objective = objective; - } - - public BrAPIProgram programName(String programName) { - this.programName = programName; - return this; - } - - /** - * Human readable name of the program - * @return programName - **/ - - - public String getProgramName() { - return programName; - } - - public void setProgramName(String programName) { - this.programName = programName; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIProgram program = (BrAPIProgram) o; - return Objects.equals(this.programDbId, program.programDbId) - && Objects.equals(this.abbreviation, program.abbreviation) && - Objects.equals(this.additionalInfo, program.additionalInfo) && - Objects.equals(this.commonCropName, program.commonCropName) && - Objects.equals(this.documentationURL, program.documentationURL) && - Objects.equals(this.externalReferences, program.externalReferences) && - Objects.equals(this.leadPersonDbId, program.leadPersonDbId) && - Objects.equals(this.leadPersonName, program.leadPersonName) && - Objects.equals(this.objective, program.objective) && - Objects.equals(this.programName, program.programName); - } - - @Override - public int hashCode() { - return Objects.hash(programDbId, abbreviation, additionalInfo, commonCropName, documentationURL, externalReferences, leadPersonDbId, leadPersonName, objective, programName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Program {\n"); - sb.append(" programDbId: ").append(toIndentedString(programDbId)).append("\n"); - sb.append(" abbreviation: ").append(toIndentedString(abbreviation)).append("\n"); - sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" commonCropName: ").append(toIndentedString(commonCropName)).append("\n"); - sb.append(" documentationURL: ").append(toIndentedString(documentationURL)).append("\n"); - sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); - sb.append(" leadPersonDbId: ").append(toIndentedString(leadPersonDbId)).append("\n"); - sb.append(" leadPersonName: ").append(toIndentedString(leadPersonName)).append("\n"); - sb.append(" objective: ").append(toIndentedString(objective)).append("\n"); - sb.append(" programName: ").append(toIndentedString(programName)).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("commonCropName") + private String commonCropName = null; + + @JsonProperty("documentationURL") + private String documentationURL = null; + + @JsonProperty("externalReferences") + private List externalReferences = null; + + @JsonProperty("leadPersonDbId") + private String leadPersonDbId = null; + + @JsonProperty("leadPersonName") + private String leadPersonName = null; + + @JsonProperty("objective") + private String objective = null; + + @JsonProperty("programName") + private String programName = null; + + @JsonProperty("programType") + private String programType = null; + + @JsonProperty("fundingInformation") + private String fundingInformation = null; + + private final transient Gson gson = new Gson(); + + public BrAPIProgram programDbId(String programDbId) { + this.programDbId = programDbId; + return this; + } + + /** + * The ID which uniquely identifies the program + * + * @return programDbId + **/ + + public String getProgramDbId() { + return programDbId; + } + + public void setProgramDbId(String programDbId) { + this.programDbId = programDbId; + } + + public BrAPIProgram abbreviation(String abbreviation) { + this.abbreviation = abbreviation; + return this; + } + + /** + * An abbreviation which represents this program + * + * @return abbreviation + **/ + + public String getAbbreviation() { + return abbreviation; + } + + public void setAbbreviation(String abbreviation) { + this.abbreviation = abbreviation; + } + + public BrAPIProgram additionalInfo(JsonObject additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + public BrAPIProgram 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 BrAPIProgram commonCropName(String commonCropName) { + this.commonCropName = commonCropName; + return this; + } + + /** + * Common name for the crop which this program is for + * + * @return commonCropName + **/ + + public String getCommonCropName() { + return commonCropName; + } + + public void setCommonCropName(String commonCropName) { + this.commonCropName = commonCropName; + } + + public BrAPIProgram 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 BrAPIProgram 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 BrAPIProgram leadPersonDbId(String leadPersonDbId) { + this.leadPersonDbId = leadPersonDbId; + return this; + } + + /** + * The unique identifier of the program leader + * + * @return leadPersonDbId + **/ + + public String getLeadPersonDbId() { + return leadPersonDbId; + } + + public void setLeadPersonDbId(String leadPersonDbId) { + this.leadPersonDbId = leadPersonDbId; + } + + public BrAPIProgram leadPersonName(String leadPersonName) { + this.leadPersonName = leadPersonName; + return this; + } + + /** + * The name of the program leader + * + * @return leadPersonName + **/ + + public String getLeadPersonName() { + return leadPersonName; + } + + public void setLeadPersonName(String leadPersonName) { + this.leadPersonName = leadPersonName; + } + + public BrAPIProgram objective(String objective) { + this.objective = objective; + return this; + } + + /** + * The primary objective of the program + * + * @return objective + **/ + + public String getObjective() { + return objective; + } + + public void setObjective(String objective) { + this.objective = objective; + } + + public BrAPIProgram programName(String programName) { + this.programName = programName; + return this; + } + + /** + * Human readable name of the program + * + * @return programName + **/ + + public String getProgramName() { + return programName; + } + + public void setProgramName(String programName) { + this.programName = programName; + } + + public BrAPIProgram programType(String programType) { + this.programType = programType; + return this; + } + + /** + * Human readable name of the program + * + * @return programType + **/ + + public String getProgramType() { + return programType; + } + + public void setProgramType(String programType) { + this.programType = programType; + } + + public BrAPIProgram fundingInformation(String fundingInformation) { + this.fundingInformation = fundingInformation; + return this; + } + + /** + * Human readable name of the program + * + * @return fundingInformation + **/ + + public String getFundingInformation() { + return fundingInformation; + } + + public void setFundingInformation(String fundingInformation) { + this.fundingInformation = fundingInformation; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIProgram program = (BrAPIProgram) o; + return Objects.equals(this.programDbId, program.programDbId) + && Objects.equals(this.abbreviation, program.abbreviation) + && Objects.equals(this.additionalInfo, program.additionalInfo) + && Objects.equals(this.commonCropName, program.commonCropName) + && Objects.equals(this.documentationURL, program.documentationURL) + && Objects.equals(this.externalReferences, program.externalReferences) + && Objects.equals(this.leadPersonDbId, program.leadPersonDbId) + && Objects.equals(this.leadPersonName, program.leadPersonName) + && Objects.equals(this.objective, program.objective) + && Objects.equals(this.programName, program.programName) + && Objects.equals(this.programType, program.programType) + && Objects.equals(this.fundingInformation, program.fundingInformation); + } + + @Override + public int hashCode() { + return Objects.hash(programDbId, abbreviation, additionalInfo, commonCropName, documentationURL, + externalReferences, leadPersonDbId, leadPersonName, objective, programName, programType, + fundingInformation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Program {\n"); + sb.append(" programDbId: ").append(toIndentedString(programDbId)).append("\n"); + sb.append(" abbreviation: ").append(toIndentedString(abbreviation)).append("\n"); + sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); + sb.append(" commonCropName: ").append(toIndentedString(commonCropName)).append("\n"); + sb.append(" documentationURL: ").append(toIndentedString(documentationURL)).append("\n"); + sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n"); + sb.append(" leadPersonDbId: ").append(toIndentedString(leadPersonDbId)).append("\n"); + sb.append(" leadPersonName: ").append(toIndentedString(leadPersonName)).append("\n"); + sb.append(" objective: ").append(toIndentedString(objective)).append("\n"); + sb.append(" programName: ").append(toIndentedString(programName)).append("\n"); + sb.append(" programType: ").append(toIndentedString(programType)).append("\n"); + sb.append(" fundingInformation: ").append(toIndentedString(fundingInformation)).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/BrAPIProgramSearchRequest.java b/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPIProgramSearchRequest.java index c9b46a60..e075a965 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPIProgramSearchRequest.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPIProgramSearchRequest.java @@ -6,348 +6,405 @@ import java.util.ArrayList; import java.util.List; -import javax.validation.Valid; - import org.brapi.v2.model.BrAPISearchRequestParametersPaging; /** * ProgramSearchRequest */ - -public class BrAPIProgramSearchRequest extends BrAPISearchRequestParametersPaging { - @JsonProperty("commonCropNames") - @Valid - private List commonCropNames = null; - - @JsonProperty("programDbIds") - @Valid - private List programDbIds = null; - - @JsonProperty("programNames") - @Valid - private List programNames = null; - - @JsonProperty("externalReferenceIDs") - @Valid - private List externalReferenceIDs = null; - - @JsonProperty("externalReferenceSources") - @Valid - private List externalReferenceSources = null; - - @JsonProperty("abbreviations") - @Valid - private List abbreviations = null; - - @JsonProperty("leadPersonDbIds") - @Valid - private List leadPersonDbIds = null; - - @JsonProperty("leadPersonNames") - @Valid - private List leadPersonNames = null; - - @JsonProperty("objectives") - @Valid - private List objectives = null; - - public BrAPIProgramSearchRequest commonCropNames(List commonCropNames) { - this.commonCropNames = commonCropNames; - return this; - } - - public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest programDbIds(List programDbIds) { - this.programDbIds = programDbIds; - return this; - } - - public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest programNames(List programNames) { - this.programNames = programNames; - return this; - } - - public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest externalReferenceIDs(List externalReferenceIDs) { - this.externalReferenceIDs = externalReferenceIDs; - return this; - } - - public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest externalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; - return this; - } - - public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest abbreviations(List abbreviations) { - this.abbreviations = abbreviations; - return this; - } - - public BrAPIProgramSearchRequest addAbbreviationsItem(String abbreviationsItem) { - if (this.abbreviations == null) { - this.abbreviations = new ArrayList(); - } - this.abbreviations.add(abbreviationsItem); - return this; - } - - /** - * An abbreviation of a program to search for - * @return abbreviations - **/ - - - public List getAbbreviations() { - return abbreviations; - } - - public void setAbbreviations(List abbreviations) { - this.abbreviations = abbreviations; - } - - public BrAPIProgramSearchRequest leadPersonDbIds(List leadPersonDbIds) { - this.leadPersonDbIds = leadPersonDbIds; - return this; - } - - public BrAPIProgramSearchRequest addLeadPersonDbIdsItem(String leadPersonDbIdsItem) { - if (this.leadPersonDbIds == null) { - this.leadPersonDbIds = new ArrayList(); - } - this.leadPersonDbIds.add(leadPersonDbIdsItem); - return this; - } - - /** - * The person DbIds of the program leader to search for - * @return leadPersonDbIds - **/ - - - public List getLeadPersonDbIds() { - return leadPersonDbIds; - } - - public void setLeadPersonDbIds(List leadPersonDbIds) { - this.leadPersonDbIds = leadPersonDbIds; - } - - public BrAPIProgramSearchRequest leadPersonNames(List leadPersonNames) { - this.leadPersonNames = leadPersonNames; - return this; - } - - public BrAPIProgramSearchRequest addLeadPersonNamesItem(String leadPersonNamesItem) { - if (this.leadPersonNames == null) { - this.leadPersonNames = new ArrayList(); - } - this.leadPersonNames.add(leadPersonNamesItem); - return this; - } - - /** - * The names of the program leader to search for - * @return leadPersonNames - **/ - - - public List getLeadPersonNames() { - return leadPersonNames; - } - - public void setLeadPersonNames(List leadPersonNames) { - this.leadPersonNames = leadPersonNames; - } - - public BrAPIProgramSearchRequest objectives(List objectives) { - this.objectives = objectives; - return this; - } - - public BrAPIProgramSearchRequest addObjectivesItem(String objectivesItem) { - if (this.objectives == null) { - this.objectives = new ArrayList(); - } - this.objectives.add(objectivesItem); - return this; - } - - /** - * A program objective to search for - * @return objectives - **/ - - - public List getObjectives() { - return objectives; - } - - public void setObjectives(List objectives) { - this.objectives = objectives; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPIProgramSearchRequest programSearchRequest = (BrAPIProgramSearchRequest) o; - return Objects.equals(this.commonCropNames, programSearchRequest.commonCropNames) && - Objects.equals(this.programDbIds, programSearchRequest.programDbIds) && - Objects.equals(this.programNames, programSearchRequest.programNames) && - Objects.equals(this.externalReferenceIDs, programSearchRequest.externalReferenceIDs) && - Objects.equals(this.externalReferenceSources, programSearchRequest.externalReferenceSources) && - Objects.equals(this.abbreviations, programSearchRequest.abbreviations) && - Objects.equals(this.leadPersonDbIds, programSearchRequest.leadPersonDbIds) && - Objects.equals(this.leadPersonNames, programSearchRequest.leadPersonNames) && - Objects.equals(this.objectives, programSearchRequest.objectives) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(commonCropNames, programDbIds, programNames, externalReferenceIDs, externalReferenceSources, abbreviations, leadPersonDbIds, leadPersonNames, objectives, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProgramSearchRequest {\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(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); - sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); - sb.append(" abbreviations: ").append(toIndentedString(abbreviations)).append("\n"); - sb.append(" leadPersonDbIds: ").append(toIndentedString(leadPersonDbIds)).append("\n"); - sb.append(" leadPersonNames: ").append(toIndentedString(leadPersonNames)).append("\n"); - sb.append(" objectives: ").append(toIndentedString(objectives)).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 BrAPIProgramSearchRequest extends BrAPISearchRequestParametersPaging { + @JsonProperty("commonCropNames") + private List commonCropNames = null; + + @JsonProperty("programDbIds") + private List programDbIds = null; + + @JsonProperty("programNames") + private List programNames = null; + + @JsonProperty("programTypes") + private List programTypes = null; + + @JsonProperty("externalReferenceIds") + private List externalReferenceIds = null; + + @Deprecated + @JsonProperty("externalReferenceIDs") + private List externalReferenceIDs = null; + + @JsonProperty("externalReferenceSources") + private List externalReferenceSources = null; + + @JsonProperty("abbreviations") + private List abbreviations = null; + + @JsonProperty("leadPersonDbIds") + private List leadPersonDbIds = null; + + @JsonProperty("leadPersonNames") + private List leadPersonNames = null; + + @JsonProperty("objectives") + private List objectives = null; + + public BrAPIProgramSearchRequest commonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + return this; + } + + public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest programDbIds(List programDbIds) { + this.programDbIds = programDbIds; + return this; + } + + public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest programNames(List programNames) { + this.programNames = programNames; + return this; + } + + public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest programTypes(List programTypes) { + this.programTypes = programTypes; + return this; + } + + public BrAPIProgramSearchRequest addProgramTypesItem(String programTypesItem) { + if (this.programTypes == null) { + this.programTypes = new ArrayList(); + } + this.programTypes.add(programTypesItem); + return this; + } + + /** + * A name of a program to search for + * + * @return programTypes + **/ + + public List getProgramTypes() { + return programTypes; + } + + public void setProgramTypes(List programTypes) { + this.programTypes = programTypes; + } + + public BrAPIProgramSearchRequest externalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; + return this; + } + + public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest externalReferenceIDs(List externalReferenceIDs) { + this.externalReferenceIDs = externalReferenceIDs; + return this; + } + + @Deprecated + public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest externalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; + return this; + } + + public BrAPIProgramSearchRequest 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 BrAPIProgramSearchRequest abbreviations(List abbreviations) { + this.abbreviations = abbreviations; + return this; + } + + public BrAPIProgramSearchRequest addAbbreviationsItem(String abbreviationsItem) { + if (this.abbreviations == null) { + this.abbreviations = new ArrayList(); + } + this.abbreviations.add(abbreviationsItem); + return this; + } + + /** + * An abbreviation of a program to search for + * + * @return abbreviations + **/ + + public List getAbbreviations() { + return abbreviations; + } + + public void setAbbreviations(List abbreviations) { + this.abbreviations = abbreviations; + } + + public BrAPIProgramSearchRequest leadPersonDbIds(List leadPersonDbIds) { + this.leadPersonDbIds = leadPersonDbIds; + return this; + } + + public BrAPIProgramSearchRequest addLeadPersonDbIdsItem(String leadPersonDbIdsItem) { + if (this.leadPersonDbIds == null) { + this.leadPersonDbIds = new ArrayList(); + } + this.leadPersonDbIds.add(leadPersonDbIdsItem); + return this; + } + + /** + * The person DbIds of the program leader to search for + * + * @return leadPersonDbIds + **/ + + public List getLeadPersonDbIds() { + return leadPersonDbIds; + } + + public void setLeadPersonDbIds(List leadPersonDbIds) { + this.leadPersonDbIds = leadPersonDbIds; + } + + public BrAPIProgramSearchRequest leadPersonNames(List leadPersonNames) { + this.leadPersonNames = leadPersonNames; + return this; + } + + public BrAPIProgramSearchRequest addLeadPersonNamesItem(String leadPersonNamesItem) { + if (this.leadPersonNames == null) { + this.leadPersonNames = new ArrayList(); + } + this.leadPersonNames.add(leadPersonNamesItem); + return this; + } + + /** + * The names of the program leader to search for + * + * @return leadPersonNames + **/ + + public List getLeadPersonNames() { + return leadPersonNames; + } + + public void setLeadPersonNames(List leadPersonNames) { + this.leadPersonNames = leadPersonNames; + } + + public BrAPIProgramSearchRequest objectives(List objectives) { + this.objectives = objectives; + return this; + } + + public BrAPIProgramSearchRequest addObjectivesItem(String objectivesItem) { + if (this.objectives == null) { + this.objectives = new ArrayList(); + } + this.objectives.add(objectivesItem); + return this; + } + + /** + * A program objective to search for + * + * @return objectives + **/ + + public List getObjectives() { + return objectives; + } + + public void setObjectives(List objectives) { + this.objectives = objectives; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPIProgramSearchRequest programSearchRequest = (BrAPIProgramSearchRequest) o; + return Objects.equals(this.commonCropNames, programSearchRequest.commonCropNames) + && Objects.equals(this.programDbIds, programSearchRequest.programDbIds) + && Objects.equals(this.programNames, programSearchRequest.programNames) + && Objects.equals(this.programTypes, programSearchRequest.programTypes) + && Objects.equals(this.externalReferenceIds, programSearchRequest.externalReferenceIds) + && Objects.equals(this.externalReferenceIDs, programSearchRequest.externalReferenceIDs) + && Objects.equals(this.externalReferenceSources, programSearchRequest.externalReferenceSources) + && Objects.equals(this.abbreviations, programSearchRequest.abbreviations) + && Objects.equals(this.leadPersonDbIds, programSearchRequest.leadPersonDbIds) + && Objects.equals(this.leadPersonNames, programSearchRequest.leadPersonNames) + && Objects.equals(this.objectives, programSearchRequest.objectives) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(commonCropNames, programDbIds, programNames, programTypes, externalReferenceIds, + externalReferenceIDs, externalReferenceSources, abbreviations, leadPersonDbIds, leadPersonNames, + objectives, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProgramSearchRequest {\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(" programTypes: ").append(toIndentedString(programTypes)).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(" abbreviations: ").append(toIndentedString(abbreviations)).append("\n"); + sb.append(" leadPersonDbIds: ").append(toIndentedString(leadPersonDbIds)).append("\n"); + sb.append(" leadPersonNames: ").append(toIndentedString(leadPersonNames)).append("\n"); + sb.append(" objectives: ").append(toIndentedString(objectives)).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/BrAPITrialSearchRequest.java b/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPITrialSearchRequest.java index 9187741a..c58b5624 100644 --- a/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPITrialSearchRequest.java +++ b/brapi-java-model/src/main/java/org/brapi/v2/model/core/request/BrAPITrialSearchRequest.java @@ -7,8 +7,6 @@ import java.util.List; import java.time.LocalDate; -import javax.validation.Valid; - import org.brapi.v2.model.BrAPISearchRequestParametersPaging; import org.brapi.v2.model.BrAPISortBy; import org.brapi.v2.model.BrAPISortOrder; @@ -17,568 +15,604 @@ * TrialSearchRequest */ +public class BrAPITrialSearchRequest extends BrAPISearchRequestParametersPaging { + @JsonProperty("commonCropNames") + private List commonCropNames = null; -public class BrAPITrialSearchRequest extends BrAPISearchRequestParametersPaging { - @JsonProperty("commonCropNames") - @Valid - private List commonCropNames = null; - - @JsonProperty("programDbIds") - @Valid - private List programDbIds = null; - - @JsonProperty("programNames") - @Valid - private List programNames = null; + @JsonProperty("programDbIds") + private List programDbIds = null; - @JsonProperty("trialDbIds") - @Valid - private List trialDbIds = null; + @JsonProperty("programNames") + private List programNames = null; - @JsonProperty("trialNames") - @Valid - private List trialNames = null; + @JsonProperty("trialDbIds") + private List trialDbIds = null; - @JsonProperty("studyDbIds") - @Valid - private List studyDbIds = null; + @JsonProperty("trialNames") + private List trialNames = null; - @JsonProperty("studyNames") - @Valid - private List studyNames = null; + @JsonProperty("studyDbIds") + private List studyDbIds = null; - @JsonProperty("locationDbIds") - @Valid - private List locationDbIds = null; + @JsonProperty("studyNames") + private List studyNames = null; - @JsonProperty("locationNames") - @Valid - private List locationNames = null; + @JsonProperty("locationDbIds") + private List locationDbIds = null; - @JsonProperty("externalReferenceIDs") - @Valid - private List externalReferenceIDs = null; + @JsonProperty("locationNames") + private List locationNames = null; - @JsonProperty("externalReferenceSources") - @Valid - private List externalReferenceSources = null; + @JsonProperty("externalReferenceIds") + private List externalReferenceIds = null; - @JsonProperty("active") - private Boolean active = null; + @Deprecated + @JsonProperty("externalReferenceIDs") + private List externalReferenceIDs = null; - @JsonProperty("contactDbIds") - @Valid - private List contactDbIds = null; + @JsonProperty("externalReferenceSources") + private List externalReferenceSources = null; - @JsonProperty("searchDateRangeEnd") - private LocalDate searchDateRangeEnd = null; + @JsonProperty("active") + private Boolean active = null; - @JsonProperty("searchDateRangeStart") - private LocalDate searchDateRangeStart = null; + @JsonProperty("contactDbIds") + private List contactDbIds = null; - @JsonProperty("trialPUIs") - @Valid - private List trialPUIs = null; + @JsonProperty("searchDateRangeEnd") + private LocalDate searchDateRangeEnd = null; + + @JsonProperty("searchDateRangeStart") + private LocalDate searchDateRangeStart = null; - @JsonProperty("sortBy") - private BrAPISortBy sortBy = null; - - @JsonProperty("sortOrder") - private BrAPISortOrder sortOrder = null; - - public BrAPISortBy getSortBy() { - return sortBy; -} + @JsonProperty("trialPUIs") + private List trialPUIs = null; -public void setSortBy(BrAPISortBy sortBy) { - this.sortBy = sortBy; -} - -public BrAPISortOrder getSortOrder() { - return sortOrder; -} - -public void setSortOrder(BrAPISortOrder sortOrder) { - this.sortOrder = sortOrder; -} + @JsonProperty("sortBy") + private BrAPISortBy sortBy = null; -public BrAPITrialSearchRequest commonCropNames(List commonCropNames) { - this.commonCropNames = commonCropNames; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest programDbIds(List programDbIds) { - this.programDbIds = programDbIds; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest programNames(List programNames) { - this.programNames = programNames; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest trialDbIds(List trialDbIds) { - this.trialDbIds = trialDbIds; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest trialNames(List trialNames) { - this.trialNames = trialNames; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest studyDbIds(List studyDbIds) { - this.studyDbIds = studyDbIds; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest studyNames(List studyNames) { - this.studyNames = studyNames; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest locationDbIds(List locationDbIds) { - this.locationDbIds = locationDbIds; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest locationNames(List locationNames) { - this.locationNames = locationNames; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest externalReferenceIDs(List externalReferenceIDs) { - this.externalReferenceIDs = externalReferenceIDs; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest externalReferenceSources(List externalReferenceSources) { - this.externalReferenceSources = externalReferenceSources; - return this; - } - - public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest active(Boolean active) { - this.active = active; - return this; - } - - /** - * Is this trail currently active - * @return active - **/ - - - public Boolean isActive() { - return active; - } - - public void setActive(Boolean active) { - this.active = active; - } - - public BrAPITrialSearchRequest contactDbIds(List contactDbIds) { - this.contactDbIds = contactDbIds; - return this; - } - - public BrAPITrialSearchRequest addContactDbIdsItem(String contactDbIdsItem) { - if (this.contactDbIds == null) { - this.contactDbIds = new ArrayList(); - } - this.contactDbIds.add(contactDbIdsItem); - return this; - } - - /** - * List of contact entities associated with this trial - * @return contactDbIds - **/ - - - public List getContactDbIds() { - return contactDbIds; - } - - public void setContactDbIds(List contactDbIds) { - this.contactDbIds = contactDbIds; - } - - public BrAPITrialSearchRequest searchDateRangeEnd(LocalDate searchDateRangeEnd) { - this.searchDateRangeEnd = searchDateRangeEnd; - return this; - } - - /** - * The end of the overlapping search date range. `searchDateRangeStart` must be before `searchDateRangeEnd`. Return a Trial entity if any of the following cases are true - `searchDateRangeStart` is before `trial.endDate` AND `searchDateRangeEnd` is null - `searchDateRangeStart` is before `trial.endDate` AND `searchDateRangeEnd` is after `trial.startDate` - `searchDateRangeEnd` is after `trial.startDate` AND `searchDateRangeStart` is null - `searchDateRangeEnd` is after `trial.startDate` AND `searchDateRangeStart` is before `trial.endDate` - * @return searchDateRangeEnd - **/ - - - @Valid - public LocalDate getSearchDateRangeEnd() { - return searchDateRangeEnd; - } - - public void setSearchDateRangeEnd(LocalDate searchDateRangeEnd) { - this.searchDateRangeEnd = searchDateRangeEnd; - } - - public BrAPITrialSearchRequest searchDateRangeStart(LocalDate searchDateRangeStart) { - this.searchDateRangeStart = searchDateRangeStart; - return this; - } - - /** - * The start of the overlapping search date range. `searchDateRangeStart` must be before `searchDateRangeEnd`. Return a Trial entity if any of the following cases are true - `searchDateRangeStart` is before `trial.endDate` AND `searchDateRangeEnd` is null - `searchDateRangeStart` is before `trial.endDate` AND `searchDateRangeEnd` is after `trial.startDate` - `searchDateRangeEnd` is after `trial.startDate` AND `searchDateRangeStart` is null - `searchDateRangeEnd` is after `trial.startDate` AND `searchDateRangeStart` is before `trial.endDate` - * @return searchDateRangeStart - **/ - - - @Valid - public LocalDate getSearchDateRangeStart() { - return searchDateRangeStart; - } - - public void setSearchDateRangeStart(LocalDate searchDateRangeStart) { - this.searchDateRangeStart = searchDateRangeStart; - } - - public BrAPITrialSearchRequest trialPUIs(List trialPUIs) { - this.trialPUIs = trialPUIs; - return this; - } - - public BrAPITrialSearchRequest addTrialPUIsItem(String trialPUIsItem) { - if (this.trialPUIs == null) { - this.trialPUIs = new ArrayList(); - } - this.trialPUIs.add(trialPUIsItem); - return this; - } - - /** - * A permanent identifier for a trial. Could be DOI or other URI formatted identifier. - * @return trialPUIs - **/ - - - public List getTrialPUIs() { - return trialPUIs; - } - - public void setTrialPUIs(List trialPUIs) { - this.trialPUIs = trialPUIs; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrAPITrialSearchRequest trialSearchRequest = (BrAPITrialSearchRequest) o; - return Objects.equals(this.commonCropNames, trialSearchRequest.commonCropNames) && - Objects.equals(this.programDbIds, trialSearchRequest.programDbIds) && - Objects.equals(this.programNames, trialSearchRequest.programNames) && - Objects.equals(this.trialDbIds, trialSearchRequest.trialDbIds) && - Objects.equals(this.trialNames, trialSearchRequest.trialNames) && - Objects.equals(this.studyDbIds, trialSearchRequest.studyDbIds) && - Objects.equals(this.studyNames, trialSearchRequest.studyNames) && - Objects.equals(this.locationDbIds, trialSearchRequest.locationDbIds) && - Objects.equals(this.locationNames, trialSearchRequest.locationNames) && - Objects.equals(this.externalReferenceIDs, trialSearchRequest.externalReferenceIDs) && - Objects.equals(this.externalReferenceSources, trialSearchRequest.externalReferenceSources) && - Objects.equals(this.active, trialSearchRequest.active) && - Objects.equals(this.contactDbIds, trialSearchRequest.contactDbIds) && - Objects.equals(this.searchDateRangeEnd, trialSearchRequest.searchDateRangeEnd) && - Objects.equals(this.searchDateRangeStart, trialSearchRequest.searchDateRangeStart) && - Objects.equals(this.trialPUIs, trialSearchRequest.trialPUIs) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(commonCropNames, programDbIds, programNames, trialDbIds, trialNames, studyDbIds, studyNames, locationDbIds, locationNames, externalReferenceIDs, externalReferenceSources, active, contactDbIds, searchDateRangeEnd, searchDateRangeStart, trialPUIs, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrialSearchRequest {\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(" externalReferenceIDs: ").append(toIndentedString(externalReferenceIDs)).append("\n"); - sb.append(" externalReferenceSources: ").append(toIndentedString(externalReferenceSources)).append("\n"); - sb.append(" active: ").append(toIndentedString(active)).append("\n"); - sb.append(" contactDbIds: ").append(toIndentedString(contactDbIds)).append("\n"); - sb.append(" searchDateRangeEnd: ").append(toIndentedString(searchDateRangeEnd)).append("\n"); - sb.append(" searchDateRangeStart: ").append(toIndentedString(searchDateRangeStart)).append("\n"); - sb.append(" trialPUIs: ").append(toIndentedString(trialPUIs)).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("sortOrder") + private BrAPISortOrder sortOrder = null; + + public BrAPISortBy getSortBy() { + return sortBy; + } + + public void setSortBy(BrAPISortBy sortBy) { + this.sortBy = sortBy; + } + + public BrAPISortOrder getSortOrder() { + return sortOrder; + } + + public void setSortOrder(BrAPISortOrder sortOrder) { + this.sortOrder = sortOrder; + } + + public BrAPITrialSearchRequest commonCropNames(List commonCropNames) { + this.commonCropNames = commonCropNames; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest programDbIds(List programDbIds) { + this.programDbIds = programDbIds; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest programNames(List programNames) { + this.programNames = programNames; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest trialDbIds(List trialDbIds) { + this.trialDbIds = trialDbIds; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest trialNames(List trialNames) { + this.trialNames = trialNames; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest studyDbIds(List studyDbIds) { + this.studyDbIds = studyDbIds; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest studyNames(List studyNames) { + this.studyNames = studyNames; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest locationDbIds(List locationDbIds) { + this.locationDbIds = locationDbIds; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest locationNames(List locationNames) { + this.locationNames = locationNames; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest externalReferenceIds(List externalReferenceIds) { + this.externalReferenceIds = externalReferenceIds; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest externalReferenceIDs(List externalReferenceIDs) { + this.externalReferenceIDs = externalReferenceIDs; + return this; + } + + @Deprecated + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest externalReferenceSources(List externalReferenceSources) { + this.externalReferenceSources = externalReferenceSources; + return this; + } + + public BrAPITrialSearchRequest 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 BrAPITrialSearchRequest active(Boolean active) { + this.active = active; + return this; + } + + /** + * Is this trail currently active + * + * @return active + **/ + + public Boolean isActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public BrAPITrialSearchRequest contactDbIds(List contactDbIds) { + this.contactDbIds = contactDbIds; + return this; + } + + public BrAPITrialSearchRequest addContactDbIdsItem(String contactDbIdsItem) { + if (this.contactDbIds == null) { + this.contactDbIds = new ArrayList(); + } + this.contactDbIds.add(contactDbIdsItem); + return this; + } + + /** + * List of contact entities associated with this trial + * + * @return contactDbIds + **/ + + public List getContactDbIds() { + return contactDbIds; + } + + public void setContactDbIds(List contactDbIds) { + this.contactDbIds = contactDbIds; + } + + public BrAPITrialSearchRequest searchDateRangeEnd(LocalDate searchDateRangeEnd) { + this.searchDateRangeEnd = searchDateRangeEnd; + return this; + } + + /** + * The end of the overlapping search date range. `searchDateRangeStart` must be + * before `searchDateRangeEnd`. Return a Trial entity if any of the following + * cases are true - `searchDateRangeStart` is before `trial.endDate` AND + * `searchDateRangeEnd` is null - `searchDateRangeStart` is before + * `trial.endDate` AND `searchDateRangeEnd` is after `trial.startDate` - + * `searchDateRangeEnd` is after `trial.startDate` AND `searchDateRangeStart` is + * null - `searchDateRangeEnd` is after `trial.startDate` AND + * `searchDateRangeStart` is before `trial.endDate` + * + * @return searchDateRangeEnd + **/ + + public LocalDate getSearchDateRangeEnd() { + return searchDateRangeEnd; + } + + public void setSearchDateRangeEnd(LocalDate searchDateRangeEnd) { + this.searchDateRangeEnd = searchDateRangeEnd; + } + + public BrAPITrialSearchRequest searchDateRangeStart(LocalDate searchDateRangeStart) { + this.searchDateRangeStart = searchDateRangeStart; + return this; + } + + /** + * The start of the overlapping search date range. `searchDateRangeStart` must + * be before `searchDateRangeEnd`. Return a Trial entity if any of the following + * cases are true - `searchDateRangeStart` is before `trial.endDate` AND + * `searchDateRangeEnd` is null - `searchDateRangeStart` is before + * `trial.endDate` AND `searchDateRangeEnd` is after `trial.startDate` - + * `searchDateRangeEnd` is after `trial.startDate` AND `searchDateRangeStart` is + * null - `searchDateRangeEnd` is after `trial.startDate` AND + * `searchDateRangeStart` is before `trial.endDate` + * + * @return searchDateRangeStart + **/ + + public LocalDate getSearchDateRangeStart() { + return searchDateRangeStart; + } + + public void setSearchDateRangeStart(LocalDate searchDateRangeStart) { + this.searchDateRangeStart = searchDateRangeStart; + } + + public BrAPITrialSearchRequest trialPUIs(List trialPUIs) { + this.trialPUIs = trialPUIs; + return this; + } + + public BrAPITrialSearchRequest addTrialPUIsItem(String trialPUIsItem) { + if (this.trialPUIs == null) { + this.trialPUIs = new ArrayList(); + } + this.trialPUIs.add(trialPUIsItem); + return this; + } + + /** + * A permanent identifier for a trial. Could be DOI or other URI formatted + * identifier. + * + * @return trialPUIs + **/ + + public List getTrialPUIs() { + return trialPUIs; + } + + public void setTrialPUIs(List trialPUIs) { + this.trialPUIs = trialPUIs; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrAPITrialSearchRequest trialSearchRequest = (BrAPITrialSearchRequest) o; + return Objects.equals(this.commonCropNames, trialSearchRequest.commonCropNames) + && Objects.equals(this.programDbIds, trialSearchRequest.programDbIds) + && Objects.equals(this.programNames, trialSearchRequest.programNames) + && Objects.equals(this.trialDbIds, trialSearchRequest.trialDbIds) + && Objects.equals(this.trialNames, trialSearchRequest.trialNames) + && Objects.equals(this.studyDbIds, trialSearchRequest.studyDbIds) + && Objects.equals(this.studyNames, trialSearchRequest.studyNames) + && Objects.equals(this.locationDbIds, trialSearchRequest.locationDbIds) + && Objects.equals(this.locationNames, trialSearchRequest.locationNames) + && Objects.equals(this.externalReferenceIds, trialSearchRequest.externalReferenceIds) + && Objects.equals(this.externalReferenceIDs, trialSearchRequest.externalReferenceIDs) + && Objects.equals(this.externalReferenceSources, trialSearchRequest.externalReferenceSources) + && Objects.equals(this.active, trialSearchRequest.active) + && Objects.equals(this.contactDbIds, trialSearchRequest.contactDbIds) + && Objects.equals(this.searchDateRangeEnd, trialSearchRequest.searchDateRangeEnd) + && Objects.equals(this.searchDateRangeStart, trialSearchRequest.searchDateRangeStart) + && Objects.equals(this.trialPUIs, trialSearchRequest.trialPUIs) && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(commonCropNames, programDbIds, programNames, trialDbIds, trialNames, studyDbIds, studyNames, + locationDbIds, locationNames, externalReferenceIds, externalReferenceIDs, externalReferenceSources, + active, contactDbIds, searchDateRangeEnd, searchDateRangeStart, trialPUIs, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrialSearchRequest {\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(" 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(" contactDbIds: ").append(toIndentedString(contactDbIds)).append("\n"); + sb.append(" searchDateRangeEnd: ").append(toIndentedString(searchDateRangeEnd)).append("\n"); + sb.append(" searchDateRangeStart: ").append(toIndentedString(searchDateRangeStart)).append("\n"); + sb.append(" trialPUIs: ").append(toIndentedString(trialPUIs)).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 "); } + }