Package eu.scape_project.planning.services.taverna.generator

Examples of eu.scape_project.planning.services.taverna.generator.T2FlowExecutablePlanGenerator


    }

    @Test
    public void addCcComponent_source() throws IOException, ParserConfigurationException, SAXException,
        DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");

        planGenerator.addSourcePort();
        WorkflowDescription wf = mockCcAny("CC Component");
        planGenerator.addCcComponent(wf, generateCcContent(CC_DATAFLOW_ID, "CC Component"), DEFAULT_PARAMETERS,
            DEFAULT_MEASURES, InputSource.SOURCE_OBJECT);

        Document doc = getDocument(planGenerator);

        assertThat(
View Full Code Here


    }

    @Test
    public void addCcComponent_target() throws IOException, ParserConfigurationException, SAXException,
        DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");

        planGenerator.addSourcePort();
        planGenerator.addTargetPort();

        addMigrationMock(planGenerator);
        WorkflowDescription wf = mockCcAny("CC Component");
        planGenerator.addCcComponent(wf, generateCcContent(CC_DATAFLOW_ID, "CC Component"), DEFAULT_PARAMETERS,
            DEFAULT_MEASURES, InputSource.TARGET_OBJECT);

        Document doc = getDocument(planGenerator);

        assertThat(
View Full Code Here

    }

    @Test
    public void addCcComponent_twoComponents() throws IOException, ParserConfigurationException, SAXException,
        DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");

        planGenerator.addSourcePort();
        planGenerator.addTargetPort();

        addMigrationMock(planGenerator);
        WorkflowDescription wf1 = mockCcAny("CC Component 1");
        planGenerator.addCcComponent(wf1, generateCcContent(CC_DATAFLOW_ID, "CC Component 1"), DEFAULT_PARAMETERS,
            DEFAULT_MEASURES, InputSource.SOURCE_OBJECT);
        WorkflowDescription wf2 = mockCcAny("CC Component 2");
        planGenerator.addCcComponent(wf2, generateCcContent(CC_DATAFLOW_ID, "CC Component 2"), DEFAULT_PARAMETERS,
            DEFAULT_MEASURES, InputSource.TARGET_OBJECT);

        Document doc = getDocument(planGenerator);

        assertThat(
View Full Code Here

        DEFAULT_MEASURES.add("http://purl.org/DP/quality/measures#1");
    }

    @Test
    public void createEmptyWorkflow() throws IOException, ParserConfigurationException, SAXException, DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");
        Document doc = getDocument(planGenerator);

        assertThat(getContent(doc, TOP_WF + "/t2f:name"), is("Name"));
View Full Code Here

        assertThat(wfAnnotations, containsString("image/jp2"));
    }

    @Test
    public void addSourcePort() throws IOException, ParserConfigurationException, SAXException, DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");
        planGenerator.addSourcePort();

        Document doc = getDocument(planGenerator);

        assertThat(getContent(doc, TOP_WF + "/t2f:inputPorts/t2f:port/t2f:name"), is("source"));
        assertThat(getContent(doc, TOP_WF + "/t2f:inputPorts/t2f:port/t2f:depth"), is("0"));
View Full Code Here

            containsString(ComponentConstants.VALUE_SOURCE_OBJECT));
    }

    @Test
    public void addSourcePort_depth() throws IOException, ParserConfigurationException, SAXException, DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");
        planGenerator.addSourcePort(7);

        Document doc = getDocument(planGenerator);

        assertThat(getContent(doc, TOP_WF + "/t2f:inputPorts/t2f:port/t2f:name"), is("source"));
        assertThat(getContent(doc, TOP_WF + "/t2f:inputPorts/t2f:port/t2f:depth"), is("7"));
View Full Code Here

            containsString(ComponentConstants.VALUE_SOURCE_OBJECT));
    }

    @Test
    public void addTargetPort() throws IOException, ParserConfigurationException, SAXException, DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");
        planGenerator.addTargetPort();

        Document doc = getDocument(planGenerator);

        assertThat(getContent(doc, TOP_WF + "/t2f:outputPorts/t2f:port/t2f:name"), is("target"));
        assertThat(getSemanticAnnotation(doc, TOP_WF + "/t2f:outputPorts/t2f:port"),
View Full Code Here

    }

    @Test
    public void addMeasurePort_purlDp() throws IOException, ParserConfigurationException, SAXException,
        DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");
        planGenerator.addMeasurePort("http://purl.org/DP/quality/measures#1");

        Document doc = getDocument(planGenerator);

        String portName = getContent(doc, TOP_WF + "/t2f:outputPorts/t2f:port/t2f:name");
        assertThat(portName, is("measures_1"));
View Full Code Here

    }

    @Test
    public void addMeasurePort_generic() throws IOException, ParserConfigurationException, SAXException,
        DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");
        planGenerator.addMeasurePort("http://example.com/DP/measures#1");

        Document doc = getDocument(planGenerator);

        String portName = getContent(doc, TOP_WF + "/t2f:outputPorts/t2f:port/t2f:name");
        assertThat(portName, is("example_com_DP_measures_1"));
View Full Code Here

    }

    @Test
    public void addMigrationComponent() throws IOException, ParserConfigurationException, SAXException,
        DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");

        planGenerator.addSourcePort();
        planGenerator.addTargetPort();

        addMigrationMock(planGenerator);

        Document doc = getDocument(planGenerator);
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.services.taverna.generator.T2FlowExecutablePlanGenerator

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.