-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
analysis: add a data model for the clinical analysis load result, #TA…
…SK-4610, #TASK-4158
- Loading branch information
Showing
7 changed files
with
125 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
...a-catalog/src/main/java/org/opencb/opencga/catalog/models/ClinicalAnalysisLoadResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* | ||
* Copyright 2015-2020 OpenCB | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.opencb.opencga.catalog.models; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class ClinicalAnalysisLoadResult { | ||
private int numLoaded; | ||
private Map<String, String> failures; | ||
private String filename; | ||
private int time; | ||
|
||
public ClinicalAnalysisLoadResult() { | ||
this.numLoaded = 0; | ||
failures = new HashMap<>(); | ||
} | ||
|
||
public ClinicalAnalysisLoadResult(int numLoaded, Map<String, String> failures, String filename, int time) { | ||
this.numLoaded = numLoaded; | ||
this.failures = failures; | ||
this.filename = filename; | ||
this.time = time; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("ClinicalAnalysisLoadResult{"); | ||
sb.append("numLoaded=").append(numLoaded); | ||
sb.append(", failures=").append(failures); | ||
sb.append(", filename='").append(filename).append('\''); | ||
sb.append(", time='").append(time).append('\''); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
|
||
public int getNumLoaded() { | ||
return numLoaded; | ||
} | ||
|
||
public ClinicalAnalysisLoadResult setNumLoaded(int numLoaded) { | ||
this.numLoaded = numLoaded; | ||
return this; | ||
} | ||
|
||
public Map<String, String> getFailures() { | ||
return failures; | ||
} | ||
|
||
public ClinicalAnalysisLoadResult setFailures(Map<String, String> failures) { | ||
this.failures = failures; | ||
return this; | ||
} | ||
|
||
public String getFilename() { | ||
return filename; | ||
} | ||
|
||
public ClinicalAnalysisLoadResult setFilename(String filename) { | ||
this.filename = filename; | ||
return this; | ||
} | ||
|
||
public int getTime() { | ||
return time; | ||
} | ||
|
||
public ClinicalAnalysisLoadResult setTime(int time) { | ||
this.time = time; | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisTest.java
This file was deleted.
Oops, something went wrong.
Binary file renamed
BIN
+84.7 KB
...g/src/test/resources/biofiles/ca2.json.gz → ...ources/biofiles/clinical_analyses.json.gz
Binary file not shown.