Search in sources :

Example 1 with CQLQueryParametersProtos

use of org.locationtech.geowave.service.grpc.protobuf.CQLQueryParametersProtos in project geowave by locationtech.

the class GeoWaveGrpcTestClient method cqlQuery.

public ArrayList<FeatureProtos> cqlQuery() throws UnsupportedEncodingException {
    LOGGER.info("Performing CQL Query...");
    final VectorStoreParametersProtos baseParams = VectorStoreParametersProtos.newBuilder().setStoreName(GeoWaveGrpcTestUtils.storeName).setTypeName(GeoWaveGrpcTestUtils.typeName).setIndexName(GeoWaveGrpcTestUtils.indexName).build();
    final CQLQueryParametersProtos request = CQLQueryParametersProtos.newBuilder().setBaseParams(baseParams).setCql(GeoWaveGrpcTestUtils.cqlSpatialQuery).build();
    Iterator<FeatureProtos> features;
    final ArrayList<FeatureProtos> feature_list = new ArrayList<>();
    features = vectorBlockingStub.cqlQuery(request);
    // iterate over features
    for (int i = 1; features.hasNext(); i++) {
        final FeatureProtos feature = features.next();
        feature_list.add(feature);
    }
    return feature_list;
}
Also used : CQLQueryParametersProtos(org.locationtech.geowave.service.grpc.protobuf.CQLQueryParametersProtos) FeatureProtos(org.locationtech.geowave.service.grpc.protobuf.FeatureProtos) ArrayList(java.util.ArrayList) VectorStoreParametersProtos(org.locationtech.geowave.service.grpc.protobuf.VectorStoreParametersProtos)

Aggregations

ArrayList (java.util.ArrayList)1 CQLQueryParametersProtos (org.locationtech.geowave.service.grpc.protobuf.CQLQueryParametersProtos)1 FeatureProtos (org.locationtech.geowave.service.grpc.protobuf.FeatureProtos)1 VectorStoreParametersProtos (org.locationtech.geowave.service.grpc.protobuf.VectorStoreParametersProtos)1