Package org.geotools.xml.transform

Examples of org.geotools.xml.transform.TransformerBase$TranslatorSupport$Action


     * @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

    }

    String getRequestXML() {
        ByteArrayOutputStream out = new ByteArrayOutputStream();

        TransformerBase tx;
        if (builder.getCoverage.version == Version.v1_0_0) {
            tx = new WCS10GetCoverageTransformer(getCatalog());
        } else {
            CoverageResponseDelegateFinder responseFactory = (CoverageResponseDelegateFinder) getGeoServerApplication().getBean("coverageResponseDelegateFactory");
            tx = new WCS11GetCoverageTransformer(getCatalog(), responseFactory);
        }

        try {
            tx.setIndentation(2);
            tx.transform(builder.getCoverageRequest(), out);
        } catch (TransformerException e) {
            LOGGER.log(Level.SEVERE, "Error generating xml request", e);
            error(e);
        }
        return out.toString();
View Full Code Here

        // default
        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

    public void write(Object value, OutputStream output) throws IOException, ServiceException {
        Assert.isInstanceOf(XMLTransformerMap.class, value);

        XMLTransformerMap map = (XMLTransformerMap) value;
        TransformerBase transformer = map.getTransformer();
        Object transformerSubject = map.getTransformerSubject();
        try {
            transformer.transform(transformerSubject, output);
        } catch (TransformerException e) {
            // TransformerException do not respect the Exception.getCause() contract
            Throwable cause = e.getCause() != null ? e.getCause() : e.getException();
            // we need to propagate the RuntimeException
            if (cause instanceof RuntimeException) {
View Full Code Here

TOP

Related Classes of org.geotools.xml.transform.TransformerBase$TranslatorSupport$Action

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.