Examples of InputDescription


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

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

        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

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

     * 入力要素を追加する。
     * @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

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

            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

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

        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

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

    @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

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

     * インスタンスを生成する。
     * @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

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

    @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

Examples of org.graylog2.shared.inputs.InputDescription

        final Map<String, InputDescription> availableInputs = inputRegistry.getAvailableInputs();
        if (!availableInputs.containsKey(inputType)) {
            LOG.error("Unknown input type {} requested.", inputType);
            throw new WebApplicationException(Response.Status.NOT_FOUND);
        }
        final InputDescription description = availableInputs.get(inputType);
        final Map<String, Object> result = Maps.newHashMap();
        result.put("type", inputType);
        result.put("name", description.getName());
        result.put("is_exclusive", description.isExclusive());
        result.put("requested_configuration", description.getRequestedConfiguration());
        result.put("link_to_docs", description.getLinkToDocs());

        return json(result);
    }
View Full Code Here

Examples of org.graylog2.shared.inputs.InputDescription

        final Map<String, InputDescription> availableInputs = inputRegistry.getAvailableInputs();
        if (!availableInputs.containsKey(inputType)) {
            LOG.error("Unknown input type {} requested.", inputType);
            throw new WebApplicationException(Response.Status.NOT_FOUND);
        }
        final InputDescription description = availableInputs.get(inputType);
        final Map<String, Object> result = Maps.newHashMap();
        result.put("type", inputType);
        result.put("name", description.getName());
        result.put("is_exclusive", description.isExclusive());
        result.put("requested_configuration", description.getRequestedConfiguration());
        result.put("link_to_docs", description.getLinkToDocs());

        return json(result);
    }
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.