public boolean isEmpty() { return backendCollection.isEmpty(); }
public boolean isEmpty() { return delegate.isEmpty(); }
/** * Create a new instance. * * @param featuresArg a FeatureCollection. <b>All features must be of the same FeatureType</b> * @param typeArg the Feature type of of the features. */ public CollectionFeatureReader(SimpleFeatureCollection featuresArg, SimpleFeatureType typeArg) { assert !featuresArg.isEmpty(); this.features = featuresArg.features(); this.type = typeArg; }
public boolean isEmpty() { return delegate.isEmpty() || max == 0 || delegate.size() - start < 1; }
if (!fc.isEmpty()) { if (EMFUtils.has(fct, "feature")) {
if (collection.isEmpty()) { return collection.getSchema();
if (!features.isEmpty()) { SimpleFeatureIterator fi = features.features(); try {
public boolean isEmpty() { return delegate.isEmpty(); }
public boolean isEmpty() { return backendCollection.isEmpty(); }
/** * This methods checks if the provided {@link FeatureCollection} is empty or not. * * <p>In case the provided feature collection is empty it throws an {@link * IllegalStateException}; * * @param features the {@link SimpleFeatureCollection} to check * @throws IllegalStateException */ static final void checkIsEmptyFeatureCollection(SimpleFeatureCollection features) throws IllegalStateException { if (features == null || features.isEmpty()) { throw new IllegalStateException("Got an empty feature collection."); } }
/** * Create a new instance. * * @param featuresArg a FeatureCollection. <b>All features must be of the same FeatureType</b> * @param typeArg the Feature type of of the features. */ public CollectionFeatureReader(SimpleFeatureCollection featuresArg, SimpleFeatureType typeArg) { assert !featuresArg.isEmpty(); collection = featuresArg; this.features = featuresArg.iterator(); this.type = typeArg; }
public boolean isEmpty() { return delegate.isEmpty() || max == 0 || delegate.size() - start < 1; }
/** * Checks that a given SimpleFeatureCollection contains the specified feature * * @param fc the feature collection we're going to search * @param f the feature we're looking for * * @return true if the feature is in the feature collection, false * otherwise */ boolean containsFeatureCollection(SimpleFeatureCollection fc, SimpleFeature f) { if ((fc == null) || fc.isEmpty()) { return false; } return containsFeature(fc.toArray(), f); }
@Override public boolean getCreateFeature(GridElement gridElement) { Filter filter = getIntersectsFilter(the_geom, gridElement.toGeometry()); return !featureSource.subCollection(filter).isEmpty(); } }
if (granules.isEmpty()) { throw new ResourceNotFoundException( "Could not find a granule with id "
private void writeFeature(IFeatureInserter featureWriter, Geometry geometry) throws IOException { if (boundsGeometry != null) { if (!boundsGeometry.intersects(geometry)) { return; } } if (boundsSource != null) { Filter filter = getIntersectsFilter(the_geom, geometry); if (boundsSource.subCollection(filter).isEmpty()) { return; } } SimpleFeature newFeature = featureWriter.buildFeature(); newFeature.setAttribute(UID, featureID); newFeature.setDefaultGeometry(geometry); featureWriter.write(newFeature); } }
if (curCollection.isEmpty()) { if (isShapefileCompatible(originalSchema)) { return writeShapefile(tempDir, curCollection);
if(curCollection.isEmpty()) { if(isShapefileCompatible(originalSchema)) { return writeShapefile(tempDir, curCollection);
public void testAssorted() { SimpleFeatureCollection copy = FeatureCollections.newCollection(); copy.addAll(features); copy.clear(); assertTrue(copy.isEmpty()); copy.addAll(features); assertTrue(!copy.isEmpty()); List<SimpleFeature> list = DataUtilities.list(features); SimpleFeature[] f1 = (SimpleFeature[]) list.toArray(new SimpleFeature[list.size()]); SimpleFeature[] f2 = (SimpleFeature[]) features.toArray(new SimpleFeature[list.size()]); assertEquals(f1.length, f2.length); for (int i = 0; i < f1.length; i++) { assertSame(f1[i], f2[i]); } SimpleFeatureIterator copyIterator = copy.features(); SimpleFeatureIterator featuresIterator = features.features(); while (copyIterator.hasNext() && featuresIterator.hasNext()) { assertEquals(copyIterator.next(), featuresIterator.next()); } SimpleFeatureCollection listen = FeatureCollections.newCollection(); ListenerProxy counter = new ListenerProxy(); listen.addListener(counter); listen.addAll(features); assertEquals(1, counter.changeEvents); listen.removeListener(counter); listen.removeAll(DataUtilities.list(features)); assertEquals(1, counter.changeEvents); }
if ( !fc.isEmpty() ) { if (EMFUtils.has(fct, "feature")) {