Package eu.scape_project.planning.model

Examples of eu.scape_project.planning.model.Experiment


        // add empty result files where missing (only for considered
        // alternatives!)
        List<SampleObject> allRecords = p.getSampleRecordsDefinition().getRecords();
        for (Alternative alternative : p.getAlternativesDefinition().getConsideredAlternatives()) {
            Experiment exp = alternative.getExperiment();

            for (SampleObject record : allRecords) {
                DigitalObject u = exp.getResults().get(record);

                if (u == null) {
                    exp.addRecord(record);
                    u = exp.getResults().get(record);
                }
            }
        }

    }
View Full Code Here


     */
    public void characteriseResults() {
        List<Alternative> runnableAlternatives = getRunnableAlternatives();
        List<SampleObject> allRecords = plan.getSampleRecordsDefinition().getRecords();
        for (Alternative alternative : runnableAlternatives) {
            Experiment exp = alternative.getExperiment();

            for (SampleObject record : allRecords) {
                DigitalObject u = exp.getResults().get(record);

                if (u.isDataExistent() && (u.getFitsXMLString() == null)) {
                    characteriseFits(u);
                }
            }
View Full Code Here

        minCL = Long.MAX_VALUE;
        maxCL = Long.MIN_VALUE;
        // as the experiment is created together with the alternative, this
        // might result in the same timestamps
        for (Alternative alternative : plan.getAlternativesDefinition().getAlternatives()) {
            Experiment experiment = alternative.getExperiment();
            // - detailedExperimentInfo
            // for (DetailedExperimentInfo detailedInfo :
            // experiment.getDetailedInfo().values()) {
            // ChangeLog diCL = detailedInfo.getChangeLog();
            // if (maxCL < diCL.getChanged()) {
            // maxCL = diCL.getChanged();
            // }
            // if (minCL > diCL.getChanged()) {
            // minCL = diCL.getChanged();
            // }
            // }
            // - result files (alternative.experiment.results)
            for (DigitalObject result : experiment.getResults().values()) {
                ChangeLog resultCL = result.getChangeLog();
                if (maxCL < resultCL.getChanged()) {
                    maxCL = resultCL.getChanged();
                }
                if (minCL > resultCL.getChanged()) {
View Full Code Here

            addStringElement(resourceDescr, "reasonForConsidering", a.getResourceDescription()
                .getReasonForConsidering());
            addChangeLog(a.getResourceDescription().getChangeLog(), resourceDescr);

            Element experiment = alt.addElement("experiment");
            Experiment exp = a.getExperiment();
            addStringElement(experiment, "description", exp.getDescription());
            addStringElement(experiment, "settings", exp.getSettings());
            addUpload(exp.getWorkflow(), experiment, "workflow", addDigitalObjectData);
            Element results = experiment.addElement("results");
            for (Entry<SampleObject, DigitalObject> entry : exp.getResults().entrySet()) {
                Element result = addUpload(entry.getValue(), results, "result",  addDigitalObjectData);
                if (result != null) {
                    result.addAttribute("key", entry.getKey().getShortName());
                }
            }

            // // */experiment/xcdlDescriptions/xcdlDescription
            // Element xcdls = experiment.addElement("xcdlDescriptions");
            // for (SampleObject record : exp.getResults().keySet()) {
            // DigitalObject result = exp.getResults().get(record);
            // if (result != null) {
            // XcdlDescription x = result.getXcdlDescription();
            // if (x != null) {
            // // only existing xcdls are exported
            // Element upload = addUpload(x, xcdls, "xcdlDescription",
            // encoder, uploadIDs);
            // if (upload != null) {
            // upload.addAttribute("key", record.getShortName());
            // }
            // }
            // }
            // }

            // export detailed experiment info's
            Element detailedInfos = experiment.addElement("detailedInfos");
            for (SampleObject record : exp.getDetailedInfo().keySet()) {
                DetailedExperimentInfo dinfo = exp.getDetailedInfo().get(record);
                Element detailedInfo = detailedInfos.addElement("detailedInfo")
                    .addAttribute("key", record.getShortName()).addAttribute("successful", "" + dinfo.getSuccessful());
                addStringElement(detailedInfo, "programOutput", dinfo.getProgramOutput());
                addStringElement(detailedInfo, "cpr", dinfo.getCpr());

View Full Code Here

    private Alternative generateAlternative(String name) {
        Alternative a = new Alternative(name, "Description");
        a.setDiscarded(false);
        ResourceDescription resourceDescription = new ResourceDescription();
        a.setResourceDescription(resourceDescription);
        Experiment experiment = new Experiment();
        experiment.setDescription("Description");
        experiment.setSettings("Settings");
        experiment.setWorkflow(generateDigitalObject());

        Map<SampleObject, DetailedExperimentInfo> detailedInfo = experiment.getDetailedInfo();
        SampleObject sample1 = new SampleObject("Short name");
        DetailedExperimentInfo experimentInfo1 = new DetailedExperimentInfo();
        experimentInfo1.setSuccessful(true);
        experimentInfo1.setCpr("Cpr");
        experimentInfo1.setProgramOutput("Program output");
View Full Code Here

        // - detailedExperimentInfo
        // - result files (alternative.experiment.results)
        // as the experiment is created together with the alternative, this
        // might result in the same timestamps
        for (Alternative alternative : plan.getAlternativesDefinition().getAlternatives()) {
            Experiment experiment = alternative.getExperiment();
            // - result files (alternative.experiment.results)
            for (DigitalObject result : experiment.getResults().values()) {
                ChangeLog resultCL = result.getChangeLog();
                stateChangeLogs.add(new StateChangeLog(planId, 8, createdAt, resultCL.getChanged(), resultCL.getChangedBy()));
            }
        }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.Experiment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.