public void searchDataProducts()

in data-catalog-api/server/service/src/main/java/org/apache/airavata/datacatalog/api/service/DataCatalogAPIService.java [193:217]


    public void searchDataProducts(DataProductSearchRequest request,
            StreamObserver<DataProductSearchResponse> responseObserver) {

        try {
            MetadataSchemaQueryResult searchResult = dataCatalogService.searchDataProducts(
                    request.getUserInfo(),
                    request.getSql(),
                    request.getPage(),
                    request.getPageSize()
            );
            List<DataProduct> dataProducts = searchResult.dataProducts();
            int totalCount = searchResult.totalCount();
            responseObserver.onNext(
                    DataProductSearchResponse.newBuilder()
                            .addAllDataProducts(dataProducts)
                            .setTotalCount(totalCount)
                            .build()
            );
            responseObserver.onCompleted();
        } catch (MetadataSchemaSqlParseException e) {
            responseObserver.onError(Status.INVALID_ARGUMENT.withDescription("Failed to parse SQL query.").asException());
        } catch (MetadataSchemaSqlValidateException e) {
            responseObserver.onError(Status.INVALID_ARGUMENT.withDescription("Failed to validate SQL query.").asException());
        }
    }