Package eu.scape_project.planning.model

Examples of eu.scape_project.planning.model.DetailedExperimentInfo


     *            successful flag to set
     */
    private void setProgramOutputForAlternative(Alternative a, String msg, boolean successful) {
        List<SampleObject> sampleObjects = plan.getSampleRecordsDefinition().getRecords();
        for (SampleObject o : sampleObjects) {
            DetailedExperimentInfo info = a.getExperiment().getDetailedInfo().get(o);

            if (info == null) {
                info = new DetailedExperimentInfo();
                a.getExperiment().getDetailedInfo().put(o, info);
            }

            info.setProgramOutput(msg);
            info.setSuccessful(successful);
        }
    }
View Full Code Here


     *            sample object of the experiment
     * @param migrationResult
     *            migration result of the experiment
     */
    private void extractDetailedInfos(Alternative a, SampleObject sample, MigrationResult migrationResult) {
        DetailedExperimentInfo info = a.getExperiment().getDetailedInfo().get(sample);
        if (info == null) {
            info = new DetailedExperimentInfo();
            a.getExperiment().getDetailedInfo().put(sample, info);
        }

        info.clear();

        if (migrationResult == null) {
            info.setProgramOutput(String.format("Applying action %s to sample %s failed.",
                a.getAction().getShortname(), sample.getFullname()));
        } else {
            info.setSuccessful(migrationResult.isSuccessful());

            if (migrationResult.getReport() == null) {
                info.setProgramOutput("The tool didn't provide any output.");
            } else {
                info.setProgramOutput(migrationResult.getReport());
            }

            // Execution claimed to be successful but size = 0
            DigitalObject migratedObject = migrationResult.getMigratedObject();
            if (migrationResult.isSuccessful() && (migratedObject == null || migratedObject.getData().getSize() == 0)) {
                info.setSuccessful(false);
                info.setProgramOutput(info.getProgramOutput()
                    + "\nSomething went wrong during migration. No result file has been generated.");
   &