Skip to content

Commit

Permalink
[GLT-4120] added project analysisReviewSkipped field (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
djcooke authored Apr 10, 2024
1 parent 61413af commit 084c986
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cardea-data/src/main/java/ca/on/oicr/gsi/cardea/data/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ public class Project {

private final String name;
private final String pipeline;
private final boolean analysisReviewSkipped;
private final Map<DeliverableType, List<String>> deliverables;

private Project(Builder builder) {
this.name = requireNonNull(builder.name);
this.pipeline = requireNonNull(builder.pipeline);
this.analysisReviewSkipped = builder.analysisReviewSkipped;
Map<DeliverableType, List<String>> tempDeliverables = builder.deliverables.entrySet().stream()
.collect(Collectors.toMap(entry -> entry.getKey(),
entry -> Collections.unmodifiableList(entry.getValue())));
Expand All @@ -35,6 +37,10 @@ public String getPipeline() {
return pipeline;
}

public boolean isAnalysisReviewSkipped() {
return analysisReviewSkipped;
}

public Map<DeliverableType, List<String>> getDeliverables() {
return deliverables;
}
Expand All @@ -44,6 +50,7 @@ public static class Builder {

private String name;
private String pipeline;
private boolean analysisReviewSkipped;
private Map<DeliverableType, List<String>> deliverables;

public Project build() {
Expand All @@ -60,6 +67,11 @@ public Builder pipeline(String pipeline) {
return this;
}

public Builder analysisReviewSkipped(boolean analysisReviewSkipped) {
this.analysisReviewSkipped = analysisReviewSkipped;
return this;
}

public Builder deliverables(Map<DeliverableType, List<String>> deliverables) {
this.deliverables = deliverables;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ protected Map<String, Project> loadProjects(FileReader fileReader)
List<Project> projects = loadFromJsonArrayFile(fileReader,
json -> new Project.Builder().name(parseString(json, "name", true))
.pipeline(parseString(json, "pipeline", true))
.analysisReviewSkipped(parseBoolean(json, "analysis_review_skipped"))
.deliverables(parseProjectDeliverables(json.get("deliverables")))
.build());

Expand Down
1 change: 1 addition & 0 deletions cardea-server/src/test/resources/testdata/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
"name": "PROJ",
"pipeline": "Research",
"analysis_review_skipped": false,
"deliverables": {
"DATA_RELEASE": ["Full Pipeline", "cBioPortal Submission"]
}
Expand Down
1 change: 1 addition & 0 deletions changes/add_analysisReviewSkipped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Project analysisReviewSkipped field

0 comments on commit 084c986

Please sign in to comment.