@Override protected Iterator<Feature> openIterator() { return new SimpleRecordIterator(root, offset); }
@Override protected void closeIterator(Iterator<Feature> close) { if(close instanceof RetypingIterator) { ((RetypingIterator) close).close(); } } }
public FeatureCollection getRecords(Query q, Transaction t) throws IOException { return getRecords(q,t,null); }
@Override public Feature next() { if (!hasNext()) { throw new NoSuchElementException("No more records to retrieve"); } Feature next = convertToFeature(record); record = null; return next; }
@Test public void testSpatialFilter() throws IOException { Filter filter = FF.bbox("", 60.042, 13.754, 68.410, 17.920, CSWRecordDescriptor.DEFAULT_CRS_NAME); FeatureCollection records = store.getRecords(new Query("Record", filter), Transaction.AUTO_COMMIT); assertEquals(1, records.size()); Feature record = (Feature) records.toArray()[0]; assertEquals("urn:uuid:1ef30a8b-876d-4828-9246-c37ab4510bbd", getSimpleLiteralValue(record, "identifier")); }
@Override public InternalFunction duplicate(Expression... parameters) { RecordTextFunction func = new RecordTextFunction(); func.setParameters(Arrays.asList(parameters)); return func; } }
@Override public FeatureCollection<FeatureType, Feature> sort(SortBy order) { FeatureCollection sorted = delegate.sort(order); return new RetypingFeatureCollection(sorted, properties); }
@Override protected Iterator<Feature> openIterator() { return new RetypingIterator(delegate.features(), schema, properties); }
public RetypingIterator( FeatureIterator<Feature> delegate, FeatureType schema, List<PropertyName> properties) { this.delegate = delegate; this.builder = new ComplexFeatureBuilder(schema); this.names = buildNames(properties); }
@Override public FeatureCollection<FeatureType, Feature> sort(SortBy order) { List<Feature> features = new ArrayList<Feature>(); MemoryFeatureCollection memory = new MemoryFeatureCollection(getSchema(), features); return memory.sort(order); } }
public FeatureCollection getRecords(Query q, Transaction t) throws IOException { return getRecords(q, t, null); }
@Override public Feature next() { if (!hasNext()) { throw new NoSuchElementException("No more records to retrieve"); } Feature next = convertToFeature(record); record = null; return next; }
@Override public FeatureCollection<FeatureType, Feature> sort(SortBy order) { FeatureCollection sorted = delegate.sort(order); return new RetypingFeatureCollection(sorted, properties); }
@Override protected Iterator<Feature> openIterator() { return new SimpleRecordIterator(root, offset); }
@Override protected void closeIterator(Iterator<Feature> close) { if (close instanceof RetypingIterator) { ((RetypingIterator) close).close(); } } }
@Override protected Iterator<Feature> openIterator() { return new RetypingIterator(delegate.features(), schema, properties); }
public RetypingIterator(FeatureIterator<Feature> delegate, FeatureType schema, List<PropertyName> properties) { this.delegate = delegate; this.builder = new ComplexFeatureBuilder(schema); this.names = buildNames(properties); }
@Override public FeatureCollection<FeatureType, Feature> sort(SortBy order) { List<Feature> features = new ArrayList<Feature>(); MemoryFeatureCollection memory = new MemoryFeatureCollection(getSchema(), features); return memory.sort(order); }
@Override public FeatureCollection<FeatureType, Feature> subCollection(Filter filter) { FeatureCollection subCollection = delegate.subCollection(filter); return new RetypingFeatureCollection(subCollection, properties); }
@Override public FeatureCollection<FeatureType, Feature> subCollection(Filter filter) { FeatureCollection subCollection = delegate.subCollection(filter); return new RetypingFeatureCollection(subCollection, properties); }