Examples of WPSResourceManager


Examples of org.geoserver.wps.resource.WPSResourceManager

    @Test
    public void testWrongOutputFormat() throws Exception {
        // Estimator process for checking limits
        DownloadEstimatorProcess limits = new DownloadEstimatorProcess(
                new StaticDownloadServiceConfiguration(), getGeoServer());
        final WPSResourceManager resourceManager = new WPSResourceManager();
        // Creates the new process for the download
        DownloadProcess downloadProcess = new DownloadProcess(getGeoServer(), limits,
                resourceManager);

        FeatureTypeInfo ti = getCatalog().getFeatureTypeByName(getLayerId(MockData.POLYGONS));
View Full Code Here

Examples of org.geoserver.wps.resource.WPSResourceManager

    @Test
    public void testGetFeaturesAsShapefile() throws Exception {
        // Estimator process for checking limits
        DownloadEstimatorProcess limits = new DownloadEstimatorProcess(
                new StaticDownloadServiceConfiguration(), getGeoServer());
        final WPSResourceManager resourceManager = new WPSResourceManager();
        // Creates the new process for the download
        DownloadProcess downloadProcess = new DownloadProcess(getGeoServer(), limits,
                resourceManager);

        FeatureTypeInfo ti = getCatalog().getFeatureTypeByName(getLayerId(MockData.POLYGONS));
View Full Code Here

Examples of org.geoserver.wps.resource.WPSResourceManager

    @Test
    public void testFilteredClippedFeatures() throws Exception {
        // Estimator process for checking limits
        DownloadEstimatorProcess limits = new DownloadEstimatorProcess(
                new StaticDownloadServiceConfiguration(), getGeoServer());
        final WPSResourceManager resourceManager = new WPSResourceManager();
        // Creates the new process for the download
        DownloadProcess downloadProcess = new DownloadProcess(getGeoServer(), limits,
                resourceManager);
        // ROI object
        Polygon roi = (Polygon) new WKTReader2()
View Full Code Here

Examples of org.geoserver.wps.resource.WPSResourceManager

    layer.setName(sName);
    return layer;
  }

  public DataStore createDatastore(String m_sFilename, SimpleFeatureType m_FeatureType) throws IOException {
      WPSResourceManager manager = GeoServerExtensions.bean(WPSResourceManager.class);
     
    File directory = IOUtils.createTempDirectory("sxttmp");
        File file = new File(directory, m_sFilename);

        try {
            ShapefileDataStore dataStore = new ShapefileDataStore(DataUtilities.fileToURL(file));
            dataStore.createSchema(m_FeatureType);
            manager.addResource(new ShapefileResource(dataStore, directory));
           
            return dataStore;
        } catch(Throwable t) {
            LOGGER.log(Level.SEVERE, "Could not create shapefile output ", t);
            IOUtils.delete(directory);
View Full Code Here
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.