Skip to content

Commit

Permalink
Merged from staging for next release (#9)
Browse files Browse the repository at this point in the history
* replace pagetoken by page in variants response

* add externalReferences to callsets and hide filters that are not managed on search/callsets

* POM update

---------

Co-authored-by: Alice Boizet <[email protected]>
  • Loading branch information
GuilhemSempere and aliceboizet authored Jun 21, 2024
1 parent 4414ed8 commit 128bb59
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 53 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.version>1.0.4-RELEASE</project.version>
<project.version>1.0.5-RELEASE</project.version>
</properties>

<groupId>fr.cirad</groupId>
Expand Down
122 changes: 74 additions & 48 deletions src/main/java/org/brapi/v2/model/CallSet.java
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
package org.brapi.v2.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import javax.validation.Valid;

import org.threeten.bp.OffsetDateTime;
import org.springframework.validation.annotation.Validated;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.*;

/**
* A CallSet is a collection of calls that were generated by the same analysis of the same sample.
*/
@ApiModel(description = "A CallSet is a collection of calls that were generated by the same analysis of the same sample.")
@Schema(description = "A CallSet is a collection of calls that were generated by the same analysis of the same sample.")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-11-19T12:30:12.318Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2022-09-19T13:16:35.755Z[GMT]")


public class CallSet {
@JsonProperty("additionalInfo")
@Valid
private Map<String, Object> additionalInfo = null;
private Map<String, String> additionalInfo = null;

@JsonProperty("callSetDbId")
private String callSetDbId = null;
Expand All @@ -33,7 +32,10 @@ public class CallSet {
private String callSetName = null;

@JsonProperty("created")
private String created = null;
private OffsetDateTime created = null;

@JsonProperty("externalReferences")
private ExternalReferences externalReferences = null;

@JsonProperty("sampleDbId")
private String sampleDbId = null;
Expand All @@ -42,20 +44,20 @@ public class CallSet {
private String studyDbId = null;

@JsonProperty("updated")
private String updated = null;
private OffsetDateTime updated = null;

@JsonProperty("variantSetDbIds")
@Valid
private List<String> variantSetDbIds = null;

public CallSet additionalInfo(Map<String, Object> additionalInfo) {
public CallSet additionalInfo(Map<String, String> additionalInfo) {
this.additionalInfo = additionalInfo;
return this;
}

public CallSet putAdditionalInfoItem(String key, Object additionalInfoItem) {
public CallSet putAdditionalInfoItem(String key, String additionalInfoItem) {
if (this.additionalInfo == null) {
this.additionalInfo = new HashMap<>();
this.additionalInfo = new HashMap<String, String>();
}
this.additionalInfo.put(key, additionalInfoItem);
return this;
Expand All @@ -64,14 +66,14 @@ public CallSet putAdditionalInfoItem(String key, Object additionalInfoItem) {
/**
* Additional arbitrary info
* @return additionalInfo
**/
@ApiModelProperty(value = "Additional arbitrary info")
**/
@Schema(description = "Additional arbitrary info")

public Map<String, Object> getAdditionalInfo() {
public Map<String, String> getAdditionalInfo() {
return additionalInfo;
}

public void setAdditionalInfo(Map<String, Object> additionalInfo) {
public void setAdditionalInfo(Map<String, String> additionalInfo) {
this.additionalInfo = additionalInfo;
}

Expand All @@ -81,10 +83,10 @@ public CallSet callSetDbId(String callSetDbId) {
}

/**
* The call set ID.
* The ID which uniquely identifies a CallSet within the given database server
* @return callSetDbId
**/
@ApiModelProperty(value = "The call set ID.")
**/
@Schema(example = "eb2bfd3d", description = "The ID which uniquely identifies a CallSet within the given database server")

public String getCallSetDbId() {
return callSetDbId;
Expand All @@ -100,10 +102,10 @@ public CallSet callSetName(String callSetName) {
}

/**
* The call set name.
* The human readable name which identifies a germplasm within the given database server
* @return callSetName
**/
@ApiModelProperty(value = "The call set name.")
**/
@Schema(example = "Sample_123_DNA_Run_456", description = "The human readable name which identifies a germplasm within the given database server")

public String getCallSetName() {
return callSetName;
Expand All @@ -113,25 +115,46 @@ public void setCallSetName(String callSetName) {
this.callSetName = callSetName;
}

public CallSet created(String created) {
public CallSet created(OffsetDateTime created) {
this.created = created;
return this;
}

/**
* The date this call set was created in milliseconds from the epoch.
* The date this call set was created
* @return created
**/
@ApiModelProperty(value = "The date this call set was created in milliseconds from the epoch.")
**/
@Schema(description = "The date this call set was created")

public String getCreated() {
@Valid
public OffsetDateTime getCreated() {
return created;
}

public void setCreated(String created) {
public void setCreated(OffsetDateTime created) {
this.created = created;
}

public CallSet externalReferences(ExternalReferences externalReferences) {
this.externalReferences = externalReferences;
return this;
}

/**
* Get externalReferences
* @return externalReferences
**/
@Schema(description = "")

@Valid
public ExternalReferences getExternalReferences() {
return externalReferences;
}

public void setExternalReferences(ExternalReferences externalReferences) {
this.externalReferences = externalReferences;
}

public CallSet sampleDbId(String sampleDbId) {
this.sampleDbId = sampleDbId;
return this;
Expand All @@ -140,8 +163,8 @@ public CallSet sampleDbId(String sampleDbId) {
/**
* The Biosample entity the call set data was generated from.
* @return sampleDbId
**/
@ApiModelProperty(value = "The Biosample entity the call set data was generated from.")
**/
@Schema(example = "5e50e11d", description = "The Biosample entity the call set data was generated from.")

public String getSampleDbId() {
return sampleDbId;
Expand All @@ -159,8 +182,8 @@ public CallSet studyDbId(String studyDbId) {
/**
* The ID which uniquely identifies a study within the given database server
* @return studyDbId
**/
@ApiModelProperty(value = "The ID which uniquely identifies a study within the given database server")
**/
@Schema(example = "708149c1", description = "The ID which uniquely identifies a study within the given database server")

public String getStudyDbId() {
return studyDbId;
Expand All @@ -170,22 +193,23 @@ public void setStudyDbId(String studyDbId) {
this.studyDbId = studyDbId;
}

public CallSet updated(String updated) {
public CallSet updated(OffsetDateTime updated) {
this.updated = updated;
return this;
}

/**
* The time at which this call set was last updated in milliseconds from the epoch.
* The time at which this call set was last updated
* @return updated
**/
@ApiModelProperty(value = "The time at which this call set was last updated in milliseconds from the epoch.")
**/
@Schema(description = "The time at which this call set was last updated")

public String getUpdated() {
@Valid
public OffsetDateTime getUpdated() {
return updated;
}

public void setUpdated(String updated) {
public void setUpdated(OffsetDateTime updated) {
this.updated = updated;
}

Expand All @@ -203,10 +227,10 @@ public CallSet addVariantSetDbIdsItem(String variantSetDbIdsItem) {
}

/**
* The IDs of the variant sets this call set has calls in.
* The IDs of the variantSets this callSet has calls in.
* @return variantSetDbIds
**/
@ApiModelProperty(value = "The IDs of the variant sets this call set has calls in.")
**/
@Schema(example = "[\"cfd3d60f\",\"a4e8bfe9\"]", description = "The IDs of the variantSets this callSet has calls in.")

public List<String> getVariantSetDbIds() {
return variantSetDbIds;
Expand All @@ -230,6 +254,7 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.callSetDbId, callSet.callSetDbId) &&
Objects.equals(this.callSetName, callSet.callSetName) &&
Objects.equals(this.created, callSet.created) &&
Objects.equals(this.externalReferences, callSet.externalReferences) &&
Objects.equals(this.sampleDbId, callSet.sampleDbId) &&
Objects.equals(this.studyDbId, callSet.studyDbId) &&
Objects.equals(this.updated, callSet.updated) &&
Expand All @@ -238,7 +263,7 @@ public boolean equals(java.lang.Object o) {

@Override
public int hashCode() {
return Objects.hash(additionalInfo, callSetDbId, callSetName, created, sampleDbId, studyDbId, updated, variantSetDbIds);
return Objects.hash(additionalInfo, callSetDbId, callSetName, created, externalReferences, sampleDbId, studyDbId, updated, variantSetDbIds);
}

@Override
Expand All @@ -250,6 +275,7 @@ public String toString() {
sb.append(" callSetDbId: ").append(toIndentedString(callSetDbId)).append("\n");
sb.append(" callSetName: ").append(toIndentedString(callSetName)).append("\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" externalReferences: ").append(toIndentedString(externalReferences)).append("\n");
sb.append(" sampleDbId: ").append(toIndentedString(sampleDbId)).append("\n");
sb.append(" studyDbId: ").append(toIndentedString(studyDbId)).append("\n");
sb.append(" updated: ").append(toIndentedString(updated)).append("\n");
Expand All @@ -268,4 +294,4 @@ private String toIndentedString(java.lang.Object o) {
}
return o.toString().replace("\n", "\n ");
}
}
}
4 changes: 4 additions & 0 deletions src/main/java/org/brapi/v2/model/CallSetsSearchRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
import org.springframework.validation.annotation.Validated;
Expand All @@ -24,6 +26,7 @@ public class CallSetsSearchRequest {

@JsonProperty("callSetNames")
@Valid
@Schema(hidden = true)
private List<String> callSetNames = null;

@JsonProperty("germplasmDbIds")
Expand All @@ -32,6 +35,7 @@ public class CallSetsSearchRequest {

@JsonProperty("germplasmNames")
@Valid
@Schema(hidden = true)
private List<String> germplasmNames = null;

@JsonProperty("sampleDbIds")
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/brapi/v2/model/VariantListResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class VariantListResponse {
private Context _atContext = null;

@JsonProperty("metadata")
private MetadataTokenPagination metadata = null;
private Metadata metadata = null;

@JsonProperty("result")
private VariantListResponseResult result = null;
Expand All @@ -48,7 +48,7 @@ public void setAtContext(Context _atContext) {
this._atContext = _atContext;
}

public VariantListResponse metadata(MetadataTokenPagination metadata) {
public VariantListResponse metadata(Metadata metadata) {
this.metadata = metadata;
return this;
}
Expand All @@ -61,11 +61,11 @@ public VariantListResponse metadata(MetadataTokenPagination metadata) {
@NotNull

@Valid
public MetadataTokenPagination getMetadata() {
public Metadata getMetadata() {
return metadata;
}

public void setMetadata(MetadataTokenPagination metadata) {
public void setMetadata(Metadata metadata) {
this.metadata = metadata;
}

Expand Down

0 comments on commit 128bb59

Please sign in to comment.