Package com.asakusafw.windgate.core.resource

Examples of com.asakusafw.windgate.core.resource.ResourceManipulator


            TestContext context) throws IOException {
        ProcessScript<?> process = WindGateTestHelper.createProcessScript(
                description.getModelType(),
                description);
        ParameterList parameterList = new ParameterList(context.getArguments());
        ResourceManipulator manipulator =
            WindGateTestHelper.createResourceManipulator(context, description, parameterList);
        manipulator.cleanupSource(process);
    }
View Full Code Here


            TestContext context) throws IOException {
        ProcessScript<V> process = WindGateTestHelper.createProcessScript(
                definition.getModelClass(),
                description);
        ParameterList parameterList = new ParameterList(context.getArguments());
        ResourceManipulator manipulator =
            WindGateTestHelper.createResourceManipulator(context, description, parameterList);
        DrainDriver<V> driver = manipulator.createDrainForSource(process);
        return new WindGateOutput<V>(WindGateTestHelper.prepare(driver));
    }
View Full Code Here

            TestContext context) throws IOException {
        ProcessScript<?> process = WindGateTestHelper.createProcessScript(
                description.getModelType(),
                description);
        ParameterList parameterList = new ParameterList(context.getArguments());
        ResourceManipulator manipulator =
            WindGateTestHelper.createResourceManipulator(context, description, parameterList);
        manipulator.cleanupDrain(process);
    }
View Full Code Here

            TestContext context) throws IOException {
        ProcessScript<V> process = WindGateTestHelper.createProcessScript(
                definition.getModelClass(),
                description);
        ParameterList parameterList = new ParameterList(context.getArguments());
        ResourceManipulator manipulator =
            WindGateTestHelper.createResourceManipulator(context, description, parameterList);
        DrainDriver<V> driver = manipulator.createDrainForDrain(process);
        return new WindGateOutput<V>(WindGateTestHelper.prepare(driver));
    }
View Full Code Here

            TestContext context) throws IOException {
        ProcessScript<V> process = WindGateTestHelper.createProcessScript(
                definition.getModelClass(),
                description);
        ParameterList parameterList = new ParameterList(context.getArguments());
        ResourceManipulator manipulator =
            WindGateTestHelper.createResourceManipulator(context, description, parameterList);
        SourceDriver<V> driver = manipulator.createSourceForDrain(process);
        return new WindGateSource<V>(WindGateTestHelper.prepare(driver), definition);
    }
View Full Code Here

            WindGateImporterDescription description = (WindGateImporterDescription) instance;
            ProcessScript<T> process = WindGateTestHelper.createProcessScript(
                    definition.getModelClass(),
                    description);
            ParameterList parameterList = new ParameterList(context.getArguments());
            ResourceManipulator manipulator =
                WindGateTestHelper.createResourceManipulator(context, description, parameterList);
            SourceDriver<T> driver = manipulator.createSourceForSource(process);
            return new WindGateSource<T>(WindGateTestHelper.prepare(driver), definition);
        } else if (instance instanceof WindGateExporterDescription) {
            WindGateExporterDescription description = (WindGateExporterDescription) instance;
            ProcessScript<T> process = WindGateTestHelper.createProcessScript(
                    definition.getModelClass(),
                    description);
            ParameterList parameterList = new ParameterList(context.getArguments());
            ResourceManipulator manipulator =
                WindGateTestHelper.createResourceManipulator(context, description, parameterList);
            SourceDriver<T> driver = manipulator.createSourceForDrain(process);
            return new WindGateSource<T>(WindGateTestHelper.prepare(driver), definition);
        } else {
            throw new IOException(MessageFormat.format(
                    "URI must represent a subclass of {1} or {2}: {0}",
                    source,
View Full Code Here

            ParameterList arguments) throws IOException {
        assert description != null;
        assert resource != null;
        assert arguments != null;
        ResourceProvider provider = resource.createProvider();
        ResourceManipulator manipulator = provider.createManipulator(arguments);
        if (manipulator instanceof Configurable) {
            LOG.debug("Configuring resource manipulator: {}", manipulator);
            ConfigurationFactory configuration = ConfigurationFactory.getDefault();
            ((Configurable) manipulator).setConf(configuration.newInstance());
        }
View Full Code Here

        WindGateImporterDescription description = new MockImporterDescription(
                String.class,
                "testing",
                driver);

        ResourceManipulator manipulator = WindGateTestHelper.createResourceManipulator(
                new TestContext.Empty(),
                description,
                new ParameterList());
        assertThat(file.exists(), is(true));

        ProcessScript<String> script = WindGateTestHelper.createProcessScript(String.class, description);
        manipulator.cleanupSource(script);
        assertThat(file.exists(), is(false));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.windgate.core.resource.ResourceManipulator

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.