File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
src/main/java/life/qbic/registration/openbis Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -71,24 +71,14 @@ public void process(IDataSetRegistrationTransactionV2 transaction) {
71
71
newDataSet .setPropertyValue (QPropertyType .Q_TASK_ID .getOpenBisPropertyName (), dataSetProvenance .taskId ());
72
72
QDatasetType qDatasetType = getDatasetType (measurementSample );
73
73
newDataSet .setDataSetType (qDatasetType .name ());
74
- moveFiles (transaction , newDataSet , provenanceFile );
75
-
76
- }
77
-
78
- private void moveFiles (IDataSetRegistrationTransactionV2 transactionV2 , IDataSet dataSet , File provenanceFile ) {
79
74
80
75
try {
81
- var buffer = Files .readAllBytes (provenanceFile .toPath ().toAbsolutePath ());
82
76
Files .delete (provenanceFile .toPath ());
83
- try {
84
- transactionV2 .moveFile (transactionV2 .getIncoming ().getAbsolutePath (), dataSet );
85
- } catch (Exception e ) {
86
- Files .write (provenanceFile .toPath ().toAbsolutePath (), buffer );
87
- throw new RuntimeException (e );
88
- }
77
+ transaction .moveFile (transaction .getIncoming ().getAbsolutePath (), newDataSet );
89
78
} catch (IOException e ) {
90
79
throw new RuntimeException (e );
91
80
}
81
+
92
82
}
93
83
94
84
private static QDatasetType getDatasetType (ISampleImmutable measurementSample ) {
You can’t perform that action at this time.
0 commit comments