Package com.asakusafw.vocabulary.flow.graph

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


        assertThat(FlowBlock.isConnected(
                mapper.getBlockOutputs().get(0),
                stages.getOutput().getBlockInputs().get(0)), is(true));

        assertThat(mapper.getElements().size(), is(1));
        FlowElement mapperOp = single(mapper.getElements());

        assertThat(mapperOp.getDescription(), is(gen.desc("op")));
    }
View Full Code Here


        assertThat(FlowBlock.isConnected(
                reducer.getBlockOutputs().get(0),
                stages.getOutput().getBlockInputs().get(0)), is(true));

        assertThat(mapper.getElements().size(), is(1));
        FlowElement mapperOp = single(mapper.getElements());
        assertThat(FlowGraphUtil.isIdentity(mapperOp), is(true));

        assertThat(reducer.getElements().size(), is(1));
        FlowElement reducerOp = single(reducer.getElements());
        assertThat(reducerOp.getDescription(), is(gen.desc("op")));
    }
View Full Code Here

        assertThat(FlowBlock.isConnected(
                reducer.getBlockOutputs().get(0),
                stages.getOutput().getBlockInputs().get(0)), is(true));

        assertThat(mapper.getElements().size(), is(1));
        FlowElement mapperOp = single(mapper.getElements());
        assertThat(mapperOp.getDescription(), is(gen.desc("op1")));

        assertThat(reducer.getElements().size(), is(1));
        FlowElement reducerOp = single(reducer.getElements());
        assertThat(reducerOp.getDescription(), is(gen.desc("op2")));
    }
View Full Code Here

        assertThat(FlowBlock.isConnected(
                reducer.getBlockOutputs().get(0),
                stages.getOutput().getBlockInputs().get(0)), is(true));

        assertThat(mapper.getElements().size(), is(1));
        FlowElement mapperOp = single(mapper.getElements());
        assertThat(mapperOp.getDescription(), is(comp.desc("op1")));

        assertThat(reducer.getElements().size(), is(1));
        FlowElement reducerOp = single(reducer.getElements());
        assertThat(reducerOp.getDescription(), is(comp.desc("op2")));
    }
View Full Code Here

        assertThat(FlowBlock.isConnected(
                mapper.getBlockOutputs().get(0),
                stages.getOutput().getBlockInputs().get(0)), is(true));

        assertThat(mapper.getElements().size(), is(1));
        FlowElement mapperOp = single(mapper.getElements());
        assertThat(mapperOp.getDescription(), is(fp2.desc("op1")));
    }
View Full Code Here

        assertThat(FlowBlock.isConnected(
                mapper.getBlockOutputs().get(0),
                stages.getOutput().getBlockInputs().get(0)), is(true));

        assertThat(mapper.getElements().size(), is(1));
        FlowElement mapperOp = single(mapper.getElements());
        assertThat(mapperOp.getDescription(), is(fp4.desc("op1")));
    }
View Full Code Here

                mapper.getBlockOutputs().get(0),
                stages.getOutput().getBlockInputs().get(0)), is(true));

        assertThat(mapper.getElements().size(), is(2));

        FlowElement op1 = single(mapper.getBlockInputs()).getElementPort().getOwner();
        assertThat(op1.getDescription(), is(fp2a.get("op1").getDescription()));
        assertThat(succ(op1).getDescription(), is(fp2b.get("op2").getDescription()));
    }
View Full Code Here

            List<Statement> cases = Lists.create();
            for (List<ShuffleModel.Segment> group : ShuffleEmiterUtil.groupByElement(shuffle)) {
                for (ShuffleModel.Segment segment : group) {
                    cases.add(factory.newSwitchCaseLabel(v(segment.getPortId())));
                }
                FlowElement element = group.get(0).getPort().getOwner();
                cases.add(new ExpressionBuilder(factory, fragments.getRendezvous(element))
                    .toReturnStatement());
            }
            cases.add(factory.newSwitchDefaultLabel());
            cases.add(new TypeBuilder(factory, t(AssertionError.class))
View Full Code Here

        gen.defineOperator(getClass(), "simple", "in", "out");
        gen.defineOutput("out");
        gen.connect("in", "simple.in");
        gen.connect("simple.out", "out");
        rewrite(in_trace(getClass(), "simple", "in", Mode.STRICT));
        FlowElement weave = succ(gen.get("in"));
        assertThat(weave, is(pred(gen.get("simple"))));
        assertThat(succ(gen.get("simple")), is(gen.get("out")));
    }
View Full Code Here

        gen.defineOutput("out");
        gen.connect("in", "simple.in");
        gen.connect("simple.out", "out");
        rewrite(out_trace(getClass(), "simple", "out", Mode.STRICT));
        assertThat(succ(gen.get("in")), is(gen.get("simple")));
        FlowElement weave = succ(gen.get("simple"));
        assertThat(weave, is(pred(gen.get("out"))));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.vocabulary.flow.graph.FlowElement

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.