Package org.mapfish.print.config

Examples of org.mapfish.print.config.Template


    @Test(expected = IllegalArgumentException.class)
    public void testGeoIllegalFileUrl2() throws Exception {
        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(File.createTempFile("xyz", ".yaml"));

        Template template = new Template();
        template.setConfiguration(configuration);

        GeotiffLayer.GeotiffParam param = new GeotiffLayer.GeotiffParam();
        param.url = "file://../" + CreateMapProcessorFlexibleScaleBBoxGeoJsonTest.BASE_DIR + "/geojson.json";
        new GeotiffLayer.Plugin().parse(template, param);
    }
View Full Code Here


        doTest(requestData);
    }

    private void doTest(PJsonObject requestData) throws IOException, JSONException {
        final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        final Template template = config.getTemplate("main");
        Values values = new Values(requestData, template, parser, getTaskDirectory(), this.httpRequestFactory, new File("."));
        template.getProcessorGraph().createTask(values).invoke();

        @SuppressWarnings("unchecked")
        List<URI> layerGraphics = (List<URI>) values.getObject("layerGraphics", List.class);
        assertEquals(1, layerGraphics.size());
View Full Code Here

                        }
                    }
                }
        );
        final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        final Template template = config.getTemplate("main");
        PJsonObject requestData = loadJsonRequestData();
        Values values = new Values(requestData, template, this.parser, getTaskDirectory(), this.requestFactory, new File("."));
        forkJoinPool.invoke(template.getProcessorGraph().createTask(values));

        @SuppressWarnings("unchecked")
        List<URI> layerGraphics = (List<URI>) values.getObject("layerGraphics", List.class);
        assertEquals(1, layerGraphics.size());
View Full Code Here

    private TestHttpClientFactory httpRequestFactory;

    @Test
    public void testExecute() throws Exception {
        final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        final Template template = config.getTemplate("main");
        PJsonObject requestData = loadJsonRequestData();
        Values values = new Values(requestData, template, this.parser, getTaskDirectory(), this.httpRequestFactory, new File("."));

        this.forkJoinPool.invoke(template.getProcessorGraph().createTask(values));

        @SuppressWarnings("unchecked")
        List<URI> layerGraphics = (List<URI>) values.getObject("layerGraphics", List.class);
        assertEquals(1, layerGraphics.size());
View Full Code Here

        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(new File("."));
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
        MapfishParserTest.populateLayerParam(requestData, param, "type");
        final GeoJsonLayer layer = geojsonLayerParser.parse(template, param);
View Full Code Here

        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(File.createTempFile("xyz", ".yaml"));
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
        MapfishParserTest.populateLayerParam(requestData, param, "type");
        geojsonLayerParser.parse(template, param).getLayers(httpRequestFactory, AbstractMapfishSpringTest.createTestMapContext(), true);
View Full Code Here

    public void testGeoIllegalFileUrl2() throws Exception {
        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(File.createTempFile("xyz", ".yaml"));
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
        param.geoJson = "file://../" + BASE_DIR + "/geojson.json";
        geojsonLayerParser.parse(template, param).getLayers(httpRequestFactory, AbstractMapfishSpringTest.createTestMapContext(), true);
    }
View Full Code Here

        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(file);
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
        MapfishParserTest.populateLayerParam(requestData, param, "type");
        geojsonLayerParser.parse(template, param).getLayers(httpRequestFactory, AbstractMapfishSpringTest.createTestMapContext(), true);
    }
View Full Code Here

                        }
                    }
                }
        );
        final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        final Template template = config.getTemplate("main");
        PJsonObject requestData = loadJsonRequestData();
        Values values = new Values(requestData, template, this.parser, getTaskDirectory(), this.requestFactory, new File("."));
        template.getProcessorGraph().createTask(values).invoke();

        @SuppressWarnings("unchecked")
        List<URI> layerGraphics = (List<URI>) values.getObject("overviewMapLayerGraphics", List.class);
        assertEquals(3, layerGraphics.size());
View Full Code Here

        final File file = getFile(CreateMapProcessorFlexibleScaleBBoxGeoJsonTest.class, BASE_DIR + "geojson.json");
        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(file);
        configuration.setFileLoaderManager(this.fileLoaderManager);

        Template template = new Template();
        template.setConfiguration(configuration);

        GeoJsonLayer.GeoJsonParam param = new GeoJsonLayer.GeoJsonParam();
        MapfishParserTest.populateLayerParam(requestData, param, "type");
        final GeoJsonLayer mapLayer = geojsonLayerParser.parse(template, param);
View Full Code Here

TOP

Related Classes of org.mapfish.print.config.Template

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.