Package org.geotools.xml.transform

Examples of org.geotools.xml.transform.TransformerBase


        return "application/xml";
    }

    public void write(Object value, OutputStream output, Operation operation)
        throws IOException {
        TransformerBase tx = (TransformerBase) value;

        try {
            tx.transform(operation.getParameters()[0], output);
        } catch (TransformerException e) {
            throw (IOException) new IOException().initCause(e);
        }
    }
View Full Code Here


     * @throws Exception
     */
    @Test
    public void testCachedLegendURLSize() throws Exception {
       
        TransformerBase tr = createTransformer();
        tr.setIndentation(2);
        Document dom = WMSTestSupport.transform(req, tr);
       
        NodeList legendURLs = XPATH.getMatchingNodes(
                getLegendURLXPath("cite:BasicPolygons"), dom);
        assertEquals(1, legendURLs.getLength());
View Full Code Here

        GeoServerResourceLoader loader = GeoServerExtensions.bean(GeoServerResourceLoader.class);
       
        File samplesFolder = new File(loader.getBaseDirectory().getAbsolutePath() + File.separator
                + LegendSampleImpl.LEGEND_SAMPLES_FOLDER);
        removeFileOrFolder(samplesFolder);
        TransformerBase tr = createTransformer();
        tr.setIndentation(2);
        Document dom = WMSTestSupport.transform(req, tr);
       
        assertTrue(samplesFolder.exists());
    }
View Full Code Here

     * @throws Exception
     */
    @Test
    public void testCreatedLegendURLSize() throws Exception {
       
        TransformerBase tr = createTransformer();
        tr.setIndentation(2);
        Document dom = WMSTestSupport.transform(req, tr);
       

        NodeList legendURLs = XPATH.getMatchingNodes(
                getLegendURLXPath("cite:squares"), dom);
View Full Code Here

     * @throws Exception
     */
    @Test
    public void testCreatedLegendURLFromWorkspaceSize() throws Exception {
       
        TransformerBase tr = createTransformer();
        tr.setIndentation(2);
        Document dom = WMSTestSupport.transform(req, tr);
       

        NodeList legendURLs = XPATH.getMatchingNodes(
                getLegendURLXPath("cite:states"), dom);
View Full Code Here

        sldResource.file().setLastModified(lastTime + 1000);
       
        // force cleaning of samples cache, to get updates on files
        ((LegendSampleImpl)GeoServerExtensions.bean(LegendSample.class)).reloaded();
       
        TransformerBase tr = createTransformer();
        tr.setIndentation(2);
        Document dom = WMSTestSupport.transform(req, tr);
       
        NodeList legendURLs = XPATH.getMatchingNodes(
                getLegendURLXPath("cite:Bridges"), dom);
        assertEquals(1, legendURLs.getLength());
View Full Code Here

        long previousTime = sldResource.lastmodified();
        sldResource.file().setLastModified(lastTime + 1000);
       
        catalog.firePostModified(catalog.getStyleByName("Bridges"));
       
        TransformerBase tr = createTransformer();
        tr.setIndentation(2);
        Document dom = WMSTestSupport.transform(req, tr);
       
        NodeList legendURLs = XPATH.getMatchingNodes(
                getLegendURLXPath("cite:Bridges"), dom);
        assertEquals(1, legendURLs.getLength());
View Full Code Here

     * @throws Exception
     */
    @Test
    public void testOnlineResourceWidthHeight() throws Exception {
       
        TransformerBase tr = createTransformer();
        tr.setIndentation(2);
        Document dom = WMSTestSupport.transform(req, tr);
       
        NodeList onlineResources = XPATH.getMatchingNodes(
                getOnlineResourceXPath("cite:BasicPolygons"), dom);
        assertEquals(1, onlineResources.getLength());
View Full Code Here

        }
        // otherwise it's a normal response...

        Set<String> legendFormats = wms.getAvailableLegendGraphicsFormats();
       
        TransformerBase transformer;
        String baseUrl = request.getBaseUrl();
        if (WMS.VERSION_1_1_1.equals(version)) {
            Set<String> mapFormats = wms.getAllowedMapFormatNames();
            List<ExtendedCapabilitiesProvider> extCapsProviders;
            extCapsProviders = wms.getAvailableExtendedCapabilitiesProviders();
View Full Code Here

    public String getMimeType(Object value, Operation operation) {
        return "application/xml";
    }

    public void write(Object value, OutputStream output, Operation operation) throws IOException {
        TransformerBase tx = (TransformerBase) value;

        try {
            tx.transform(operation.getParameters()[0], output);
        } catch (TransformerException e) {
            throw (IOException) new IOException().initCause(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.geotools.xml.transform.TransformerBase

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.