use of org.geotoolkit.storage.feature.FeatureStore in project geotoolkit by Geomatys.
the class DefaultFolderFeatureStore method updateFeatures.
/**
* {@inheritDoc}
*/
@Override
public void updateFeatures(final String groupName, final Filter filter, final Map<String, ?> values) throws DataStoreException {
typeCheck(groupName);
final FeatureStore store = stores.get(this, groupName);
store.updateFeatures(groupName, filter, values);
}
use of org.geotoolkit.storage.feature.FeatureStore in project geotoolkit by Geomatys.
the class DefaultFolderFeatureStore method getFeatureWriter.
/**
* {@inheritDoc}
*/
@Override
public FeatureWriter getFeatureWriter(Query query) throws DataStoreException {
if (!(query instanceof org.geotoolkit.storage.feature.query.Query))
throw new UnsupportedQueryException();
final org.geotoolkit.storage.feature.query.Query gquery = (org.geotoolkit.storage.feature.query.Query) query;
final String typeName = gquery.getTypeName();
typeCheck(typeName);
final FeatureStore store = stores.get(this, typeName);
return store.getFeatureWriter(query);
}
use of org.geotoolkit.storage.feature.FeatureStore in project geotoolkit by Geomatys.
the class DefaultFolderFeatureStore method getFeatureReader.
/**
* {@inheritDoc}
*/
@Override
public FeatureReader getFeatureReader(final Query query) throws DataStoreException {
if (!(query instanceof org.geotoolkit.storage.feature.query.Query))
throw new UnsupportedQueryException();
final org.geotoolkit.storage.feature.query.Query gquery = (org.geotoolkit.storage.feature.query.Query) query;
final String name = gquery.getTypeName();
typeCheck(name);
final FeatureStore store = stores.get(this, name);
return store.getFeatureReader(query);
}
use of org.geotoolkit.storage.feature.FeatureStore in project geotoolkit by Geomatys.
the class DefaultFolderFeatureStore method testFile.
private void testFile(Path file) throws IOException {
if (Files.isHidden(file) || Files.isSymbolicLink(file)) {
// skip hidden and sym link files
return;
}
final Parameters params = singleFileDefaultParameters.clone();
params.getOrCreate(ShapefileProvider.PATH).setValue(file.toUri());
if (singleFileFactory.canProcess(params)) {
try {
final FeatureStore fileDS = (FeatureStore) singleFileFactory.open(params);
fileDS.addListener(StoreEvent.class, subListener);
stores.add(this, fileDS.getNames().iterator().next(), fileDS);
} catch (DataStoreException ex) {
getLogger().log(Level.WARNING, ex.getLocalizedMessage(), ex);
}
}
}
use of org.geotoolkit.storage.feature.FeatureStore in project geotoolkit by Geomatys.
the class DefaultFolderFeatureStore method getFeatureType.
/**
* {@inheritDoc}
*/
@Override
public FeatureType getFeatureType(final String typeName) throws DataStoreException {
typeCheck(typeName);
final FeatureStore store = stores.get(this, typeName);
return store.getFeatureType(typeName);
}
Aggregations