Examples of FlowGraph


Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        Graph<String> graph = toGraph(in);
        assertThat(graph.getConnected("in"), isJust("GenericWithClass"));
        assertThat(graph.getConnected("GenericWithClass"), isJust("out"));

        FlowGraph flow = desc.getFlowGraph();
        assertThat(flow.getDescription(), is((Object) loader.loadClass("com.example.GenericWithClass")));
        assertThat(flow.getFlowInputs().size(), is(1));
        assertThat(flow.getFlowInputs().get(0).getDescription().getName(), is("in"));
        assertThat(flow.getFlowInputs().get(0).getDescription().getDataType(), is((Object) MockHoge.class));
        assertThat(flow.getFlowOutputs().size(), is(1));
        assertThat(flow.getFlowOutputs().get(0).getDescription().getName(), is("out"));
        assertThat(flow.getFlowOutputs().get(0).getDescription().getDataType(), is((Object) MockFoo.class));

        Graph<String> inner = toGraph(flow.getFlowInputs());
        assertThat(inner.getConnected("in"), isJust(CoreOperatorFactory.PROJECT_NAME));
        assertThat(inner.getConnected(CoreOperatorFactory.PROJECT_NAME), isJust("out"));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

    protected StageGraph jfToStageGraph(Class<? extends FlowDescription> aClass) {
        assert aClass != null;
        JobFlowDriver analyzed = JobFlowDriver.analyze(aClass);
        assertThat(analyzed.getDiagnostics().toString(), analyzed.hasError(), is(false));
        JobFlowClass flow = analyzed.getJobFlowClass();
        FlowGraph flowGraph = flow.getGraph();
        return flowToStageGraph(flowGraph);
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.connect("in", "op.i0");
        gen.connect("empty", "op.i1");
        gen.connect("op.o1", "out");
        gen.connect("op.o2", "stop");

        FlowGraph graph = gen.toGraph();
        FlowGraph copy = FlowGraphUtil.deepCopy(graph);

        assertThat(
                toDescription(FlowGraphUtil.toElementGraph(copy)),
                is(toDescription(FlowGraphUtil.toElementGraph(graph))));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineOperator("op", "i0 i1", "o1 o2");
        gen.connect("in", "op.i0");
        gen.connect("empty", "op.i1");
        gen.connect("op.o1", "out");
        gen.connect("op.o2", "stop");
        FlowGraph component = gen.toGraph();

        gen = new FlowGraphGenerator();
        gen.defineInput("in");
        gen.defineOutput("out");
        gen.defineFlowPart("c", component);
        gen.connect("in", "c.in");
        gen.connect("c.out", "out");
        FlowGraph graph = gen.toGraph();

        FlowGraph copy = FlowGraphUtil.deepCopy(graph);

        Set<FlowElement> allComponents = FlowGraphUtil.collectFlowParts(copy);
        assertThat(allComponents.size(), is(1));
        FlowElement compElem = allComponents.iterator().next();
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        cgen.defineInput("in");
        cgen.defineOutput("out");
        cgen.defineOperator("op", "in", "out");
        cgen.connect("in", "op.in");
        cgen.connect("op.out", "out");
        FlowGraph component = cgen.toGraph();

        gen = new FlowGraphGenerator();
        gen.defineInput("in");
        gen.defineOutput("out");
        FlowElement fc = gen.defineFlowPart("c", component);
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        }
        LOG.debug("{}の実行計画を計算中", graph);
        LOG.debug("フロー部品の圧縮: {}", options.isCompressFlowPart());
        LOG.debug("並行ステージの圧縮: {}", options.isCompressConcurrentStage());

        FlowGraph copy = FlowGraphUtil.deepCopy(graph);

        if (rewrite(copy) == false) {
            return null;
        }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        Graph<String> graph = toGraph(in);
        assertThat(graph.getConnected("in"), isJust("Simple"));
        assertThat(graph.getConnected("Simple"), isJust("out"));

        FlowGraph flow = desc.getFlowGraph();
        assertThat(flow.getDescription(), is((Object) loader.loadClass("com.example.Simple")));
        assertThat(flow.getFlowInputs().size(), is(1));
        assertThat(flow.getFlowInputs().get(0).getDescription().getName(), is("in"));
        assertThat(flow.getFlowInputs().get(0).getDescription().getDataType(), is((Object) MockHoge.class));
        assertThat(flow.getFlowOutputs().size(), is(1));
        assertThat(flow.getFlowOutputs().get(0).getDescription().getName(), is("out"));
        assertThat(flow.getFlowOutputs().get(0).getDescription().getDataType(), is((Object) MockHoge.class));

        Graph<String> inner = toGraph(flow.getFlowInputs());
        assertThat(inner.getConnected("in"), isJust("out"));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

    public void simple() {
        JobFlowDriver analyzed = JobFlowDriver.analyze(SimpleJobFlow.class);
        assertThat(analyzed.hasError(), is(false));
        JobFlowClass jf = analyzed.getJobFlowClass();

        FlowGraph graph = jf.getGraph();
        assertThat(graph.getDescription(), is((Object) SimpleJobFlow.class));

        assertThat(graph.getFlowInputs().size(), is(1));
        assertThat(graph.getFlowOutputs().size(), is(1));

        FlowIn<?> in = graph.getFlowInputs().get(0);
        assertThat(in.getDescription().getName(), is("hoge"));

        FlowOut<?> out = graph.getFlowOutputs().get(0);
        assertThat(out.getDescription().getName(), is("hoge"));

        assertThat(in.toOutputPort().getConnected(), is(out.toInputPort().getConnected()));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        Graph<String> graph = toGraph(in);
        assertThat(graph.getConnected("in"), isJust("Generic"));
        assertThat(graph.getConnected("Generic"), isJust("out"));

        FlowGraph flow = desc.getFlowGraph();
        assertThat(flow.getDescription(), is((Object) loader.loadClass("com.example.Generic")));
        assertThat(flow.getFlowInputs().size(), is(1));
        assertThat(flow.getFlowInputs().get(0).getDescription().getName(), is("in"));
        assertThat(flow.getFlowInputs().get(0).getDescription().getDataType(), is((Object) MockHoge.class));
        assertThat(flow.getFlowOutputs().size(), is(1));
        assertThat(flow.getFlowOutputs().get(0).getDescription().getName(), is("out"));
        assertThat(flow.getFlowOutputs().get(0).getDescription().getDataType(), is((Object) MockHoge.class));

        Graph<String> inner = toGraph(flow.getFlowInputs());
        assertThat(inner.getConnected("in"), isJust("out"));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

     */
    public JobflowInfo compileFlow(FlowDescription description) throws IOException {
        if (description == null) {
            throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$
        }
        FlowGraph graph = flow.createFlowGraph(description);
        List<File> classPath = buildClassPath(description.getClass());
        return DirectFlowCompiler.compile(
                graph,
                "testing",
                description.getClass().getName(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.