@Test public void basicTest() throws Exception { final GeoWaveAvroFeatureDataAdapter adapter = new GeoWaveAvroFeatureDataAdapter(schema); final GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); final SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(schema); final int numFeatures = 10; final List<SimpleFeature> data = new ArrayList<>(); final Map<Integer, SimpleFeature> dataMap = new HashMap<>(); for (int i = 0; i < numFeatures; i++) { final Point point = geometryFactory.createPoint(new Coordinate(i, i)); featureBuilder.set("geometry", point); featureBuilder.set("pop", i); featureBuilder.set("when", new Date(0)); featureBuilder.set("whennot", new Date()); data.add(featureBuilder.buildFeature(Integer.toString(i))); dataMap.put(i, data.get(data.size() - 1)); } ingestCannedData(adapter, data); final Coordinate[] coordArray = new Coordinate[5]; coordArray[0] = new Coordinate(-180, -90); coordArray[1] = new Coordinate(180, -90); coordArray[2] = new Coordinate(180, 90); coordArray[3] = new Coordinate(-180, 90); coordArray[4] = new Coordinate(-180, -90); VectorQueryBuilder bldr = VectorQueryBuilder.newBuilder().addTypeName(adapter.getTypeName()).indexName(INDEX_NAME); bldr = bldr.constraints( bldr.constraintsFactory().spatialTemporalConstraints().spatialConstraints( new GeometryFactory().createPolygon(coordArray)).build()); try (final CloseableIterator<SimpleFeature> itr = dataStore.query(bldr.build())) { while (itr.hasNext()) { final SimpleFeature feat = itr.next(); final SimpleFeature feature = dataMap.remove(Integer.parseInt(feat.getID())); assertEquals(DataUtilities.encodeFeature(feature), DataUtilities.encodeFeature(feat)); } assertTrue(dataMap.isEmpty()); } }
@Override protected RowBuilder<SimpleFeature, Object> newBuilder() { return new GeoWaveAvroAttributeRowBuilder(); }
GeoWaveAvroFeatureDataAdapter extends FeatureDataAdapter { @Override protected RowBuilder<SimpleFeature, Object> newBuilder() { return new GeoWaveAvroAttributeRowBuilder(); } }
GeoWaveAvroFeatureDataAdapter extends FeatureDataAdapter { @Override protected RowBuilder<SimpleFeature, Object> newBuilder() { return new GeoWaveAvroAttributeRowBuilder(); } protected  GeoWaveAvroFeatureDataAdapter();  GeoWaveAvroFeatureDataAdapter(final SimpleFeatureType type);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final VisibilityManagement<SimpleFeature> visibilityManagement);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final List<PersistentIndexFieldHandler<SimpleFeature, ? extends CommonIndexValue, Object>> customIndexHandlers);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final FieldVisibilityHandler<SimpleFeature, Object> fieldVisiblityHandler); }
GeoWaveAvroFeatureDataAdapter extends FeatureDataAdapter { @Override protected RowBuilder<SimpleFeature, Object> newBuilder() { return new GeoWaveAvroAttributeRowBuilder(); } protected  GeoWaveAvroFeatureDataAdapter();  GeoWaveAvroFeatureDataAdapter(final SimpleFeatureType type);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final VisibilityManagement<SimpleFeature> visibilityManagement);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final List<PersistentIndexFieldHandler<SimpleFeature, ? extends CommonIndexValue, Object>> customIndexHandlers);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final FieldVisibilityHandler<SimpleFeature, Object> fieldVisiblityHandler); @Override FieldReader<Object> getReader(final String fieldName); @Override FieldWriter<SimpleFeature, Object> getWriter(final String fieldName); @Override int getPositionOfOrderedField(final CommonIndexModel model, final String fieldName); @Override String getFieldNameForPosition(final CommonIndexModel model, final int position); }
GeoWaveAvroFeatureDataAdapter extends FeatureDataAdapter { @Override protected RowBuilder<SimpleFeature, Object> newBuilder() { return new GeoWaveAvroAttributeRowBuilder(); } protected  GeoWaveAvroFeatureDataAdapter();  GeoWaveAvroFeatureDataAdapter(final SimpleFeatureType type);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final VisibilityManagement<SimpleFeature> visibilityManagement);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final List<PersistentIndexFieldHandler<SimpleFeature, ? extends CommonIndexValue, Object>> customIndexHandlers);  GeoWaveAvroFeatureDataAdapter(
      final SimpleFeatureType type,
      final FieldVisibilityHandler<SimpleFeature, Object> fieldVisiblityHandler); @Override FieldReader<Object> getReader(final String fieldName); @Override FieldWriter<SimpleFeature, Object> getWriter(final String fieldName); @Override int getPositionOfOrderedField(final CommonIndexModel model, final String fieldName); @Override String getFieldNameForPosition(final CommonIndexModel model, final int position);  }