Package com.asakusafw.vocabulary.flow.graph

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


                "implicit-stop",
                output.getDescription().getDataType(),
                true,
                false,
                FlowBoundary.STAGE);
        FlowElementResolver resolver = new FlowElementResolver(desc);
        FlowElementInput stopIn = resolver.getInput(PseudElementDescription.INPUT_PORT_NAME);
        PortConnection.connect(output, stopIn);
    }
View Full Code Here


                            "bypass",
                            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

            FlowElementInput downstream) {
        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

                name,
                output.getDescription().getDataType(),
                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);
        for (FlowElementInput downstream : originalDownstreams) {
            PortConnection.connect(insertOut, downstream);
        }
    }
View Full Code Here

     * @param port target port
     * @param delegate delegate
     * @return the debug element
     */
    public static FlowElement debug(FlowElementInput port, LinePartProcessor delegate) {
        FlowElementResolver resolver = createResolver(port.getDescription().getDataType(), delegate);
        for (FlowElementOutput opposite : port.disconnectAll()) {
            PortConnection.connect(opposite, resolver.getInput(PORT_IN));
        }
        PortConnection.connect(resolver.getOutput(PORT_OUT), port);
        return resolver.getElement();
    }
View Full Code Here

     * @param port target port
     * @param delegate delegate
     * @return the debug element
     */
    public static FlowElement debug(FlowElementOutput port, LinePartProcessor delegate) {
        FlowElementResolver resolver = createResolver(port.getDescription().getDataType(), delegate);
        for (FlowElementInput opposite : port.disconnectAll()) {
            PortConnection.connect(resolver.getOutput(PORT_OUT), opposite);
        }
        PortConnection.connect(port, resolver.getInput(PORT_IN));
        return resolver.getElement();
    }
View Full Code Here

        PortConnection.connect(port, resolver.getInput(PORT_IN));
        return resolver.getElement();
    }

    private static FlowElementResolver createResolver(Type type, LinePartProcessor delegate) {
        FlowElementResolver resolver = new OperatorDescription.Builder(Debug.class)
            .addAttribute(ObservationCount.AT_LEAST_ONCE)
            .addAttribute(new DebuggingAttribute(delegate))
            .addInput(PORT_IN, type)
            .addOutput(PORT_OUT, type)
            .declare(DebuggingUtils.class, DebuggingUtils.class, "debug")
View Full Code Here

                STOP_NAME,
                getPortType(in),
                true,
                false,
                FlowBoundary.STAGE);
        FlowElementResolver resolver = new FlowElementResolver(desc);
        resolver.resolveInput(INPUT_PORT_NAME, in);
    }
View Full Code Here

                    EMPTY_NAME,
                    type,
                    false,
                    true,
                    FlowBoundary.STAGE);
            this.resolver = new FlowElementResolver(desc);
        }
View Full Code Here

            PseudElementDescription desc = new PseudElementDescription(
                    CONFLUENT_NAME,
                    type,
                    true,
                    true);
            resolver = new FlowElementResolver(desc);
            for (Source<T> in : input) {
                resolver.resolveInput(INPUT_PORT_NAME, in);
            }
        }
View Full Code Here

TOP

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

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.