From 05474323a97ea4575a1fd2019cf4a7c886976caa Mon Sep 17 00:00:00 2001 From: Michal Klempa Date: Tue, 14 Jul 2015 08:47:55 +0200 Subject: [PATCH] Using system wide property for resource name --- README.md | 1 + pom.xml | 2 +- .../rdftovirtuosoandckan/RdfToVirtuosoAndCkan.java | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a88ab3c..5782ede 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ |Parameter |Description | |---------------------------------|----------------------------------------| |**dpu.uv-l-rdfToVirtuosoAndCkan.dataset.uri.pattern** |URL pattern to build RDF graph name in Virtuoso storage. | +|**dpu.uv-l-rdfToVirtuosoAndCkan.resource.name** | Name of the CKAN resource to be used, has precedence over distributionMetadata input | |**org.opendatanode.CKAN.secret.token** |Token used to authenticate to CKAN, has to be set in backend.properties | |**org.opendatanode.CKAN.api.url** | URL where CKAN api is located, has to be set in backend.properties | |**org.opendatanode.CKAN.http.header.[key]** | Custom HTTP header added to requests on CKAN | diff --git a/pom.xml b/pom.xml index 8e4f71c..1284231 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ org.opendatanode.plugins uv-l-rdfToCkan - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT diff --git a/src/main/java/eu/unifiedviews/plugins/loader/rdftovirtuosoandckan/RdfToVirtuosoAndCkan.java b/src/main/java/eu/unifiedviews/plugins/loader/rdftovirtuosoandckan/RdfToVirtuosoAndCkan.java index 1a215ad..3c342d2 100644 --- a/src/main/java/eu/unifiedviews/plugins/loader/rdftovirtuosoandckan/RdfToVirtuosoAndCkan.java +++ b/src/main/java/eu/unifiedviews/plugins/loader/rdftovirtuosoandckan/RdfToVirtuosoAndCkan.java @@ -40,6 +40,8 @@ public class RdfToVirtuosoAndCkan extends AbstractDpu additionalHttpHeaders = new HashMap<>(); for (Map.Entry configEntry : environment.entrySet()) { if (configEntry.getKey().startsWith(RdfToCkan.CONFIGURATION_HTTP_HEADER)) { @@ -102,6 +106,8 @@ protected void innerExecute() throws DPUException { rdfToCkan.rdfInput = rdfIntermediate; rdfToCkan.distributionInput = distributionInput; - rdfToCkan.outerExecute(ctx, new RdfToCkanConfig_V1()); + RdfToCkanConfig_V1 rdfToCkanConfig= new RdfToCkanConfig_V1(); + rdfToCkanConfig.setResourceName(resourceName); + rdfToCkan.outerExecute(ctx, rdfToCkanConfig); } }