You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by wi...@apache.org on 2020/12/02 08:26:35 UTC

[incubator-streampipes] branch dev updated: [hotfix] add configuration option for RDF4J storage dir

This is an automated email from the ASF dual-hosted git repository.

wiener pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new 24c7699  [hotfix] add configuration option for RDF4J storage dir
24c7699 is described below

commit 24c7699bb8ba132130740186cfc590412f5ae7c8
Author: Patrick Wiener <wi...@fzi.de>
AuthorDate: Wed Dec 2 09:25:42 2020 +0100

    [hotfix] add configuration option for RDF4J storage dir
---
 .../storage/rdf4j/config/ConfigKeys.java           | 23 ++++++++++++++++++++++
 .../storage/rdf4j/config/Rdf4JConfig.java          | 13 +++++-------
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/streampipes-storage-rdf4j/src/main/java/org/apache/streampipes/storage/rdf4j/config/ConfigKeys.java b/streampipes-storage-rdf4j/src/main/java/org/apache/streampipes/storage/rdf4j/config/ConfigKeys.java
new file mode 100644
index 0000000..8011846
--- /dev/null
+++ b/streampipes-storage-rdf4j/src/main/java/org/apache/streampipes/storage/rdf4j/config/ConfigKeys.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.streampipes.storage.rdf4j.config;
+
+public class ConfigKeys {
+    public static final String BACKGROUND_KNOWLEDGE_DIR = "SP_BACKGROUND_KNOWLEDGE_DIR";
+    public static final String PE_KNOWLEDGE_DIR = "SP_PE_DESCRIPTION_DIR";
+}
diff --git a/streampipes-storage-rdf4j/src/main/java/org/apache/streampipes/storage/rdf4j/config/Rdf4JConfig.java b/streampipes-storage-rdf4j/src/main/java/org/apache/streampipes/storage/rdf4j/config/Rdf4JConfig.java
index 53d39d0..4076e83 100644
--- a/streampipes-storage-rdf4j/src/main/java/org/apache/streampipes/storage/rdf4j/config/Rdf4JConfig.java
+++ b/streampipes-storage-rdf4j/src/main/java/org/apache/streampipes/storage/rdf4j/config/Rdf4JConfig.java
@@ -28,16 +28,13 @@ public enum Rdf4JConfig {
 
   private SpConfig config;
 
-  private static final String BACKGROUND_KNOWLEDGE_STORAGE = "backgroundknowledge";
-  private static final String PIPELINE_ELEMENT_STORAGE = "pipelineelements";
-
   Rdf4JConfig() {
     config = SpConfig.getSpConfig("storage/rdf4j");
 
-    config.register(BACKGROUND_KNOWLEDGE_STORAGE, makeBackgroundStorageLocation(), "Directory of " +
+    config.register(ConfigKeys.BACKGROUND_KNOWLEDGE_DIR, makeBackgroundStorageLocation(), "Directory of " +
             "the RDF4J native store directory (background knowledge)");
-      config.register(PIPELINE_ELEMENT_STORAGE, makePipelineElementStorageLocation(), "Directory of " +
-              "the RDF4J native store directory (pipeline element knowledge)");
+    config.register(ConfigKeys.PE_KNOWLEDGE_DIR, makePipelineElementStorageLocation(), "Directory of " +
+            "the RDF4J native store directory (pipeline element knowledge)");
   }
 
   private String makeBackgroundStorageLocation() {
@@ -60,11 +57,11 @@ public enum Rdf4JConfig {
   }
 
   public String getBackgroundKnowledgeStorageLocation() {
-      return config.getString(BACKGROUND_KNOWLEDGE_STORAGE);
+      return config.getString(ConfigKeys.BACKGROUND_KNOWLEDGE_DIR);
   }
 
   public String getPipelineElementStorageLocation() {
-      return config.getString(PIPELINE_ELEMENT_STORAGE);
+      return config.getString(ConfigKeys.PE_KNOWLEDGE_DIR);
   }