Package com.asakusafw.vocabulary.flow.graph

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


                            output.getDescription().getDataType(),
                            true,
                            true,
                            attributes);
                    FlowElementResolver resolver = new FlowElementResolver(desc);
                    FlowElementInput bypassIn = resolver.getInput(PseudElementDescription.INPUT_PORT_NAME);
                    FlowElementOutput bypassOut = resolver.getOutput(PseudElementDescription.OUTPUT_PORT_NAME);
                    PortConnection.connect(upstream, bypassIn);
                    PortConnection.connect(bypassOut, downstream);
                } else {
                    PortConnection.connect(upstream, downstream);
View Full Code Here


     * @param downstream 下流
     * @return 自身のオブジェクト
     */
    public FlowGraphGenerator connect(String upstream, String downstream) {
        FlowElementOutput output = findOutput(upstream);
        FlowElementInput input = findInput(downstream);
        PortConnection.connect(output, input);
        return this;
    }
View Full Code Here

                throw new AssertionError(element.getInputPorts());
            }
            return element.getInputPorts().get(0);
        }

        FlowElementInput port = null;
        for (FlowElementInput finding : element.getInputPorts()) {
            if (portName.equals(finding.getDescription().getName())) {
                port = finding;
                break;
            }
View Full Code Here

        assert element != null;
        assert upstream != null;
        assert downstream != null;
        assert element.getDescription().getKind() == FlowElementKind.PSEUD;
        FlowElementResolver resolver = new FlowElementResolver(element.copy());
        FlowElementInput input = resolver.getInput(PseudElementDescription.INPUT_PORT_NAME);
        FlowElementOutput output = resolver.getOutput(PseudElementDescription.OUTPUT_PORT_NAME);
        PortConnection.connect(upstream, input);
        PortConnection.connect(output, downstream);
    }
View Full Code Here

                true,
                true,
                attributes);
        FlowElementResolver resolver = new FlowElementResolver(desc);

        FlowElementInput insertIn =
            resolver.getInput(PseudElementDescription.INPUT_PORT_NAME);
        PortConnection.connect(output, insertIn);

        FlowElementOutput insertOut =
            resolver.getOutput(PseudElementDescription.OUTPUT_PORT_NAME);
View Full Code Here

            collectFragment(node);
        }
    }

    private void collectFragment(FragmentNode node) throws AssertionError {
        FlowElementInput port = ((StageModel.Fragment) node.getValue()).getInputPorts().get(0);
        switch (node.getKind()) {
        case LINE:
            assert lines.containsKey(port) == false;
            lines.put(port, node);
            break;
        case RENDEZVOUS:
            assert rendezvous.containsKey(port.getOwner()) == false;
            rendezvous.put(port.getOwner(), node);
            break;
        default:
            throw new AssertionError(node.getKind());
        }
    }
View Full Code Here

                inputMap.put(blockInput.getElementPort(), blockInput);
            }
        }

        for (ShuffleModel.Segment segment : shuffle.getSegments()) {
            FlowElementInput input = segment.getPort();
            FlowBlock.Input blockInput = inputMap.get(input);
            if (blockInput == null) {
                continue;
            }
            FragmentNode node = new FragmentNode(Kind.SHUFFLE, segment, names.create("shuffle"));
View Full Code Here

    private Statement setupLine(FragmentNode node, StageModel.Fragment value) {
        assert node != null;
        assert value != null;
        assert value.getInputPorts().size() == 1;
        FlowElementInput input = value.getInputPorts().get(0);
        Type type = importer.resolve(factory.newNamedType(value.getCompiled().getQualifiedName()));
        List<Expression> arguments = resolveArguments(node, value);
        if (lines.containsKey(input)) {
            return new ExpressionBuilder(factory, factory.newThis())
                .field(node.getName())
View Full Code Here

            if (connections.size() != 1) {
                LOG.debug("Inserts checkpoint after {}", output);
                FlowGraphUtil.insertCheckpoint(output);
                continue;
            }
            FlowElementInput input = connections.iterator().next().getDownstream();
            FlowElement successor = input.getOwner();
            if (isPushDownTarget(successor) == false) {
                LOG.debug("Inserts checkpoint after {}", output);
                FlowGraphUtil.insertCheckpoint(output);
                continue;
            }
View Full Code Here

    private boolean isPushDownTarget(FlowElement element) {
        assert element != null;
        if (element.getInputPorts().size() != 1) {
            return false;
        }
        FlowElementInput input = element.getInputPorts().get(0);
        if (input.getConnected().size() != 1) {
            return false;
        }
        if (FlowGraphUtil.isBoundary(element)) {
            return false;
        }
View Full Code Here

TOP

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

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.