Package org.mapfish.print.wrapper.json

Examples of org.mapfish.print.wrapper.json.PJsonObject


        configFiles.put("timeout", getFile(MapPrinterServletTest.class, "config-timeout.yaml").getAbsolutePath());
        printerFactory.setConfigurationFiles(configFiles);
    }

    private String loadRequestDataAsString() throws IOException {
        final PJsonObject requestJson = parseJSONObjectFromFile(MapPrinterServletTest.class, "requestData.json");
        return requestJson.getInternalObj().toString();
    }
View Full Code Here


    public void testBasicTableProperties() throws Exception {
        final String baseDir = BASIC_BASE_DIR;

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

        final JRMapCollectionDataSource tableDataSource = values.getObject("table", JRMapCollectionDataSource.class);
View Full Code Here

    @Test
    public void testBasicTablePrint() throws Exception {
        final String baseDir = BASIC_BASE_DIR;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
        BufferedImage reportImage = ImageSimilarity.exportReportToImage(print, 0);
View Full Code Here

    @Test
    public void testDynamicTablePrint() throws Exception {
        final String baseDir = DYNAMIC_BASE_DIR;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
        BufferedImage reportImage = ImageSimilarity.exportReportToImage(print, 0);
View Full Code Here

            }
        });

        final String baseDir = IMAGE_CONVERTER_BASE_DIR;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
        BufferedImage reportImage = ImageSimilarity.exportReportToImage(print, 0);
View Full Code Here

            }
        });

        final String baseDir = TABLE_CONVERTERS;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
        BufferedImage reportImage = ImageSimilarity.exportReportToImage(print, 0);
View Full Code Here

    @Test
    public void testTableConvertersDynamic() throws Exception {
        final String baseDir = TABLE_CONVERTERS_DYNAMIC;
        final Configuration config = configurationFactory.getConfig(getFile(baseDir + "config.yaml"));
        PJsonObject requestData = loadJsonRequestData(baseDir);

        final AbstractJasperReportOutputFormat format = (AbstractJasperReportOutputFormat) this.outputFormat.get("pngOutputFormat");
        final File file = getFile(TableProcessorTest.class, baseDir);
        JasperPrint print = format.getJasperPrint(requestData, config, file, getTaskDirectory()).print;
        BufferedImage reportImage = ImageSimilarity.exportReportToImage(print, 0);
View Full Code Here

                    }
                }
        );
        final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
        final Template template = config.getTemplate("A4 landscape");
        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("layerGraphics", List.class);
View Full Code Here

    private MfClientHttpRequestFactoryImpl httpRequestFactory;


    @Test
    public void testExecute() throws Exception {
        PJsonObject requestData = loadJsonRequestData();
        doTest(requestData);
    }
View Full Code Here

                return request;
            }
        });
        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.httpRequestFactory, new File("."));
        forkJoinPool.invoke(template.getProcessorGraph().createTask(values));

        final JRTableModelDataSource legend = values.getObject("legend", JRTableModelDataSource.class);
View Full Code Here

TOP

Related Classes of org.mapfish.print.wrapper.json.PJsonObject

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.