Examples of FlowGraph


Examples of cascading.cascade.planner.FlowGraph

    }

  public Cascade connect( CascadeDef cascadeDef )
    {
    IdentifierGraph identifierGraph = new IdentifierGraph( cascadeDef.getFlowsArray() );
    FlowGraph flowGraph = new FlowGraph( identifierGraph );

    return new Cascade( cascadeDef, properties, flowGraph, identifierGraph );
    }
View Full Code Here

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

            Map<FlowBlock.Input, Set<FlowBlock.Input>> inputMapping,
            Map<FlowBlock.Output, Set<FlowBlock.Output>> outputMapping) {
        Precondition.checkMustNotBeNull(blocks, "blocks"); //$NON-NLS-1$
        Precondition.checkMustNotBeNull(inputMapping, "inputMapping"); //$NON-NLS-1$
        Precondition.checkMustNotBeNull(outputMapping, "outputMapping"); //$NON-NLS-1$
        FlowGraph graph = null;
        int minSerialNumber = Integer.MAX_VALUE;
        int reduces = 0;
        for (FlowBlock block : blocks) {
            if (block.detached == false) {
                throw new IllegalArgumentException();
View Full Code Here

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

        FlowDescription instance = newInstance(ctor, driver.getPorts());
        if (hasError()) {
            return;
        }
        try {
            FlowGraph graph = driver.createFlowGraph(instance);
            this.jobFlowClass = new JobFlowClass(config, graph);
        } catch (Exception e) {
            error(e, "{0}の解析に失敗しました ({1})", description.getName(), e.toString());
        }
    }
View Full Code Here

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

     * @throws IllegalArgumentException 引数に{@code null}が指定された場合
     */
    public FlowGraph createFlowGraph(FlowDescription description) {
        Precondition.checkMustNotBeNull(description, "description"); //$NON-NLS-1$
        description.start();
        FlowGraph result = new FlowGraph(
                description.getClass(),
                Lists.from(inputs.values()),
                Lists.from(outputs.values()));
        inputs.clear();
        outputs.clear();
View Full Code Here

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

    /**
     * ここまでに構築した内容を元にしたグラフを返す。
     * @return 構築した内容を元にしたグラフ
     */
    public FlowGraph toGraph() {
        return new FlowGraph(Testing.class, flowInputs, flowOutputs);
    }
View Full Code Here

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

                collectElements(graph),
                elemMapping,
                new HashMap<FlowElementInput, FlowElementInput>(),
                new HashMap<FlowElementOutput, FlowElementOutput>());

        FlowGraph copy = new FlowGraph(graph.getDescription(), flowInputs, flowOutputs);
        copy.setOrigin(graph);
        return copy;
    }
View Full Code Here

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

        }
        FlowElement copy;
        FlowElementDescription description = orig.getDescription();
        if (description.getKind() == FlowElementKind.FLOW_COMPONENT) {
            FlowPartDescription fcd = (FlowPartDescription) description;
            FlowGraph subgraph = deepCopy(fcd.getFlowGraph());
            FlowPartDescription partCopy = new FlowPartDescription(subgraph);
            copy = new FlowElement(partCopy, orig.getAttributeOverride());
        } else {
            copy = orig.copy();
        }
View Full Code Here

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

        if (description.getKind() != FlowElementKind.FLOW_COMPONENT) {
            throw new IllegalArgumentException("element must be a flow component"); //$NON-NLS-1$
        }

        FlowPartDescription component = (FlowPartDescription) description;
        FlowGraph graph = component.getFlowGraph();

        // フロー部品の外側からの入力と、フロー部品の内部の入力を結線する
        List<FlowElementInput> externalInputs = element.getInputPorts();
        List<FlowElementOutput> internalInputs = Lists.create();
        for (FlowIn<?> fin : graph.getFlowInputs()) {
            internalInputs.add(fin.toOutputPort());
        }
        bypass(externalInputs, internalInputs, attributes);

        // フロー部品の内側からの出力と、フロー部品の外側への出力を結線する
        List<FlowElementOutput> externalOutputs = element.getOutputPorts();
        List<FlowElementInput> internalOutputs = Lists.create();
        for (FlowOut<?> fout : graph.getFlowOutputs()) {
            internalOutputs.add(fout.toInputPort());
        }
        bypass(internalOutputs, externalOutputs, attributes);

        // 不要な結線を解除
        for (FlowIn<?> fin : graph.getFlowInputs()) {
            disconnect(fin.getFlowElement());
        }
        for (FlowOut<?> fout : graph.getFlowOutputs()) {
            disconnect(fout.getFlowElement());
        }

        // インライン化したフロー部品を除去
        disconnect(element);
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

        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
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.