@Test public void testOffset() throws FileNotFoundException, IOException { Query query = new Query(Query.ALL); query.setStartIndex(3); SimpleFeatureSource rows = csvDataStore.getFeatureSource(); SimpleFeatureCollection matches = rows.getFeatures(query); List<String> offsetCities = Arrays.asList( "Ottawa", "Minneapolis", "Lausanne", "Victoria", "Cape Town", "Sydney"); int count = 0; try (SimpleFeatureIterator iter = matches.features()) { while (iter.hasNext()) { SimpleFeature f = iter.next(); assertTrue(offsetCities.contains(f.getAttribute("CITY"))); count++; } } assertEquals(6, count); assertEquals(6, matches.size()); assertEquals(6, rows.getCount(query)); }
@Override public SimpleFeatureSource getFeatureSource() throws IOException { return super.getFeatureSource(getTypeName()); }
CSVDataStore extends ContentDataStore implements FileDataStore { @Override public SimpleFeatureSource getFeatureSource() throws IOException { return super.getFeatureSource(getTypeName()); } }
CSVDataStore extends ContentDataStore implements FileDataStore { @Override public SimpleFeatureSource getFeatureSource() throws IOException { return super.getFeatureSource(getTypeName()); } CSVDataStore(CSVFileState csvFileState, CSVStrategy csvStrategy); }
CSVDataStore extends ContentDataStore implements FileDataStore { @Override public SimpleFeatureSource getFeatureSource() throws IOException { return super.getFeatureSource(getTypeName()); } CSVDataStore(CSVFileState csvFileState, CSVStrategy csvStrategy); Name getTypeName(); @Override SimpleFeatureType getSchema(); @Override void updateSchema(SimpleFeatureType featureType); @Override SimpleFeatureSource getFeatureSource(); @Override FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader(); @Override FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriter(
            Filter filter, Transaction transaction); @Override FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriter(Transaction transaction); @Override FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriterAppend(
            Transaction transaction); CSVStrategy getCSVStrategy(); @Override void createSchema(SimpleFeatureType featureType); }
CSVDataStore extends ContentDataStore implements FileDataStore { @Override public SimpleFeatureSource getFeatureSource() throws IOException { return super.getFeatureSource(getTypeName()); } CSVDataStore(CSVFileState csvFileState, CSVStrategy csvStrategy); Name getTypeName(); @Override SimpleFeatureType getSchema(); @Override void updateSchema(SimpleFeatureType featureType); @Override SimpleFeatureSource getFeatureSource(); @Override FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader(); @Override FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriter(
            Filter filter, Transaction transaction); @Override FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriter(Transaction transaction); @Override FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriterAppend(
            Transaction transaction); CSVStrategy getCSVStrategy(); @Override void createSchema(SimpleFeatureType featureType);  }