Here's an example to call JDataStoreWizard and update a table in PostGIS
JDataStoreWizard wizard = new JDataStoreWizard(new PostgisDataStoreFactory());
int result = wizard.showModalDialog();
if (result != JWizard.FINISH) {
System.exit(0);
}
Map connectionParameters = wizard.getConnectionParameters();
PostgisDataStore dataStore = (PostgisDataStore)
DataStoreFinder.getDataStore(connectionParameters);
FeatureStore myFeatureTable = (FeatureStore) pgDs.getFeatureSource("myFeature");
myFeatureTable.addFeatures(myFeatureCollection);
No comments:
Post a Comment