Package org.geotools.data

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


        try {
            SimpleFeatureCollection fc = ds.getFeatureSource("Lines").getFeatures();
            checkFeatures(getFeatureSource(MockData.LINES).getFeatures(), fc);
        }
        finally {
            ds.dispose();   
        }
    }

    /**
     * Test a MultiLineString geometry.
View Full Code Here


       try {
           SimpleFeatureCollection fc = ds.getFeatureSource("MLines").getFeatures();
           checkFeatures(getFeatureSource(MockData.MLINES).getFeatures(), fc);
       }
       finally {
           ds.dispose();   
       }
    }

    /**
     * Test a Polygon geometry.
View Full Code Here

        try {
            SimpleFeatureCollection fc = ds.getFeatureSource("Polygons").getFeatures();
            checkFeatures(getFeatureSource(MockData.POLYGONS).getFeatures(), fc);
        }
        finally {
            ds.dispose();   
        }
    }

    /**
     * Test a MultiPolygon geometry.
View Full Code Here

        try {
            SimpleFeatureCollection fc = ds.getFeatureSource("MPolygons").getFeatures();
            checkFeatures(getFeatureSource(MockData.MPOLYGONS).getFeatures(), fc);
        }
        finally {
            ds.dispose();   
        }
    }

   
    /**
 
View Full Code Here

    @Override
    public String getTypeName(URL url) throws IOException {
        DataStore ds = createDataStore(url);
        String[] names = ds.getTypeNames();
        assert names.length == 1 : "Invalid number of type names for csv file store";
        ds.dispose();
        return names[0];
    }
}
View Full Code Here

                tables.add(tbl);
            }
        }
        finally {
            //TODO: cache the datastore for subsquent calls
            store.dispose();
        }
       
    }

    @Override
View Full Code Here

                JDBCUtils.close(st);
                JDBCUtils.close(conn, null, null);
                // very important, or we'll leak connection pools during
                // execution
                if (ds != null)
                    ds.dispose();
                if (reader != null)
                    reader.close();
            }
        }
View Full Code Here

            LOGGER.log(Level.WARNING,
                "Error while writing featuretype '" + schema.getTypeName() + "' to shapefile.", ioe);
            throw new ServiceException(ioe);
        } finally {
            if(dstore != null) {
                dstore.dispose();
            }
        }
       
        return file;
    }
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.