Updated Branches: refs/heads/develop 5f1c39cd8 -> 2bda338c6
default context configurable (fixes MARMOTTA-413) Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/7275fc24 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/7275fc24 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/7275fc24 Branch: refs/heads/develop Commit: 7275fc24d71f739d5f2b36432e89798a74f74bd8 Parents: 86d1a40 Author: Sebastian Schaffert <[email protected]> Authored: Tue Jan 7 18:23:34 2014 +0100 Committer: Sebastian Schaffert <[email protected]> Committed: Tue Jan 7 18:23:34 2014 +0100 ---------------------------------------------------------------------- platform/backends/marmotta-backend-bigdata/pom.xml | 2 +- .../platform/backend/kiwi/KiWiStoreProvider.java | 4 ++++ .../core/services/config/ConfigurationServiceImpl.java | 13 ++++++++++--- .../src/main/resources/config-defaults.properties | 4 ++++ .../src/main/resources/config-descriptions.properties | 9 ++++++++- 5 files changed, 27 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/7275fc24/platform/backends/marmotta-backend-bigdata/pom.xml ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-bigdata/pom.xml b/platform/backends/marmotta-backend-bigdata/pom.xml index 53bdc82..0b89f1a 100644 --- a/platform/backends/marmotta-backend-bigdata/pom.xml +++ b/platform/backends/marmotta-backend-bigdata/pom.xml @@ -171,7 +171,7 @@ <dependency> <groupId>com.bigdata</groupId> <artifactId>bigdata</artifactId> - <version>1.2.3</version> + <version>1.3.0</version> <exclusions> <exclusion> <groupId>org.openrdf.sesame</groupId> http://git-wip-us.apache.org/repos/asf/marmotta/blob/7275fc24/platform/backends/marmotta-backend-kiwi/src/main/java/org/apache/marmotta/platform/backend/kiwi/KiWiStoreProvider.java ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-kiwi/src/main/java/org/apache/marmotta/platform/backend/kiwi/KiWiStoreProvider.java b/platform/backends/marmotta-backend-kiwi/src/main/java/org/apache/marmotta/platform/backend/kiwi/KiWiStoreProvider.java index 72b3f05..915a1d7 100644 --- a/platform/backends/marmotta-backend-kiwi/src/main/java/org/apache/marmotta/platform/backend/kiwi/KiWiStoreProvider.java +++ b/platform/backends/marmotta-backend-kiwi/src/main/java/org/apache/marmotta/platform/backend/kiwi/KiWiStoreProvider.java @@ -74,6 +74,8 @@ public class KiWiStoreProvider implements StoreProvider { public static final String CACHING_QUERY_ENABLED = "caching.query.enabled"; public static final String CACHING_QUERY_SIZE = "caching.query.size"; public static final String CACHING_QUERY_LIMIT = "caching.query.limit"; + public static final String CONTEXTS_DEFAULT = "contexts.default"; + public static final String CONTEXTS_INFERRED = "contexts.inferred"; @Inject private Logger log; @@ -191,6 +193,8 @@ public class KiWiStoreProvider implements StoreProvider { log.info("configuration changed: {}", e.getKeys()); if(e.containsChangedKey(SPARQL_STRATEGY) || e.containsChangedKey(DATACENTER_ID) || + e.containsChangedKey(CONTEXTS_DEFAULT) || + e.containsChangedKey(CONTEXTS_INFERRED) || e.containsChangedKey(FULLTEXT_ENABLED) || e.containsChangedKey(FULLTEXT_LANGUAGES) || e.containsChangedKey(DEBUG_SLOWQUERIES) || http://git-wip-us.apache.org/repos/asf/marmotta/blob/7275fc24/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java index 50a52af..25a3a52 100644 --- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java +++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/config/ConfigurationServiceImpl.java @@ -1258,7 +1258,11 @@ public class ConfigurationServiceImpl implements ConfigurationService { */ @Override public String getInferredContext() { - return getBaseUri() + CONTEXT_PATH + "/" + CONTEXT_INFERRED; + if(StringUtils.isBlank(config.getString("contexts.inferred",null))) { + return null; + } else { + return config.getString("contexts.inferred",null); + } } /** @@ -1268,8 +1272,11 @@ public class ConfigurationServiceImpl implements ConfigurationService { */ @Override public String getDefaultContext() { - //return getBaseUri() + CONTEXT_PATH + "/" + CONTEXT_DEFAULT; - return null; + if(StringUtils.isBlank(config.getString("contexts.default",null))) { + return null; + } else { + return config.getString("contexts.default",null); + } } /** http://git-wip-us.apache.org/repos/asf/marmotta/blob/7275fc24/platform/marmotta-core/src/main/resources/config-defaults.properties ---------------------------------------------------------------------- diff --git a/platform/marmotta-core/src/main/resources/config-defaults.properties b/platform/marmotta-core/src/main/resources/config-defaults.properties index 278dd9a..b6c7dab 100644 --- a/platform/marmotta-core/src/main/resources/config-defaults.properties +++ b/platform/marmotta-core/src/main/resources/config-defaults.properties @@ -194,6 +194,10 @@ prefix.ldp = http://www.w3.org/ns/ldp# prefix.mao = http://www.w3.org/ns/ma-ont# +contexts.default = ${kiwi.context}context/default +contexts.inferred = ${kiwi.context}context/inferred + + ############################################################################### # Clustering Configuration ############################################################################### http://git-wip-us.apache.org/repos/asf/marmotta/blob/7275fc24/platform/marmotta-core/src/main/resources/config-descriptions.properties ---------------------------------------------------------------------- diff --git a/platform/marmotta-core/src/main/resources/config-descriptions.properties b/platform/marmotta-core/src/main/resources/config-descriptions.properties index 43983c0..0654931 100644 --- a/platform/marmotta-core/src/main/resources/config-descriptions.properties +++ b/platform/marmotta-core/src/main/resources/config-descriptions.properties @@ -164,4 +164,11 @@ clustering.enabled.description = Turn on cluster-specific configuration options clustering.enabled.type = java.lang.Boolean clustering.name.description = Cluster name to use in cluster configuration (e.g. cache cluster name) -clustering.name.type = java.lang.String \ No newline at end of file +clustering.name.type = java.lang.String + + + +contexts.default.description = Default context to use for triples in case no explicit context selected (may be empty) +contexts.default.type = java.lang.String +contexts.inferred.description = Context to use for storing triples inferred automatically be the reasoner (may not be empty) +contexts.inferred.type = java.lang.String
