Search in sources :

Example 6 with DefaultProgressListener

use of org.locationtech.geogig.api.DefaultProgressListener in project GeoGig by boundlessgeo.

the class FeatureMapFlusher method flush.

private void flush(String path) {
    Set<SimpleFeature> features = map.get(path);
    if (!features.isEmpty()) {
        Iterator<? extends Feature> iterator = features.iterator();
        ProgressListener listener = new DefaultProgressListener();
        List<org.locationtech.geogig.api.Node> insertedTarget = null;
        Integer collectionSize = Integer.valueOf(features.size());
        workTree.insert(path, iterator, listener, insertedTarget, collectionSize);
    }
}
Also used : DefaultProgressListener(org.locationtech.geogig.api.DefaultProgressListener) ProgressListener(org.locationtech.geogig.api.ProgressListener) DefaultProgressListener(org.locationtech.geogig.api.DefaultProgressListener) SimpleFeature(org.opengis.feature.simple.SimpleFeature)

Aggregations

DefaultProgressListener (org.locationtech.geogig.api.DefaultProgressListener)6 ProgressListener (org.locationtech.geogig.api.ProgressListener)4 WorkingTree (org.locationtech.geogig.repository.WorkingTree)4 SimpleFeature (org.opengis.feature.simple.SimpleFeature)4 IOException (java.io.IOException)2 AbstractList (java.util.AbstractList)2 Node (org.locationtech.geogig.api.Node)2 SimpleFeatureType (org.opengis.feature.simple.SimpleFeatureType)2 Coordinate (com.vividsolutions.jts.geom.Coordinate)1 Envelope (com.vividsolutions.jts.geom.Envelope)1 Geometry (com.vividsolutions.jts.geom.Geometry)1 Point (com.vividsolutions.jts.geom.Point)1 File (java.io.File)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Entry (java.util.Map.Entry)1 FeatureIdVersionedImpl (org.geotools.filter.identity.FeatureIdVersionedImpl)1 ReferencedEnvelope (org.geotools.geometry.jts.ReferencedEnvelope)1 Test (org.junit.Test)1 DefaultPlatform (org.locationtech.geogig.api.DefaultPlatform)1