Package org.mapfish.print.config

Examples of org.mapfish.print.config.Configuration


                            return error404(uri, httpMethod);
                        }
                    }
                }
        );
        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")
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, parser, getTaskDirectory(), this.requestFactory, new File("."));
        template.getProcessorGraph().createTask(values).invoke();

        @SuppressWarnings("unchecked")
View Full Code Here

    @Test(expected = IllegalFileAccessException.class)
    public void testGeoIllegalFileUrl() throws Exception {
        final File file = AbstractMapfishSpringTest.
                getFile(CreateMapProcessorFlexibleScaleAndCenterGeoTiffTest.class, CreateMapProcessorFlexibleScaleAndCenterGeoTiffTest
                                                                                           .BASE_DIR + "sampleGeoTiff.tif");
        final Configuration configuration = new Configuration();
        configuration.setConfigurationFile(File.createTempFile("xyz", ".yaml"));

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

        GeotiffLayer.GeotiffParam param = new GeotiffLayer.GeotiffParam();
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("."));
        this.forkJoinPool.invoke(template.getProcessorGraph().createTask(values));

        URI northArrowGraphic = (URI) values.getObject("graphic", URI.class);
View Full Code Here

    public void testExtraInputMapperMapping() throws Exception {
        final TestProcessor testProcessor = new TestProcessor();
        testProcessor.getInputMapperBiMap().put("pqr", "prop");


        Configuration configuration = new Configuration();
        List<Throwable> errors = Lists.newArrayList();
        testProcessor.validate(errors, configuration);


        assertTrue(errors.isEmpty());
View Full Code Here

    public void testExtraOutputMapperMapping() throws Exception {
        final TestProcessor testProcessor = new TestProcessor();
        testProcessor.getOutputMapperBiMap().put("prop", "oq");


        Configuration configuration = new Configuration();
        List<Throwable> errors = Lists.newArrayList();
        testProcessor.validate(errors, configuration);


        assertTrue(errors.isEmpty());
View Full Code Here

                            return error404(uri, httpMethod);
                        }
                    }
                }
        );
        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")
View Full Code Here

                            return error404(uri, httpMethod);
                        }
                    }
                }
        );
        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();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test(expected = IllegalArgumentException.class)
    public void testMaxDpi() throws Exception {
        final File configFile = getFile(CreateMapProcessorFlexibleScaleBBoxGeoJsonTest.class, BASE_DIR + "config.yaml");
        final Configuration config = configurationFactory.getConfig(configFile);
        final Template template = config.getTemplate("main");

        final PJsonObject pJsonObject = loadJsonRequestData();
        final PJsonObject attributesJson = pJsonObject.getJSONObject("attributes");
        final JSONObject mapDef = attributesJson.getJSONObject("mapDef").getInternalObj();
        mapDef.remove("dpi");
View Full Code Here

    }

    @Test
    public void testDpiSuggestions() throws Exception {
        final File configFile = getFile(MapAttributeTest.class, "map_attributes/config-json-dpi.yaml");
        final Configuration config = configurationFactory.getConfig(configFile);
        final Template template = config.getTemplate("main");

        final MapAttribute mapAttribute = (MapAttribute) template.getAttributes().get("mapDef");
        List<Throwable> errors = Lists.newArrayList();
        mapAttribute.validate(errors, config);
View Full Code Here

TOP

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

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.