Package com.asakusafw.vocabulary.flow.graph

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


        assert inputs != null;
        assert outputs != null;
        boolean valid = true;
        Repository externals = environment.getExternals();
        for (FlowIn<?> port : graph.getFlowInputs()) {
            InputDescription desc = port.getDescription();
            ExternalIoDescriptionProcessor processor = externals.findProcessor(desc);
            if (processor != null) {
                inputs.add(Tuples.of(desc, processor));
            } else {
                environment.error(
                        "{0}を処理するプロセッサが見つかりませんでした。",
                        desc.getClass().getName());
                valid = false;
            }
        }
        for (FlowOut<?> port : graph.getFlowOutputs()) {
            OutputDescription desc = port.getDescription();
View Full Code Here


        if (inputs.containsKey(name)) {
            throw new IllegalStateException(MessageFormat.format(
                    "入力の名前が重複しています ({0})",
                    name));
        }
        FlowIn<T> in = new FlowIn<T>(new InputDescription(name, importer));
        inputs.put(name, in);
        ports.add(in);
        return in;
    }
View Full Code Here

     * 入力要素を追加する。
     * @param name 追加する要素の名前
     * @return 追加した要素
     */
    public FlowElement defineInput(String name) {
        InputDescription desc = new InputDescription(name, TYPE);
        FlowIn<?> node = new FlowIn<Object>(desc);
        flowInputs.add(node);
        return register(name, node.getFlowElement());
    }
View Full Code Here

            FlowElementDescription desc = element.getDescription();
            if (desc.getKind() != FlowElementKind.INPUT) {
                error("{0}は入力を表現していません", desc);
                continue;
            }
            InputDescription description = (InputDescription) desc;
            saw.add(description);
            ExternalIoDescriptionProcessor proc = environment.getExternals().findProcessor(description);
            if (proc == null) {
                error("{0}は不明なインポーターを利用しています", desc);
                continue;
View Full Code Here

        return modified;
    }

    private boolean rewriteRequired(FlowIn<?> input) {
        assert input != null;
        InputDescription desc = input.getDescription();
        ImporterDescription importer = desc.getImporterDescription();
        if (importer == null) {
            return false;
        }
        if (isSupportedSize(desc) == false) {
            return false;
View Full Code Here

    @Override
    public List<ExternalIoStage> emitPrologue(IoContext context) throws IOException {
        IoContextBuilder builder = new IoContextBuilder();
        List<CopyDescription> targets = Lists.create();
        for (Input input : context.getInputs()) {
            InputDescription description = input.getDescription();
            DirectFileInputDescription desc = extract(description);
            if (isCacheTarget(desc)) {
                LOG.debug("Input will be copied in prologue: {}", description.getName());
                targets.add(new CopyDescription(
                        getProcessedInputName(description),
                        getEnvironment().getDataClasses().load(description.getDataType()),
                        getOriginalInputInfo(description),
                        TemporaryOutputFormat.class));
                builder.addInput(input);
            }
        }
View Full Code Here

     * インスタンスを生成する。
     * @param type 入力の型
     * @param name 入力の名前
     */
    public MockIn(Class<T> type, String name) {
        InputDescription desc = new InputDescription(name, type);
        resolver = new FlowElementResolver(desc);
    }
View Full Code Here

    @Override
    public List<ExternalIoStage> emitPrologue(IoContext context) throws IOException {
        List<CopyDescription> targets = Lists.create();
        for (Input input : context.getInputs()) {
            InputDescription description = input.getDescription();
            FileImporterDescription desc = extract(description);
            if (isCacheTarget(desc)) {
                targets.add(new CopyDescription(
                        getProcessedInputName(description),
                        getEnvironment().getDataClasses().load(description.getDataType()),
                        getOrifinalInputInfo(desc),
                        TemporaryOutputFormat.class));
            }
        }
        if (targets.isEmpty()) {
View Full Code Here

TOP

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

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.