/** * Removes a previously uploaded result file. * * @param alternative Alternative the file was uploaded for. * @param sampleObject Sample the file was uploaded for. */ public void removeResultFile(Alternative alternative, SampleObject sampleObject) { DigitalObject resultFile = alternative.getExperiment().getResults().put(sampleObject, new DigitalObject()); bytestreamsToRemove.add(resultFile.getPid()); alternative.getExperiment().getResults().put(sampleObject, new DigitalObject()); }
/** * Method responsible for uploading a result file. * * @param resultFile File to upload. * @param alternative Alternative the file was uploaded for. * @param sampleObject Sample the file was uploaded for. * @throws StorageException is thrown if any error occurs at uploading the result file. */ public void uploadResultFile( DigitalObject resultFile, Alternative alternative, SampleObject sampleObject) throws StorageException { digitalObjectManager.moveDataToStorage(resultFile); addedBytestreams.add(resultFile.getPid()); characteriseFits(resultFile); alternative.getExperiment().getResults().put(sampleObject, resultFile); }