Package eu.scape_project.planning.model

Examples of eu.scape_project.planning.model.ExecutablePlanDefinition


        List<Plan> plans = parser.importProjects(in);

        Assert.assertTrue(plans.size() == 1);

        Plan plan = plans.get(0);
        ExecutablePlanDefinition ex = plan.getExecutablePlanDefinition();

        Assert.assertNull(ex.getObjectPath());
        Assert.assertTrue("".equals(ex.getToolParameters()));
        Assert.assertTrue("".equals(ex.getTriggersConditions()));
        Assert.assertTrue("".equals(ex.getValidateQA()));
        Assert.assertNull(ex.getExecutablePlan());

        DigitalObject t2flow = ex.getT2flowExecutablePlan();
        Assert.assertNull(t2flow.getPid());
        Assert.assertTrue("Create_tmp_file_and_convert_by_target_extension.t2flow".equals(t2flow.getFullname()));
        Assert.assertTrue("application/vnd.taverna.t2flow+xml".equals(t2flow.getContentType()));

        Assert.assertNull(t2flow.getJhoveXMLString());
        Assert.assertNull(t2flow.getFitsXMLString());
        Assert.assertNull(t2flow.getXcdlDescription());
        Assert.assertNotNull(t2flow.getFormatInfo());

        // FIXME why should these two be 0 when the workflow is present and contains data ?
//        Assert.assertTrue(t2flow.getSizeInBytes() == 0);
//        Assert.assertTrue(t2flow.getSizeInMB() == 0);

        Assert.assertNotNull(t2flow.getData());
        Assert.assertNotNull(t2flow.getData().getData());
        Assert.assertTrue(t2flow.getData().getData().length > 0);
        Assert.assertTrue(t2flow.getData().getSize() > 0);

        Assert.assertNotNull(t2flow.getChangeLog());
        Assert.assertNull(t2flow.getChangeLog().getCreatedBy());

        Assert.assertNotNull(ex.getChangeLog());
        Assert.assertTrue(ex.getChangeLog().getCreatedBy().equals("test1"));
    }
View Full Code Here


            addSubTree(p.getTree().getRoot(), tree);
        }

        // add ExecutablePlanDefinition
        Element executablePlanDef = projectNode.addElement("executablePlan");
        ExecutablePlanDefinition executablePlanDefinition = p.getExecutablePlanDefinition();
        addStringElement(executablePlanDef, "objectPath", executablePlanDefinition.getObjectPath());
        addStringElement(executablePlanDef, "toolParameters", executablePlanDefinition.getToolParameters());
        addStringElement(executablePlanDef, "triggersConditions", executablePlanDefinition.getTriggersConditions());
        addStringElement(executablePlanDef, "validateQA", executablePlanDefinition.getValidateQA());
        addUpload(executablePlanDefinition.getT2flowExecutablePlan(), executablePlanDef, "workflow", addDigitalObjectData);
        addChangeLog(executablePlanDefinition.getChangeLog(), executablePlanDef);

        // Export generated preservation action plan
        addPreservationActionPlan(p.getPreservationActionPlan(), projectNode, addDigitalObjectData);

        // Plan definition
View Full Code Here

TOP

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

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.