Examples of dispose()


Examples of org.geotools.data.DataStore.dispose()

            catch (Throwable t){
                return t.getLocalizedMessage(); // We cannot connect because of this ...
            }
            finally {
                if( datastore != null){
                    datastore.dispose();
                }
            }
        }
        return null; // apparently we can connect
    }
View Full Code Here

Examples of org.geotools.data.FileDataStore.dispose()

                    }
                    finally {
                    //  if (writer!=null) writer.dispose();
                  FileSystemEvent fileSystemInsertEvent = new FileSystemEvent(tmpTiff, FileSystemEventType.FILE_ADDED);
              ret.add(fileSystemInsertEvent);
              if (store!=null) store.dispose();
                    }
         
          // add the event to the return

View Full Code Here

Examples of org.geotools.data.complex.AppSchemaDataAccess.dispose()

            // there should be 25 features in this data access
            assertEquals(25, countFeatures(dSRelative));
        } finally {
            if (dSRelative != null) {
                dSRelative.dispose();
            }
        }
    }

    /**
 
View Full Code Here

Examples of org.geotools.data.directory.DirectoryDataStore.dispose()

       
        DataStore dds = new DirectoryDataStore(tempDir, getFileStoreFactory());
      
        assertEquals(1, dds.getTypeNames().length);
        assertEquals("archsites", dds.getTypeNames()[0]);
        dds.dispose();
    }
   
    @Test
    @Ignore
    // this test is skipped, it checks something that formally is what we should expect,
View Full Code Here

Examples of org.geotools.data.directory.DirectoryTypeCache.dispose()

        DirectoryTypeCache cache = new DirectoryTypeCache(tempDir, getFileStoreFactory());
        System.out.println(cache.getTypeNames());
        assertEquals(2, cache.getTypeNames().size());
        assertTrue(cache.getTypeNames().contains("archsites"));
        assertTrue(cache.getTypeNames().contains("bugsites"));
        cache.dispose();
    }
   
    @Test
    public void testAddNewDataStore() throws Exception {
        File f = copyShapefiles("shapes/bugsites.shp");
View Full Code Here

Examples of org.geotools.data.efeature.EFeatureDataStore.dispose()

                SimpleFeatureType eTypeN = eStore.getSchema(name);
                assertTrue("SimpleFeatureTypes are not same instance (Name)",eTypeI==eTypeN);
                SimpleFeatureType eTypeL = eStore.getSchema(it);
                assertTrue("SimpleFeatureTypes are not same instance (Local)",eTypeI==eTypeL);
            }
            eStore.dispose();
        } catch (Exception e) {
            fail(e);
        }
    }
   
View Full Code Here

Examples of org.geotools.data.property.PropertyDataStore.dispose()

    @BeforeClass
    public static void beforeClass() throws Exception {
        PropertyDataStore pds = new PropertyDataStore(new File(
                "./src/test/resources/org/geotools/data/transform"));
        STATES_SCHEMA = pds.getFeatureSource("states").getSchema();
        pds.dispose();
       
        WGS84 = CRS.decode("EPSG:4326");
    }
   
    @Test
View Full Code Here

Examples of org.geotools.data.shapefile.ShapefileDataStore.dispose()

            LOGGER.log(Level.WARNING,
                "Error while writing featuretype '" + schema.getTypeName() + "' to shapefile.", ioe);
            throw new ServiceException(ioe);
        } finally {
            if(dstore != null) {
                dstore.dispose();
            }
        }
    }
   
    /**
 
View Full Code Here

Examples of org.geotools.data.shapefile.files.ShpFiles.dispose()

        // under windows the two paths can be just different in terms of case..
        assertEquals( new File(path).getCanonicalPath().toLowerCase(), file.getPath().toLowerCase());
        assertEquals(1, shpFiles.numberOfLocks());
       
        shpFiles.unlockRead(file, this);
        shpFiles.dispose();
    }
    @Test
    public void testAcquireWriteFile() throws Throwable {
        ShpFiles shpFiles = new ShpFiles("http://somefile.com/shp.shp");
View Full Code Here

Examples of org.geotools.data.wms.response.GetMapResponse.dispose()

                    throw (IOException) new IOException("GetMap failed: "
                            + mapRequest.getFinalURL());
                }
                return gcf.create(layers.get(0).getTitle(), image, gridEnvelope);
            } finally {
                response.dispose();
            }
        } catch (ServiceException e) {
            throw (IOException) new IOException("GetMap failed").initCause(e);
        }
    }
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.