From 4f30f587a12f3b9a8c58b59e59c5f68168ec04d8 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sun, 22 Oct 2023 11:20:39 +0200 Subject: [PATCH] Make code compile :) --- .../com/atomgraph/linkeddatahub/Application.java | 4 ++-- .../linkeddatahub/imports/ImportExecutor.java | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/atomgraph/linkeddatahub/Application.java b/src/main/java/com/atomgraph/linkeddatahub/Application.java index 9fcb6bdb2..dad56fc1d 100644 --- a/src/main/java/com/atomgraph/linkeddatahub/Application.java +++ b/src/main/java/com/atomgraph/linkeddatahub/Application.java @@ -1281,7 +1281,7 @@ public Map getLengthMap(Map apps) */ public void submitImport(CSVImport csvImport, com.atomgraph.linkeddatahub.apps.model.Application app, Service service, Service adminService, String baseURI, LinkedDataClient ldc) { - new ImportExecutor(importThreadPool).start(service, adminService, baseURI, ldc, service.getGraphStoreClient(), csvImport); + new ImportExecutor(importThreadPool).start(service, adminService, baseURI, ldc, csvImport); } /** @@ -1296,7 +1296,7 @@ public void submitImport(CSVImport csvImport, com.atomgraph.linkeddatahub.apps.m */ public void submitImport(RDFImport rdfImport, com.atomgraph.linkeddatahub.apps.model.Application app, Service service, Service adminService, String baseURI, LinkedDataClient ldc) { - new ImportExecutor(importThreadPool).start(service, adminService, baseURI, ldc, service.getGraphStoreClient(), rdfImport); + new ImportExecutor(importThreadPool).start(service, adminService, baseURI, ldc, rdfImport); } /** diff --git a/src/main/java/com/atomgraph/linkeddatahub/imports/ImportExecutor.java b/src/main/java/com/atomgraph/linkeddatahub/imports/ImportExecutor.java index 7ef1c67d8..f412ca80d 100644 --- a/src/main/java/com/atomgraph/linkeddatahub/imports/ImportExecutor.java +++ b/src/main/java/com/atomgraph/linkeddatahub/imports/ImportExecutor.java @@ -102,14 +102,13 @@ public ImportExecutor(ExecutorService execService) /** * Executes CSV import. * - * @param csvImport CSV import resource * @param service application's SPARQL service * @param adminService admin application's SPARQL service * @param appBaseURI application's base URI * @param ldc Linked Data client - * @param graphStoreClient GSP client + * @param csvImport CSV import resource */ - public void start(Service service, Service adminService, String appBaseURI, LinkedDataClient ldc, LinkedDataClient graphStoreClient, CSVImport csvImport) + public void start(Service service, Service adminService, String appBaseURI, LinkedDataClient ldc, CSVImport csvImport) { if (csvImport == null) throw new IllegalArgumentException("CSVImport cannot be null"); if (log.isDebugEnabled()) log.debug("Submitting new import to thread pool: {}", csvImport.toString()); @@ -134,15 +133,14 @@ public void start(Service service, Service adminService, String appBaseURI, Link /** * Executes RDF import. * - * @param rdfImport RDF import resource * @param service application's SPARQL service * @param adminService admin application's SPARQL service * @param appBaseURI application's base URI * @param ldc Linked Data client - * @param graphStoreClient GSP client + * @param rdfImport RDF import resource */ - public void start(Service service, Service adminService, String appBaseURI, LinkedDataClient ldc, LinkedDataClient graphStoreClient, RDFImport rdfImport) + public void start(Service service, Service adminService, String appBaseURI, LinkedDataClient ldc, RDFImport rdfImport) { if (rdfImport == null) throw new IllegalArgumentException("RDFImport cannot be null"); if (log.isDebugEnabled()) log.debug("Submitting new import to thread pool: {}", rdfImport.toString()); @@ -165,7 +163,7 @@ public void start(Service service, Service adminService, String appBaseURI, Link Supplier fileSupplier = new ClientResponseSupplier(ldc, RDF_MEDIA_TYPES, URI.create(rdfImport.getFile().getURI())); // skip validation because it will be done during final POST anyway CompletableFuture.supplyAsync(fileSupplier, getExecutorService()).thenApplyAsync(getStreamRDFOutputWriter(service, adminService, - graphStoreClient, queryBaseURI, query, rdfImport), getExecutorService()). + ldc, queryBaseURI, query, rdfImport), getExecutorService()). thenAcceptAsync(success(service, rdfImport, provImport), getExecutorService()). exceptionally(failure(service, rdfImport, provImport)); }