Examples of encode()


Examples of org.geoserver.kml.KMLEncoder.encode()

                    context));
            context.addFeatures(folder, features);
        }

        // write out the output
        encoder.encode(kml, os, context);
        os.flush();

    }

    /**
 

Examples of org.geoserver.wcs.responses.CoverageResponseDelegate.encode()

      
        // store the coverage
        OutputStream os = null;
        try {
            os = new BufferedOutputStream(new FileOutputStream(coverageFile));
            delegate.encode(coverage, outputFormat,Collections.EMPTY_MAP, os);
            os.flush();
        } finally {
            if(os != null) os.close();
        }
        System.out.println(coverageFile);

Examples of org.geoserver.wps.ComplexDataEncoderDelegate.encode()

            ComplexDataEncoderDelegate delegate = (ComplexDataEncoderDelegate) rawResult;
            XMLSerializer xmls = new XMLSerializer(output, new OutputFormat());
            xmls.setNamespaces(true);

            try {
                delegate.encode(xmls);
            } catch (IOException e) {
                throw e;
            } catch (Exception e) {
                throw new WPSException("An error occurred while encoding "
                        + "the results of the process", e);

Examples of org.geoserver.wps.RawDataEncoderDelegate.encode()

    void writeComplex(OutputStream output, OutputDataType result)
            throws IOException {
        Object rawResult = result.getData().getComplexData().getData().get(0);
        if (rawResult instanceof RawDataEncoderDelegate) {
            RawDataEncoderDelegate delegate = (RawDataEncoderDelegate) rawResult;
            delegate.encode(output);
        } else if (rawResult instanceof XMLEncoderDelegate) {
            XMLEncoderDelegate delegate = (XMLEncoderDelegate) rawResult;

            try {
                TransformerHandler xmls =

Examples of org.geoserver.wps.XMLEncoderDelegate.encode()

            try {
                TransformerHandler xmls =
                    ((SAXTransformerFactory)SAXTransformerFactory.newInstance()).newTransformerHandler();
                xmls.setResult(new StreamResult(output));
                delegate.encode(xmls);
            } catch (IOException e) {
                throw e;
            } catch (Exception e) {
                throw new WPSException("An error occurred while encoding "
                        + "the results of the process", e);

Examples of org.geoserver.wps.ppio.ComplexPPIO.encode()

               
                // write out the file
                FileOutputStream fos = null;
                try {
                    fos = new FileOutputStream(file);
                    cppio.encode(o, fos);
                } finally {
                    IOUtils.closeQuietly(fos);
                }
               
                // create the link

Examples of org.geoserver.wps.ppio.LiteralPPIO.encode()

                  literal.setAnyValue( owsf.createAnyValueType() );
                }

                try {
                    if (p.sample != null) {
                        literal.setDefaultValue(lppio.encode(p.sample));
                    }
                } catch (Exception e) {
                    LOGGER.log(Level.WARNING, "Failed to fill the default value for input " + p.key
                            + " of process " + name, e);
                }

Examples of org.geoserver.wps.ppio.ZipArchivePPIO.encode()

        Assert.assertNotNull(rasterZip);

        // make sure we create files locally so that we don't clog the sytem temp
        final File currentDirectory = new File(DownloadProcessTest.class.getResource(".").toURI());
        File tempZipFile = File.createTempFile("zipppiotemp", ".zip", currentDirectory);
        ppio.encode(rasterZip, new FileOutputStream(tempZipFile));

        Assert.assertTrue(tempZipFile.length() > 0);

        final File tempDir = new File(currentDirectory, Long.toString(System.nanoTime()));
        Assert.assertTrue(tempDir.mkdir());

Examples of org.geotools.GML.encode()

        protected void write(Object object, OutputStream out) throws IOException {
            SimpleFeatureCollection features = (SimpleFeatureCollection) object;
            GML gml = new GML(Version.WFS1_0);
            gml.setNamespace("gf", features.getSchema().getName().getNamespaceURI());
            // gml.setFeatureBounding(false);
            gml.encode(out, features);
        }

    }
   
}

Examples of org.geotools.arcsde.filter.GeometryEncoderSDE.encode()

            if (this.sdeSpatialFilters == null) {
                GeometryEncoderSDE geometryEncoder = new GeometryEncoderSDE(this.sdeLayer,
                        featureType);

                try {
                    geometryEncoder.encode(getGeometryFilter());
                } catch (GeometryEncoderException e) {
                    throw new DataSourceException("Error parsing geometry filters: "
                            + e.getMessage(), e);
                }
TOP
Copyright © 2018 www.massapi.com. 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.