You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2014/04/04 11:29:33 UTC
[01/15] git commit: add support for a local in-memory triple registry
Repository: marmotta
Updated Branches:
refs/heads/ldp cf8effb53 -> e1f88ee41
add support for a local in-memory triple registry
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/471edcbc
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/471edcbc
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/471edcbc
Branch: refs/heads/ldp
Commit: 471edcbc6ce75fbe6edbeedf71aca0e3774aa67a
Parents: ff1c4a1
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Fri Mar 28 15:29:38 2014 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Fri Mar 28 15:29:38 2014 +0100
----------------------------------------------------------------------
.../marmotta/kiwi/config/RegistryStrategy.java | 8 +-
.../registry/LocalTripleRegistry.java | 106 +++++++++++++++++++
.../marmotta/kiwi/sail/KiWiValueFactory.java | 4 +
3 files changed, 117 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/471edcbc/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/RegistryStrategy.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/RegistryStrategy.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/RegistryStrategy.java
index 841d1cf..30caa2f 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/RegistryStrategy.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/RegistryStrategy.java
@@ -34,6 +34,12 @@ public enum RegistryStrategy {
* Use a synchronized replicated infinispan cache to synchronize between parallel instances. Faster but requires
* more memory.
*/
- CACHE
+ CACHE,
+
+ /**
+ * Use a local in-memory hash map to synchronize between parallel instances. Does not synchronize across machines
+ * in a cluster
+ */
+ LOCAL
}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/471edcbc/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/registry/LocalTripleRegistry.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/registry/LocalTripleRegistry.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/registry/LocalTripleRegistry.java
new file mode 100644
index 0000000..762a179
--- /dev/null
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/registry/LocalTripleRegistry.java
@@ -0,0 +1,106 @@
+/*
+ * 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.marmotta.kiwi.persistence.registry;
+
+import org.apache.marmotta.commons.sesame.tripletable.IntArray;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Add file description here!
+ *
+ * @author Sebastian Schaffert (sschaffert@apache.org)
+ */
+public class LocalTripleRegistry implements KiWiTripleRegistry {
+
+ private Map<Long,Long> cache;
+
+
+ private Map<Long,List<Long>> transactions;
+
+
+ public LocalTripleRegistry() {
+ cache = new ConcurrentHashMap<>();
+ transactions = new ConcurrentHashMap<>();
+
+ }
+
+
+ /**
+ * Register a key/triple id pair in the triple registry for the given transaction ID.
+ *
+ * @param key the key identifying the triple arguments (subject, object, predicate, context)
+ * @param transactionId the identifier of the transaction registering the triple id
+ * @param tripleId the new triple identifier
+ */
+ @Override
+ public void registerKey(IntArray key, long transactionId, long tripleId) {
+ List<Long> transaction = transactions.get(transactionId);
+ if(transaction == null) {
+ transaction = new ArrayList<>();
+ transactions.put(transactionId, transaction);
+ }
+ cache.put(key.longHashCode(), tripleId);
+ transaction.add(key.longHashCode());
+ }
+
+ /**
+ * Check if another (or the same) transaction has already registered an ID for the triple with the
+ * given key. Returns -1 in case no other ID has been registered, or a value >0 otherwise.
+ *
+ * @param key the key identifying the triple arguments (subject, object, predicate, context)
+ * @return id of the triple or -1
+ */
+ @Override
+ public long lookupKey(IntArray key) {
+ Long value = cache.get(key.longHashCode());
+ if(value != null) {
+ return value;
+ } else {
+ return -1;
+ }
+ }
+
+ /**
+ * Free all registry entries claimed by the transaction with the given identifier. Should remove or
+ * expire all registry entries to avoid unnecessary storage consumption.
+ *
+ * @param transactionId the identifier of the transaction registering the triple id
+ */
+ @Override
+ public void releaseTransaction(long transactionId) {
+ if(transactions.containsKey(transactionId)) {
+ for(long key : transactions.remove(transactionId)) {
+ cache.remove(key);
+ }
+ }
+ }
+
+ /**
+ * Remove the key with the given key, e.g. when a statement is again deleted during a transaction.
+ *
+ * @param key the key identifying the triple arguments (subject, object, predicate, context)
+ */
+ @Override
+ public void deleteKey(IntArray key) {
+ cache.remove(key.longHashCode());
+ }
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/471edcbc/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
index f248dfb..2502ea1 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
@@ -26,6 +26,7 @@ import org.apache.marmotta.kiwi.persistence.KiWiConnection;
import org.apache.marmotta.kiwi.persistence.registry.CacheTripleRegistry;
import org.apache.marmotta.kiwi.persistence.registry.DBTripleRegistry;
import org.apache.marmotta.kiwi.persistence.registry.KiWiTripleRegistry;
+import org.apache.marmotta.kiwi.persistence.registry.LocalTripleRegistry;
import org.openrdf.model.*;
import org.openrdf.model.impl.ContextStatementImpl;
import org.slf4j.Logger;
@@ -66,6 +67,9 @@ public class KiWiValueFactory implements ValueFactory {
case CACHE:
registry = new CacheTripleRegistry(store.getPersistence().getCacheManager());
break;
+ case LOCAL:
+ registry = new LocalTripleRegistry();
+ break;
default:
registry = new CacheTripleRegistry(store.getPersistence().getCacheManager());
}
[09/15] git commit: small code optimizations
Posted by ja...@apache.org.
small code optimizations
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/73762ddd
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/73762ddd
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/73762ddd
Branch: refs/heads/ldp
Commit: 73762ddd8d2ba24846024fe946caf0d0064e9e95
Parents: babe500
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Mon Mar 31 19:11:39 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Mon Mar 31 19:11:39 2014 +0200
----------------------------------------------------------------------
.../org/apache/marmotta/kiwi/sail/KiWiSailConnection.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/73762ddd/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiSailConnection.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiSailConnection.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiSailConnection.java
index 23bc680..3e3dfaf 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiSailConnection.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiSailConnection.java
@@ -148,16 +148,11 @@ public class KiWiSailConnection extends NotifyingSailConnectionBase implements I
contextSet.add(valueFactory.createURI(inferredContext));
}
- KiWiResource ksubj = valueFactory.convert(subj);
- KiWiUriResource kpred = valueFactory.convert(pred);
- KiWiNode kobj = valueFactory.convert(obj);
-
-
Set<KiWiTriple> added = new HashSet<KiWiTriple>();
for(Resource context : contextSet) {
KiWiResource kcontext = valueFactory.convert(context);
- KiWiTriple triple = (KiWiTriple)valueFactory.createStatement(ksubj,kpred,kobj,kcontext, databaseConnection);
+ KiWiTriple triple = (KiWiTriple)valueFactory.createStatement(subj,pred,obj,kcontext, databaseConnection);
triple.setInferred(inferred);
databaseConnection.storeTriple(triple);
[13/15] git commit: MARMOTTA-477 Added Licenses for squebi and in the
libraries bundled in the squebi webjar (kudos to tkurz): - squebi: AL2 -
libraries: MIT - fonts: SIL OFL 1.1
Posted by ja...@apache.org.
MARMOTTA-477 Added Licenses for squebi and in the libraries bundled in the squebi webjar (kudos to tkurz):
- squebi: AL2
- libraries: MIT
- fonts: SIL OFL 1.1
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/7f8f6f27
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/7f8f6f27
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/7f8f6f27
Branch: refs/heads/ldp
Commit: 7f8f6f27792449a7937bc9bc0aad9eb60941861d
Parents: 090273c
Author: Jakob Frank <ja...@apache.org>
Authored: Wed Apr 2 11:33:15 2014 +0200
Committer: Jakob Frank <ja...@apache.org>
Committed: Wed Apr 2 11:35:56 2014 +0200
----------------------------------------------------------------------
.../src/main/resources/installer/LICENSE.txt | 110 +++++++++++++++++--
.../src/main/webapp/META-INF/LICENSE | 95 +++++++++++++++-
2 files changed, 196 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/7f8f6f27/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt
----------------------------------------------------------------------
diff --git a/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt b/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt
index a4b1e74..9027fb4 100644
--- a/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt
+++ b/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt
@@ -227,6 +227,7 @@ The Apache License, Version 2.0, also applies to the following subcomponents:
* Java Property Utility, http://software.dzhuvinov.com/
* XML Commons External Components XML APIs, http://xml.apache.org/commons/components/external/
* Timeknots Webjar, https://github.com/webjars/timeknots
+ * Squebi Webjar, https://github.com/tkurz/squebi
Apache Marmotta subcomponents:
@@ -2406,6 +2407,10 @@ For the angularjs webjar,
Copyright 2014 jQuery Foundation and other contributors
http://jquery.com/
+ the requirejs, requirejs-plugins, jquery, angular, bootstrap, codemirror,
+ fontawsome, angular-ui-codemirror, angular-bootstrap and require-css
+ packaged in the squebi webjar (https://github.com/tkurz/squebi)
+
the MIT License applies:
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -2458,12 +2463,12 @@ For the Sgvizler webjar,
Copyright (c) 2011 Martin G. Skjæveland, http://sgvizler.googlecode.com
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is furnished to do
- so, subject to the following conditions:
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@@ -2473,7 +2478,95 @@ For the Sgvizler webjar,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-
+For the fontawesome desktop and webfont files
+ packaged in the squebi webjar (https://github.com/tkurz/squebi)
+
+ -----------------------------------------------------------
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+ -----------------------------------------------------------
+
+ PREAMBLE
+ The goals of the Open Font License (OFL) are to stimulate worldwide
+ development of collaborative font projects, to support the font creation
+ efforts of academic and linguistic communities, and to provide a free and
+ open framework in which fonts may be shared and improved in partnership
+ with others.
+
+ The OFL allows the licensed fonts to be used, studied, modified and
+ redistributed freely as long as they are not sold by themselves. The
+ fonts, including any derivative works, can be bundled, embedded,
+ redistributed and/or sold with any software provided that any reserved
+ names are not used by derivative works. The fonts and derivatives,
+ however, cannot be released under any other type of license. The
+ requirement for fonts to remain under this license does not apply
+ to any document created using the fonts or their derivatives.
+
+ DEFINITIONS
+ "Font Software" refers to the set of files released by the Copyright
+ Holder(s) under this license and clearly marked as such. This may
+ include source files, build scripts and documentation.
+
+ "Reserved Font Name" refers to any names specified as such after the
+ copyright statement(s).
+
+ "Original Version" refers to the collection of Font Software components as
+ distributed by the Copyright Holder(s).
+
+ "Modified Version" refers to any derivative made by adding to, deleting,
+ or substituting -- in part or in whole -- any of the components of the
+ Original Version, by changing formats or by porting the Font Software to a
+ new environment.
+
+ "Author" refers to any designer, engineer, programmer, technical
+ writer or other person who contributed to the Font Software.
+
+ PERMISSION & CONDITIONS
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
+ redistribute, and sell modified and unmodified copies of the Font
+ Software, subject to the following conditions:
+
+ 1) Neither the Font Software nor any of its individual components,
+ in Original or Modified Versions, may be sold by itself.
+
+ 2) Original or Modified Versions of the Font Software may be bundled,
+ redistributed and/or sold with any software, provided that each copy
+ contains the above copyright notice and this license. These can be
+ included either as stand-alone text files, human-readable headers or
+ in the appropriate machine-readable metadata fields within text or
+ binary files as long as those fields can be easily viewed by the user.
+
+ 3) No Modified Version of the Font Software may use the Reserved Font
+ Name(s) unless explicit written permission is granted by the corresponding
+ Copyright Holder. This restriction only applies to the primary font name as
+ presented to the users.
+
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+ Software shall not be used to promote, endorse or advertise any
+ Modified Version, except to acknowledge the contribution(s) of the
+ Copyright Holder(s) and the Author(s) or with their explicit written
+ permission.
+
+ 5) The Font Software, modified or unmodified, in part or in whole,
+ must be distributed entirely under this license, and must not be
+ distributed under any other license. The requirement for fonts to
+ remain under this license does not apply to any document created
+ using the Font Software.
+
+ TERMINATION
+ This license becomes null and void if any of the above conditions are
+ not met.
+
+ DISCLAIMER
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Apache Marmotta code subcomponents:
===================================
@@ -2534,7 +2627,8 @@ For the ROME component,
For the Javolution component,
- located at commons/marmotta-commons/src/ext/java
+ located at:
+ commons/marmotta-commons/src/ext/java
Javolution - Java(tm) Solution for Real-Time and Embedded Systems
Copyright (c) 2012, Javolution (http://javolution.org/)
http://git-wip-us.apache.org/repos/asf/marmotta/blob/7f8f6f27/launchers/marmotta-webapp/src/main/webapp/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/main/webapp/META-INF/LICENSE b/launchers/marmotta-webapp/src/main/webapp/META-INF/LICENSE
index 7baf7a1..36916e7 100644
--- a/launchers/marmotta-webapp/src/main/webapp/META-INF/LICENSE
+++ b/launchers/marmotta-webapp/src/main/webapp/META-INF/LICENSE
@@ -224,6 +224,7 @@ The Apache License, Version 2.0, also applies to the following subcomponents:
* Java Property Utility, http://software.dzhuvinov.com/
* XML Commons External Components XML APIs, http://xml.apache.org/commons/components/external/
* Timeknots Webjar, https://github.com/webjars/timeknots
+ * Squebi Webjar, https://github.com/tkurz/squebi
Apache Marmotta subcomponents:
@@ -2403,6 +2404,10 @@ For the angularjs webjar,
Copyright 2014 jQuery Foundation and other contributors
http://jquery.com/
+ the requirejs, requirejs-plugins, jquery, angular, bootstrap, codemirror,
+ fontawsome, angular-ui-codemirror, angular-bootstrap and require-css
+ packaged in the squebi webjar (https://github.com/tkurz/squebi)
+
the MIT License applies:
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -2470,7 +2475,95 @@ For the Sgvizler webjar,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-
+For the fontawesome desktop and webfont files
+ packaged in the squebi webjar (https://github.com/tkurz/squebi)
+
+ -----------------------------------------------------------
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+ -----------------------------------------------------------
+
+ PREAMBLE
+ The goals of the Open Font License (OFL) are to stimulate worldwide
+ development of collaborative font projects, to support the font creation
+ efforts of academic and linguistic communities, and to provide a free and
+ open framework in which fonts may be shared and improved in partnership
+ with others.
+
+ The OFL allows the licensed fonts to be used, studied, modified and
+ redistributed freely as long as they are not sold by themselves. The
+ fonts, including any derivative works, can be bundled, embedded,
+ redistributed and/or sold with any software provided that any reserved
+ names are not used by derivative works. The fonts and derivatives,
+ however, cannot be released under any other type of license. The
+ requirement for fonts to remain under this license does not apply
+ to any document created using the fonts or their derivatives.
+
+ DEFINITIONS
+ "Font Software" refers to the set of files released by the Copyright
+ Holder(s) under this license and clearly marked as such. This may
+ include source files, build scripts and documentation.
+
+ "Reserved Font Name" refers to any names specified as such after the
+ copyright statement(s).
+
+ "Original Version" refers to the collection of Font Software components as
+ distributed by the Copyright Holder(s).
+
+ "Modified Version" refers to any derivative made by adding to, deleting,
+ or substituting -- in part or in whole -- any of the components of the
+ Original Version, by changing formats or by porting the Font Software to a
+ new environment.
+
+ "Author" refers to any designer, engineer, programmer, technical
+ writer or other person who contributed to the Font Software.
+
+ PERMISSION & CONDITIONS
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
+ redistribute, and sell modified and unmodified copies of the Font
+ Software, subject to the following conditions:
+
+ 1) Neither the Font Software nor any of its individual components,
+ in Original or Modified Versions, may be sold by itself.
+
+ 2) Original or Modified Versions of the Font Software may be bundled,
+ redistributed and/or sold with any software, provided that each copy
+ contains the above copyright notice and this license. These can be
+ included either as stand-alone text files, human-readable headers or
+ in the appropriate machine-readable metadata fields within text or
+ binary files as long as those fields can be easily viewed by the user.
+
+ 3) No Modified Version of the Font Software may use the Reserved Font
+ Name(s) unless explicit written permission is granted by the corresponding
+ Copyright Holder. This restriction only applies to the primary font name as
+ presented to the users.
+
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+ Software shall not be used to promote, endorse or advertise any
+ Modified Version, except to acknowledge the contribution(s) of the
+ Copyright Holder(s) and the Author(s) or with their explicit written
+ permission.
+
+ 5) The Font Software, modified or unmodified, in part or in whole,
+ must be distributed entirely under this license, and must not be
+ distributed under any other license. The requirement for fonts to
+ remain under this license does not apply to any document created
+ using the Font Software.
+
+ TERMINATION
+ This license becomes null and void if any of the above conditions are
+ not met.
+
+ DISCLAIMER
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Apache Marmotta code subcomponents:
===================================
[03/15] git commit: allow getting the hazelcast backend from the
cache manager
Posted by ja...@apache.org.
allow getting the hazelcast backend from the cache manager
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/4029f472
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/4029f472
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/4029f472
Branch: refs/heads/ldp
Commit: 4029f472f4035c9cb8cb051e20c9eb2c3bfdcd78
Parents: 00ecba5
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Fri Mar 28 15:32:29 2014 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Fri Mar 28 15:32:29 2014 +0100
----------------------------------------------------------------------
.../kiwi/hazelcast/caching/HazelcastCacheManager.java | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/4029f472/libraries/kiwi/kiwi-caching-hazelcast/src/main/java/org/apache/marmotta/kiwi/hazelcast/caching/HazelcastCacheManager.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-caching-hazelcast/src/main/java/org/apache/marmotta/kiwi/hazelcast/caching/HazelcastCacheManager.java b/libraries/kiwi/kiwi-caching-hazelcast/src/main/java/org/apache/marmotta/kiwi/hazelcast/caching/HazelcastCacheManager.java
index fdcce52..b16037c 100644
--- a/libraries/kiwi/kiwi-caching-hazelcast/src/main/java/org/apache/marmotta/kiwi/hazelcast/caching/HazelcastCacheManager.java
+++ b/libraries/kiwi/kiwi-caching-hazelcast/src/main/java/org/apache/marmotta/kiwi/hazelcast/caching/HazelcastCacheManager.java
@@ -273,6 +273,15 @@ public class HazelcastCacheManager implements CacheManager {
return hazelcast.getMap(name);
}
+
+ /**
+ * Return the backend instance for further access to the cluster (in case modules need it)
+ * @return
+ */
+ public HazelcastInstance getBackend() {
+ return hazelcast;
+ }
+
/**
* Clear all caches managed by this cache manager.
*/
[08/15] git commit: simplify KiWiConnection
Posted by ja...@apache.org.
simplify KiWiConnection
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/babe500e
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/babe500e
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/babe500e
Branch: refs/heads/ldp
Commit: babe500e5574a828028c06877f038deaa395c6f4
Parents: 2278b3d
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Mon Mar 31 19:08:34 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Mon Mar 31 19:08:34 2014 +0200
----------------------------------------------------------------------
.../kiwi/loader/generic/KiWiHandler.java | 2 +-
.../kiwi/persistence/KiWiConnection.java | 47 ++++----------------
.../marmotta/kiwi/sail/KiWiValueFactory.java | 6 +--
.../marmotta/kiwi/test/PersistenceTest.java | 38 ++++++++--------
.../test/VersioningPersistenceTest.java | 40 ++++++++---------
.../LDCachingKiWiPersistenceConnection.java | 2 +-
6 files changed, 53 insertions(+), 82 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/babe500e/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
index 7053502..19b7c85 100644
--- a/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
+++ b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
@@ -446,7 +446,7 @@ public class KiWiHandler implements RDFHandler {
protected void storeNode(KiWiNode node) throws SQLException {
- connection.storeNode(node, false);
+ connection.storeNode(node);
nodes++;
}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/babe500e/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
index 31d3d95..727877a 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
@@ -944,16 +944,15 @@ public class KiWiConnection implements AutoCloseable {
*
*
* @param node
- * @param batch
* @throws SQLException
*/
- public synchronized void storeNode(KiWiNode node, boolean batch) throws SQLException {
+ public synchronized void storeNode(KiWiNode node) throws SQLException {
// ensure the data type of a literal is persisted first
if(node instanceof KiWiLiteral) {
KiWiLiteral literal = (KiWiLiteral)node;
if(literal.getType() != null && literal.getType().getId() < 0) {
- storeNode(literal.getType(), batch);
+ storeNode(literal.getType());
}
}
@@ -973,11 +972,7 @@ public class KiWiConnection implements AutoCloseable {
insertNode.setString(2,uriResource.stringValue());
insertNode.setTimestamp(3, new Timestamp(uriResource.getCreated().getTime()));
- if(batch) {
- insertNode.addBatch();
- } else {
- insertNode.executeUpdate();
- }
+ insertNode.executeUpdate();
} else if(node instanceof KiWiAnonResource) {
KiWiAnonResource anonResource = (KiWiAnonResource)node;
@@ -987,11 +982,7 @@ public class KiWiConnection implements AutoCloseable {
insertNode.setString(2,anonResource.stringValue());
insertNode.setTimestamp(3, new Timestamp(anonResource.getCreated().getTime()));
- if(batch) {
- insertNode.addBatch();
- } else {
- insertNode.executeUpdate();
- }
+ insertNode.executeUpdate();
} else if(node instanceof KiWiDateLiteral) {
KiWiDateLiteral dateLiteral = (KiWiDateLiteral)node;
@@ -1005,11 +996,7 @@ public class KiWiConnection implements AutoCloseable {
throw new IllegalStateException("a date literal must have a datatype");
insertNode.setTimestamp(5, new Timestamp(dateLiteral.getCreated().getTime()));
- if(batch) {
- insertNode.addBatch();
- } else {
- insertNode.executeUpdate();
- }
+ insertNode.executeUpdate();
} else if(node instanceof KiWiIntLiteral) {
KiWiIntLiteral intLiteral = (KiWiIntLiteral)node;
@@ -1024,11 +1011,7 @@ public class KiWiConnection implements AutoCloseable {
throw new IllegalStateException("an integer literal must have a datatype");
insertNode.setTimestamp(6, new Timestamp(intLiteral.getCreated().getTime()));
- if(batch) {
- insertNode.addBatch();
- } else {
- insertNode.executeUpdate();
- }
+ insertNode.executeUpdate();
} else if(node instanceof KiWiDoubleLiteral) {
KiWiDoubleLiteral doubleLiteral = (KiWiDoubleLiteral)node;
@@ -1042,11 +1025,7 @@ public class KiWiConnection implements AutoCloseable {
throw new IllegalStateException("a double literal must have a datatype");
insertNode.setTimestamp(5, new Timestamp(doubleLiteral.getCreated().getTime()));
- if(batch) {
- insertNode.addBatch();
- } else {
- insertNode.executeUpdate();
- }
+ insertNode.executeUpdate();
} else if(node instanceof KiWiBooleanLiteral) {
KiWiBooleanLiteral booleanLiteral = (KiWiBooleanLiteral)node;
@@ -1060,11 +1039,7 @@ public class KiWiConnection implements AutoCloseable {
throw new IllegalStateException("a boolean literal must have a datatype");
insertNode.setTimestamp(5, new Timestamp(booleanLiteral.getCreated().getTime()));
- if(batch) {
- insertNode.addBatch();
- } else {
- insertNode.executeUpdate();
- }
+ insertNode.executeUpdate();
} else if(node instanceof KiWiStringLiteral) {
KiWiStringLiteral stringLiteral = (KiWiStringLiteral)node;
@@ -1106,11 +1081,7 @@ public class KiWiConnection implements AutoCloseable {
}
insertNode.setTimestamp(7, new Timestamp(stringLiteral.getCreated().getTime()));
- if(batch) {
- insertNode.addBatch();
- } else {
- insertNode.executeUpdate();
- }
+ insertNode.executeUpdate();
} else {
log.warn("unrecognized node type: {}", node.getClass().getCanonicalName());
}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/babe500e/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
index 74696c5..a7ceaae 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
@@ -128,7 +128,7 @@ public class KiWiValueFactory implements ValueFactory {
if(result == null) {
result = new KiWiUriResource(uri);
- connection.storeNode(result, false);
+ connection.storeNode(result);
}
if(result.getId() < 0) {
@@ -181,7 +181,7 @@ public class KiWiValueFactory implements ValueFactory {
if(result == null) {
result = new KiWiAnonResource(nodeID);
- connection.storeNode(result, false);
+ connection.storeNode(result);
}
if(result.getId() < 0) {
log.error("node ID is null!");
@@ -396,7 +396,7 @@ public class KiWiValueFactory implements ValueFactory {
}
if(result.getId() < 0) {
- connection.storeNode(result, false);
+ connection.storeNode(result);
}
return result;
http://git-wip-us.apache.org/repos/asf/marmotta/blob/babe500e/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/PersistenceTest.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/PersistenceTest.java b/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/PersistenceTest.java
index a3aa52a..bdc82f8 100644
--- a/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/PersistenceTest.java
+++ b/libraries/kiwi/kiwi-triplestore/src/test/java/org/apache/marmotta/kiwi/test/PersistenceTest.java
@@ -104,7 +104,7 @@ public class PersistenceTest {
try {
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiUriResource uri = new KiWiUriResource("http://localhost/"+ RandomStringUtils.randomAlphanumeric(8));
- connection.storeNode(uri, false);
+ connection.storeNode(uri);
// check if it then has a database ID
Assert.assertTrue(uri.getId() >= 0);
@@ -181,7 +181,7 @@ public class PersistenceTest {
try {
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiAnonResource bnode = new KiWiAnonResource(RandomStringUtils.randomAlphanumeric(8));
- connection.storeNode(bnode, false);
+ connection.storeNode(bnode);
// check if it then has a database ID
Assert.assertTrue(bnode.getId() >= 0);
@@ -256,11 +256,11 @@ public class PersistenceTest {
KiWiConnection connection = persistence.getConnection();
try {
KiWiUriResource stype = new KiWiUriResource(Namespaces.NS_XSD+"string");
- connection.storeNode(stype, false);
+ connection.storeNode(stype);
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(8),null,stype);
- connection.storeNode(literal, false);
+ connection.storeNode(literal);
// check if it then has a database ID
Assert.assertTrue(literal.getId() >= 0);
@@ -335,11 +335,11 @@ public class PersistenceTest {
KiWiConnection connection = persistence.getConnection();
try {
KiWiUriResource stype = new KiWiUriResource(getRDFLangStringType());
- connection.storeNode(stype, false);
+ connection.storeNode(stype);
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(8), Locale.ENGLISH, stype);
- connection.storeNode(literal, false);
+ connection.storeNode(literal);
// check if it then has a database ID
Assert.assertTrue(literal.getId() >= 0);
@@ -417,7 +417,7 @@ public class PersistenceTest {
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(8), null, uri);
- connection.storeNode(literal, false);
+ connection.storeNode(literal);
// check if it then has a database ID
Assert.assertTrue(literal.getId() >= 0);
@@ -499,7 +499,7 @@ public class PersistenceTest {
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(16384), null, uri);
- connection.storeNode(literal, false);
+ connection.storeNode(literal);
// check if it then has a database ID
Assert.assertTrue(literal.getId() >= 0);
@@ -586,7 +586,7 @@ public class PersistenceTest {
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiIntLiteral literal = new KiWiIntLiteral(value, uri);
- connection.storeNode(literal, false);
+ connection.storeNode(literal);
// check if it then has a database ID
Assert.assertTrue(literal.getId() >= 0);
@@ -691,7 +691,7 @@ public class PersistenceTest {
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiDoubleLiteral literal = new KiWiDoubleLiteral(value, uri);
- connection.storeNode(literal, false);
+ connection.storeNode(literal);
// check if it then has a database ID
Assert.assertTrue(literal.getId() >= 0);
@@ -795,7 +795,7 @@ public class PersistenceTest {
boolean value = rnd.nextBoolean();
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiBooleanLiteral literal = new KiWiBooleanLiteral(value, uri);
- connection.storeNode(literal, false);
+ connection.storeNode(literal);
// check if it then has a database ID
Assert.assertTrue(literal.getId() >= 0);
@@ -898,7 +898,7 @@ public class PersistenceTest {
Date value = new Date();
// add a new URI to the triple store and check if it exists afterwards, before and after commit
KiWiDateLiteral literal = new KiWiDateLiteral(value, uri);
- connection.storeNode(literal, false);
+ connection.storeNode(literal);
// check if it then has a database ID
Assert.assertTrue(literal.getId() >= 0);
@@ -1003,13 +1003,13 @@ public class PersistenceTest {
KiWiStringLiteral object_2 = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(32),null,stype);
KiWiUriResource context = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));
- connection.storeNode(stype, false);
- connection.storeNode(subject, false);
- connection.storeNode(pred_1, false);
- connection.storeNode(pred_2, false);
- connection.storeNode(object_1, false);
- connection.storeNode(object_2, false);
- connection.storeNode(context, false);
+ connection.storeNode(stype);
+ connection.storeNode(subject);
+ connection.storeNode(pred_1);
+ connection.storeNode(pred_2);
+ connection.storeNode(object_1);
+ connection.storeNode(object_2);
+ connection.storeNode(context);
KiWiTriple triple1 = new KiWiTriple(subject,pred_1,object_1,context);
KiWiTriple triple2 = new KiWiTriple(subject,pred_2,object_2,context);
http://git-wip-us.apache.org/repos/asf/marmotta/blob/babe500e/libraries/kiwi/kiwi-versioning/src/test/java/org/apache/marmotta/kiwi/versioning/test/VersioningPersistenceTest.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/test/java/org/apache/marmotta/kiwi/versioning/test/VersioningPersistenceTest.java b/libraries/kiwi/kiwi-versioning/src/test/java/org/apache/marmotta/kiwi/versioning/test/VersioningPersistenceTest.java
index 08561bb..1123899 100644
--- a/libraries/kiwi/kiwi-versioning/src/test/java/org/apache/marmotta/kiwi/versioning/test/VersioningPersistenceTest.java
+++ b/libraries/kiwi/kiwi-versioning/src/test/java/org/apache/marmotta/kiwi/versioning/test/VersioningPersistenceTest.java
@@ -107,13 +107,13 @@ public class VersioningPersistenceTest {
KiWiStringLiteral object_2 = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(32));
KiWiUriResource context = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));
- connection.storeNode(subject1, false);
- connection.storeNode(subject2, false);
- connection.storeNode(pred_1, false);
- connection.storeNode(pred_2, false);
- connection.storeNode(object_1, false);
- connection.storeNode(object_2, false);
- connection.storeNode(context, false);
+ connection.storeNode(subject1);
+ connection.storeNode(subject2);
+ connection.storeNode(pred_1);
+ connection.storeNode(pred_2);
+ connection.storeNode(object_1);
+ connection.storeNode(object_2);
+ connection.storeNode(context);
KiWiTriple triple1 = new KiWiTriple(subject1,pred_1,object_1,context);
KiWiTriple triple2 = new KiWiTriple(subject2,pred_2,object_2,context);
@@ -180,12 +180,12 @@ public class VersioningPersistenceTest {
KiWiStringLiteral object_2 = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(32));
KiWiUriResource context = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));
- connection.storeNode(subject, false);
- connection.storeNode(pred_1, false);
- connection.storeNode(pred_2, false);
- connection.storeNode(object_1, false);
- connection.storeNode(object_2, false);
- connection.storeNode(context, false);
+ connection.storeNode(subject);
+ connection.storeNode(pred_1);
+ connection.storeNode(pred_2);
+ connection.storeNode(object_1);
+ connection.storeNode(object_2);
+ connection.storeNode(context);
KiWiTriple triple1 = new KiWiTriple(subject,pred_1,object_1,context);
KiWiTriple triple2 = new KiWiTriple(subject,pred_2,object_2,context);
@@ -279,13 +279,13 @@ public class VersioningPersistenceTest {
KiWiStringLiteral object_2 = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(32));
KiWiUriResource context = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));
- connection.storeNode(subject1, false);
- connection.storeNode(subject2, false);
- connection.storeNode(pred_1, false);
- connection.storeNode(pred_2, false);
- connection.storeNode(object_1, false);
- connection.storeNode(object_2, false);
- connection.storeNode(context, false);
+ connection.storeNode(subject1);
+ connection.storeNode(subject2);
+ connection.storeNode(pred_1);
+ connection.storeNode(pred_2);
+ connection.storeNode(object_1);
+ connection.storeNode(object_2);
+ connection.storeNode(context);
KiWiTriple triple1 = new KiWiTriple(subject1,pred_1,object_1,context);
KiWiTriple triple2 = new KiWiTriple(subject2,pred_2,object_2,context);
http://git-wip-us.apache.org/repos/asf/marmotta/blob/babe500e/libraries/ldcache/ldcache-backend-kiwi/src/main/java/org/apache/marmotta/ldcache/backend/kiwi/persistence/LDCachingKiWiPersistenceConnection.java
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/java/org/apache/marmotta/ldcache/backend/kiwi/persistence/LDCachingKiWiPersistenceConnection.java b/libraries/ldcache/ldcache-backend-kiwi/src/main/java/org/apache/marmotta/ldcache/backend/kiwi/persistence/LDCachingKiWiPersistenceConnection.java
index f2d9b47..8f0d592 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/java/org/apache/marmotta/ldcache/backend/kiwi/persistence/LDCachingKiWiPersistenceConnection.java
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/java/org/apache/marmotta/ldcache/backend/kiwi/persistence/LDCachingKiWiPersistenceConnection.java
@@ -336,7 +336,7 @@ public class LDCachingKiWiPersistenceConnection implements Closeable {
* @throws java.sql.SQLException
*/
public void storeNode(KiWiNode node) throws SQLException {
- connection.storeNode(node, false);
+ connection.storeNode(node);
}
/**
[11/15] git commit: extended JettyMarmotta with configuration
overrides
Posted by ja...@apache.org.
extended JettyMarmotta with configuration overrides
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/3eb12a69
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/3eb12a69
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/3eb12a69
Branch: refs/heads/ldp
Commit: 3eb12a69198c4362cf4ac5d43c4b7fdda465af47
Parents: 2c7a331
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Apr 1 11:31:30 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Apr 1 11:31:30 2014 +0200
----------------------------------------------------------------------
.../platform/core/test/base/JettyMarmotta.java | 21 ++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/3eb12a69/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/JettyMarmotta.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/JettyMarmotta.java b/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/JettyMarmotta.java
index 8b43be2..306172b 100644
--- a/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/JettyMarmotta.java
+++ b/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/JettyMarmotta.java
@@ -17,6 +17,8 @@
*/
package org.apache.marmotta.platform.core.test.base;
+import org.apache.commons.configuration.CompositeConfiguration;
+import org.apache.commons.configuration.Configuration;
import org.apache.marmotta.platform.core.services.jaxrs.ExceptionMapperServiceImpl;
import org.apache.marmotta.platform.core.services.jaxrs.InterceptorServiceImpl;
import org.apache.marmotta.platform.core.servlet.MarmottaResourceFilter;
@@ -78,16 +80,31 @@ public class JettyMarmotta extends AbstractMarmotta {
public JettyMarmotta(String context, int port, Class<?>... webservices) {
this(context,port, new HashSet<Class<?>>(Arrays.asList(webservices)));
}
-
+
+ public JettyMarmotta(Configuration override, String context, Set<Class<?>> webservices) {
+ this(override, context, getRandomPort(), webservices);
+ }
+
+
public JettyMarmotta(String context, Set<Class<?>> webservices) {
this(context, getRandomPort(), webservices);
}
public JettyMarmotta(String context, int port, Set<Class<?>> webservices) {
+ this(null,context,port,webservices);
+ }
+
+ public JettyMarmotta(Configuration override, String context, int port, Set<Class<?>> webservices) {
super();
this.port = port;
this.context = (context != null ? context : "/");
+
+ List<Configuration> configurations = new ArrayList<>();
+ if(override != null) {
+ configurations.add(override);
+ }
+ configurations.add(this.override);
// create a new jetty & run it on port 8080
jetty = new Server(this.port);
@@ -98,7 +115,7 @@ public class JettyMarmotta extends AbstractMarmotta {
ServletContextHandler ctx = new ServletContextHandler(jetty, this.context);
// now we have a context, start up the first phase of the LMF initialisation
- startupService.startupConfiguration(home.getAbsolutePath(), override, ctx.getServletContext());
+ startupService.startupConfiguration(home.getAbsolutePath(), new CompositeConfiguration(configurations), ctx.getServletContext());
// register the RestEasy CDI injector factory
ctx.setAttribute("resteasy.injector.factory", TestInjectorFactory.class.getCanonicalName());
[10/15] git commit: minor changes in commit behaviour for nodes
Posted by ja...@apache.org.
minor changes in commit behaviour for nodes
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/2c7a3310
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/2c7a3310
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/2c7a3310
Branch: refs/heads/ldp
Commit: 2c7a3310d708087c6de92c54a8234cf67538c2f4
Parents: 73762dd
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Apr 1 09:44:34 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Apr 1 09:44:34 2014 +0200
----------------------------------------------------------------------
.../java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/2c7a3310/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
index a7ceaae..3da6b66 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
@@ -84,7 +84,9 @@ public class KiWiValueFactory implements ValueFactory {
protected KiWiConnection aqcuireConnection() {
try {
- return store.getPersistence().getConnection();
+ KiWiConnection connection = store.getPersistence().getConnection();
+ connection.setAutoCommit(true);
+ return connection;
} catch(SQLException ex) {
log.error("could not acquire database connection", ex);
throw new RuntimeException(ex);
@@ -93,7 +95,6 @@ public class KiWiValueFactory implements ValueFactory {
protected void releaseConnection(KiWiConnection con) {
try {
- con.getJDBCConnection().commit();
con.close();
} catch (SQLException ex) {
log.error("could not release database connection", ex);
[06/15] git commit: some logging on which registry is used
Posted by ja...@apache.org.
some logging on which registry is used
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/e30cd53f
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/e30cd53f
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/e30cd53f
Branch: refs/heads/ldp
Commit: e30cd53f7ed4748ea387f38798a2e8d3a1e615fe
Parents: f2f50f6
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Mon Mar 31 14:30:23 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Mon Mar 31 14:30:23 2014 +0200
----------------------------------------------------------------------
.../java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/e30cd53f/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
index 2502ea1..74696c5 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/sail/KiWiValueFactory.java
@@ -62,16 +62,20 @@ public class KiWiValueFactory implements ValueFactory {
switch (store.getPersistence().getConfiguration().getRegistryStrategy()) {
case DATABASE:
+ log.info("KiWi Value Factory: database registry");
registry = new DBTripleRegistry(store);
break;
case CACHE:
+ log.info("KiWi Value Factory: cache registry");
registry = new CacheTripleRegistry(store.getPersistence().getCacheManager());
break;
case LOCAL:
+ log.info("KiWi Value Factory: in-memory registry");
registry = new LocalTripleRegistry();
break;
default:
- registry = new CacheTripleRegistry(store.getPersistence().getCacheManager());
+ log.info("KiWi Value Factory: in-memory registry");
+ registry = new LocalTripleRegistry();
}
this.store = store;
[04/15] git commit: Merge remote-tracking branch 'origin/develop'
into develop
Posted by ja...@apache.org.
Merge remote-tracking branch 'origin/develop' into develop
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/ae528c29
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/ae528c29
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/ae528c29
Branch: refs/heads/ldp
Commit: ae528c29d8417085eca114db52d6aebe10945f4b
Parents: 4029f47 29c8849
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Fri Mar 28 15:32:46 2014 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Fri Mar 28 15:32:46 2014 +0100
----------------------------------------------------------------------
.../src/test/java/services/MyServiceTest.java | 2 +-
.../test/java/webservices/MyWebServiceTest.java | 17 +-
.../marmotta-archetype-webapp/pom.xml | 16 +
.../main/resources/archetype-resources/pom.xml | 13 +-
.../src/test/resources/projects/basic/goal.txt | 2 +-
.../src/main/resources/META-INF/NOTICE | 2 +-
.../src/main/resources/installer/LICENSE.txt | 232 ++++----
.../src/main/webapp/META-INF/LICENSE | 536 ++++++-------------
.../src/main/webapp/META-INF/NOTICE | 2 +-
.../test/freebase/TestFreebaseProvider.java | 2 +
.../src/main/doc/LICENSE.txt | 157 ++++--
.../src/main/resources/META-INF/LICENSE | 356 ------------
.../src/main/resources/META-INF/NOTICE | 13 -
.../src/main/resources/META-INF/NOTICE | 11 -
.../src/main/resources/META-INF/LICENSE | 296 ----------
.../src/main/resources/META-INF/NOTICE | 11 -
.../src/main/resources/kiwi-module.properties | 4 +-
17 files changed, 460 insertions(+), 1212 deletions(-)
----------------------------------------------------------------------
[12/15] git commit: more flexibility for backend testing
Posted by ja...@apache.org.
more flexibility for backend testing
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/090273c6
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/090273c6
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/090273c6
Branch: refs/heads/ldp
Commit: 090273c671a33cee3039139b19d99a7c2cac4e64
Parents: 3eb12a6
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Apr 1 15:46:31 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Apr 1 15:46:31 2014 +0200
----------------------------------------------------------------------
.../core/qualifiers/inject/Fallback.java | 36 ++++++++++++++++++++
.../services/logging/LoggingServiceImpl.java | 21 ++++++------
.../services/triplestore/SesameServiceImpl.java | 33 ++++++++++++------
.../core/test/base/TestStoreProvider.java | 2 ++
4 files changed, 71 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/090273c6/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/qualifiers/inject/Fallback.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/qualifiers/inject/Fallback.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/qualifiers/inject/Fallback.java
new file mode 100644
index 0000000..3cf6fc6
--- /dev/null
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/qualifiers/inject/Fallback.java
@@ -0,0 +1,36 @@
+/*
+ * 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.marmotta.platform.core.qualifiers.inject;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Add file description here!
+ *
+ * @author Sebastian Schaffert (sschaffert@apache.org)
+ */
+@Target({ TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Inherited
+public @interface Fallback {
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/090273c6/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/logging/LoggingServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/logging/LoggingServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/logging/LoggingServiceImpl.java
index f604ec2..dc53656 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/logging/LoggingServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/logging/LoggingServiceImpl.java
@@ -56,12 +56,7 @@ import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Inject;
import java.io.File;
import java.text.Collator;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
@@ -148,16 +143,20 @@ public class LoggingServiceImpl implements LoggingService {
}
public void startEventHandler(@Observes LoggingStartEvent event) {
- log.warn("LOGGING: Switching to Apache Marmotta logging configuration; further output will be found in {}{}log{}*.log", configurationService.getHome(), File.separator, File.separator);
+ if(!configurationService.getBooleanConfiguration("testing.enabled")) {
+ log.warn("LOGGING: Switching to Apache Marmotta logging configuration; further output will be found in {}{}log{}*.log", configurationService.getHome(), File.separator, File.separator);
- configureLoggers();
+ configureLoggers();
+ }
}
public void configurationEventHandler(@Observes ConfigurationChangedEvent event) {
- if(event.containsChangedKeyWithPrefix("logging.")) {
- log.warn("LOGGING: Reloading logging configuration");
+ if(!configurationService.getBooleanConfiguration("testing.enabled")) {
+ if (event.containsChangedKeyWithPrefix("logging.")) {
+ log.warn("LOGGING: Reloading logging configuration");
- configureLoggers();
+ configureLoggers();
+ }
}
}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/090273c6/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java
index 9b243d6..52e42c0 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/triplestore/SesameServiceImpl.java
@@ -18,7 +18,6 @@
package org.apache.marmotta.platform.core.services.triplestore;
import edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock;
-
import org.apache.marmotta.commons.sesame.transactions.api.TransactionListener;
import org.apache.marmotta.commons.sesame.transactions.api.TransactionalSail;
import org.apache.marmotta.commons.sesame.transactions.model.TransactionData;
@@ -28,6 +27,7 @@ import org.apache.marmotta.platform.core.api.triplestore.*;
import org.apache.marmotta.platform.core.qualifiers.event.transaction.AfterCommit;
import org.apache.marmotta.platform.core.qualifiers.event.transaction.AfterRollback;
import org.apache.marmotta.platform.core.qualifiers.event.transaction.BeforeCommit;
+import org.apache.marmotta.platform.core.qualifiers.inject.Fallback;
import org.apache.marmotta.platform.core.util.CDIContext;
import org.openrdf.model.ValueFactory;
import org.openrdf.repository.RepositoryConnection;
@@ -44,6 +44,7 @@ import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.UnsatisfiedResolutionException;
import javax.inject.Inject;
import java.util.Iterator;
@@ -139,20 +140,32 @@ public class SesameServiceImpl implements SesameService {
log.warn("RDF repository has already been initialized");
}
+ if(storeProviders.isUnsatisfied()) {
+ log.error("no storage backend found in classpath; please add one of the marmotta-backend-XXX modules");
+ throw new UnsatisfiedResolutionException("no storage backend found in classpath; please add one of the marmotta-backend-XXX modules");
+ }
+
if(storeProviders.isAmbiguous()) {
- log.error("more than one storage backend in classpath; please only select one storage backend");
+ log.warn("more than one storage backend in classpath, trying to select the most appropriate ...");
+ StoreProvider candidate = null;
+
Iterator<StoreProvider> it = storeProviders.iterator();
while (it.hasNext()) {
- log.error(" - {}", it.next().getName());
+ StoreProvider next = it.next();
+
+ log.warn("- candidate: {} (annotations: {})", next.getName(), next.getClass().getAnnotations());
+
+ if(candidate == null || !next.getClass().isAnnotationPresent(Fallback.class)) {
+ candidate = next;
+ }
}
- return;
- }
- if(storeProviders.isUnsatisfied()) {
- log.error("no storage backend found in classpath; please add one of the marmotta-backend-XXX modules");
- return;
- }
- store = storeProviders.get().createStore();
+ log.warn("selected storage backend: {}", candidate.getName());
+
+ store = candidate.createStore();
+ } else {
+ store = storeProviders.get().createStore();
+ }
NotifyingSail notifyingSail;
http://git-wip-us.apache.org/repos/asf/marmotta/blob/090273c6/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/TestStoreProvider.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/TestStoreProvider.java b/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/TestStoreProvider.java
index c12684b..5c96803 100644
--- a/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/TestStoreProvider.java
+++ b/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/TestStoreProvider.java
@@ -18,6 +18,7 @@
package org.apache.marmotta.platform.core.test.base;
import org.apache.marmotta.platform.core.api.triplestore.StoreProvider;
+import org.apache.marmotta.platform.core.qualifiers.inject.Fallback;
import org.openrdf.repository.sail.SailRepository;
import org.openrdf.sail.NotifyingSail;
import org.openrdf.sail.Sail;
@@ -34,6 +35,7 @@ import javax.enterprise.inject.Alternative;
* @author Sebastian Schaffert (sschaffert@apache.org)
*/
@Alternative
+@Fallback
@ApplicationScoped
public class TestStoreProvider implements StoreProvider {
[15/15] git commit: Merge branch 'ldp' into develop
Posted by ja...@apache.org.
Merge branch 'ldp' into develop
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/e1f88ee4
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/e1f88ee4
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/e1f88ee4
Branch: refs/heads/ldp
Commit: e1f88ee416a90c7bc5059e753f06f6dc205c9a57
Parents: 7f8f6f2 efec6fd
Author: Jakob Frank <ja...@apache.org>
Authored: Fri Apr 4 10:41:44 2014 +0200
Committer: Jakob Frank <ja...@apache.org>
Committed: Fri Apr 4 10:41:44 2014 +0200
----------------------------------------------------------------------
LICENSE.txt | 82 +
commons/marmotta-commons/pom.xml | 11 +
.../apache/marmotta/commons/util/HashUtils.java | 8 +-
.../marmotta/commons/vocabulary/DCTERMS.java | 618 --
.../marmotta/commons/vocabulary/FOAF.java | 486 --
.../apache/marmotta/commons/vocabulary/GEO.java | 86 -
.../apache/marmotta/commons/vocabulary/MA.java | 567 --
.../marmotta/commons/vocabulary/SCHEMA.java | 5809 ------------------
.../marmotta/commons/vocabulary/SIOC.java | 582 --
.../marmotta/commons/vocabulary/SKOS.java | 228 -
.../marmotta/commons/vocabulary/SPARQL_SD.java | 361 --
.../apache/marmotta/commons/vocabulary/XSD.java | 324 -
.../marmotta-model-vocabs/pom.xml | 54 +
.../marmotta/commons/vocabulary/DCTERMS.java | 618 ++
.../marmotta/commons/vocabulary/FOAF.java | 486 ++
.../apache/marmotta/commons/vocabulary/GEO.java | 86 +
.../apache/marmotta/commons/vocabulary/LDP.java | 72 +
.../apache/marmotta/commons/vocabulary/MA.java | 567 ++
.../marmotta/commons/vocabulary/SCHEMA.java | 5809 ++++++++++++++++++
.../marmotta/commons/vocabulary/SIOC.java | 582 ++
.../marmotta/commons/vocabulary/SKOS.java | 228 +
.../marmotta/commons/vocabulary/SPARQL_SD.java | 361 ++
.../apache/marmotta/commons/vocabulary/XSD.java | 324 +
.../marmotta-sesame-matchers/pom.xml | 73 +
.../commons/sesame/test/SesameMatchers.java | 184 +
.../AbstractRepositoryConnectionMatcher.java | 43 +
.../sesame/test/base/RdfStringMatcher.java | 88 +
.../sesame/test/base/RepositoryMatcher.java | 74 +
.../commons/sesame/test/base/SesameMatcher.java | 28 +
.../test/connection/HasStatementMatcher.java | 64 +
.../sesame/test/sparql/SparqlAskMatcher.java | 58 +
.../test/sparql/SparqlGraphQueryMatcher.java | 78 +
.../sesame/test/sparql/SparqlMatcher.java | 55 +
.../test/sparql/SparqlTupleQueryMatcher.java | 65 +
.../marmotta-util-facading/pom.xml | 4 +
.../marmotta-util-rdfpatch/pom.xml | 152 +
.../patch/InvalidPatchDocumentException.java | 41 +
.../marmotta/platform/ldp/patch/RdfPatchIO.java | 166 +
.../platform/ldp/patch/RdfPatchUtil.java | 295 +
.../platform/ldp/patch/model/PatchLine.java | 87 +
.../ldp/patch/model/WildcardStatement.java | 108 +
.../ldp/patch/parser/RdfPatchParser.java | 52 +
.../src/main/javacc/rdf-patch.jj | 221 +
.../platform/ldp/patch/RdfPatchIOTest.java | 61 +
.../platform/ldp/patch/RdfPatchUtilTest.java | 158 +
.../patch/parser/RdfPatchParserImplTest.java | 100 +
.../src/test/resources/illustrative.in.ttl | 28 +
.../src/test/resources/illustrative.rdfp | 25 +
.../src/test/resources/rdf-patch.rdfp | 98 +
commons/marmotta-sesame-tools/pom.xml | 3 +
launchers/marmotta-installer/pom.xml | 1 -
launchers/marmotta-webapp/pom.xml | 11 +
parent/pom.xml | 21 +
platform/marmotta-core/pom.xml | 11 +-
.../core/api/triplestore/LdpService.java | 86 -
.../services/triplestore/LdpServiceImpl.java | 357 --
.../webservices/triplestore/LdpWebService.java | 144 -
.../src/main/resources/kiwi-module.properties | 3 +-
.../core/test/base/AbstractMarmotta.java | 2 +-
.../platform/core/test/base/JettyMarmotta.java | 83 +-
platform/marmotta-ldp/pom.xml | 295 +
.../platform/ldp/api/LdpBinaryStoreService.java | 47 +
.../marmotta/platform/ldp/api/LdpService.java | 205 +
.../InvalidInteractionModelException.java | 48 +
.../InvalidModificationException.java | 45 +
.../platform/ldp/logging/LdpLoggingModule.java | 52 +
.../ldp/services/LdpBinaryStoreServiceImpl.java | 148 +
.../platform/ldp/services/LdpServiceImpl.java | 508 ++
.../platform/ldp/util/EntityTagUtils.java | 53 +
.../marmotta/platform/ldp/util/LdpUtils.java | 134 +
.../platform/ldp/webservices/LdpWebService.java | 578 ++
.../platform/ldp/webservices/PATCH.java | 36 +
.../src/main/resources/META-INF/beans.xml | 28 +
.../main/resources/config-defaults.properties | 21 +
.../resources/config-descriptions.properties | 22 +
.../src/main/resources/kiwi-module.properties | 37 +
.../src/main/resources/web/admin/about.html | 60 +
.../main/resources/web/admin/configuration.html | 54 +
.../src/main/resources/web/admin/img/ldp.png | Bin 0 -> 614 bytes
.../src/main/resources/web/admin/style.css | 22 +
.../platform/ldp/testsuite/LdpManifestTest.java | 73 +
.../platform/ldp/testsuite/LdpTestCase.java | 185 +
.../ldp/testsuite/LdpTestCaseRunner.java | 61 +
.../platform/ldp/testsuite/LdpTestCases.java | 87 +
.../ldp/testsuite/LdpTestCasesRunner.java | 101 +
.../ldp/testsuite/LdpTestCasesUtils.java | 130 +
.../ldp/webservices/LdpWebServiceTest.java | 317 +
.../ldp/webservices/util/HeaderMatchers.java | 94 +
.../marmotta-ldp/src/test/resources/test.png | Bin 0 -> 5063 bytes
.../marmotta-ldp/src/test/resources/test.ttl | 25 +
.../resources/testsuite/namespaces.properties | 26 +
platform/marmotta-sparql/pom.xml | 10 -
platform/pom.xml | 9 +
93 files changed, 15272 insertions(+), 9716 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/e1f88ee4/parent/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/e1f88ee4/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/base/JettyMarmotta.java
----------------------------------------------------------------------
[14/15] git commit: removed some weird build-configuration
Posted by ja...@apache.org.
removed some weird build-configuration
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/efec6fde
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/efec6fde
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/efec6fde
Branch: refs/heads/ldp
Commit: efec6fde096de65f32cbc7679bec9c36fa6065d0
Parents: cf8effb
Author: Jakob Frank <ja...@apache.org>
Authored: Fri Apr 4 10:39:31 2014 +0200
Committer: Jakob Frank <ja...@apache.org>
Committed: Fri Apr 4 10:39:31 2014 +0200
----------------------------------------------------------------------
platform/marmotta-ldp/pom.xml | 10 ----------
platform/marmotta-sparql/pom.xml | 10 ----------
2 files changed, 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/efec6fde/platform/marmotta-ldp/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-ldp/pom.xml b/platform/marmotta-ldp/pom.xml
index 64fa0da..247e693 100644
--- a/platform/marmotta-ldp/pom.xml
+++ b/platform/marmotta-ldp/pom.xml
@@ -35,16 +35,6 @@
</description>
<build>
-
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- <resource>
- <directory>src/test/resources</directory>
- </resource>
- </resources>
-
<pluginManagement>
<plugins>
<plugin> <!-- generate JRebel Configuration -->
http://git-wip-us.apache.org/repos/asf/marmotta/blob/efec6fde/platform/marmotta-sparql/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/pom.xml b/platform/marmotta-sparql/pom.xml
index 2101de5..112026e 100644
--- a/platform/marmotta-sparql/pom.xml
+++ b/platform/marmotta-sparql/pom.xml
@@ -35,16 +35,6 @@
</description>
<build>
-
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- <resource>
- <directory>src/test/resources</directory>
- </resource>
- </resources>
-
<pluginManagement>
<plugins>
<plugin> <!-- generate JRebel Configuration -->
[05/15] git commit: update site plugin to 3.3 to allow parallel builds
Posted by ja...@apache.org.
update site plugin to 3.3 to allow parallel builds
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/f2f50f69
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/f2f50f69
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/f2f50f69
Branch: refs/heads/ldp
Commit: f2f50f6978d8d62737c151ce23fd98dbcee10b6f
Parents: ae528c2
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Fri Mar 28 16:16:41 2014 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Fri Mar 28 16:16:41 2014 +0100
----------------------------------------------------------------------
parent/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/f2f50f69/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index cb933ca..a2992ed 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -132,7 +132,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>3.2</version>
+ <version>3.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
[07/15] git commit: performance improvements for date literals
Posted by ja...@apache.org.
performance improvements for date literals
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/2278b3de
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/2278b3de
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/2278b3de
Branch: refs/heads/ldp
Commit: 2278b3de48d71c2ca9261f27e11000e0a74eacb8
Parents: e30cd53
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Mon Mar 31 17:06:23 2014 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Mon Mar 31 17:06:23 2014 +0200
----------------------------------------------------------------------
.../org/apache/marmotta/commons/util/DateUtils.java | 13 +++++++++++--
.../kiwi/persistence/pgsql/create_base_tables.sql | 1 +
2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/2278b3de/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/util/DateUtils.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/util/DateUtils.java b/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/util/DateUtils.java
index 044cdb5..98dc942 100644
--- a/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/util/DateUtils.java
+++ b/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/util/DateUtils.java
@@ -20,7 +20,6 @@ package org.apache.marmotta.commons.util;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-
import java.text.DateFormat;
import java.text.DateFormatSymbols;
import java.text.ParseException;
@@ -47,6 +46,9 @@ public class DateUtils {
public static final SimpleDateFormat GMTFORMAT = createDateFormat("EEE, dd MMM yyyy HH:mm:ss z", "GMT");
+
+ private static DatatypeFactory datatypeFactory;
+
/**
* Some parsers will have the date as a ISO-8601 string
* already, and will set that into the Metadata object.
@@ -93,6 +95,13 @@ public class DateUtils {
}
+ private static DatatypeFactory getDatatypeFactory() throws DatatypeConfigurationException {
+ if(datatypeFactory == null) {
+ datatypeFactory = DatatypeFactory.newInstance();
+ }
+ return datatypeFactory;
+ }
+
/**
* Parses the given date string. This method is synchronized to prevent
* concurrent access to the thread-unsafe date formats.
@@ -146,7 +155,7 @@ public class DateUtils {
c.setTimeZone(TimeZone.getTimeZone("UTC"));
c.setTime(date);
try {
- return DatatypeFactory.newInstance().newXMLGregorianCalendar(c).normalize();
+ return getDatatypeFactory().newXMLGregorianCalendar(c).normalize();
} catch (DatatypeConfigurationException e) {
return null;
}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/2278b3de/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql
index c4d9d14..1936a6b 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql
@@ -74,6 +74,7 @@ CREATE INDEX idx_reg_tx ON registry(txId);
CREATE INDEX idx_node_content ON nodes USING hash(svalue);
CREATE INDEX idx_node_dcontent ON nodes(dvalue) WHERE dvalue IS NOT NULL;
CREATE INDEX idx_node_icontent ON nodes(ivalue) WHERE ivalue IS NOT NULL;
+CREATE INDEX idx_node_tcontent ON nodes(tvalue) WHERE tvalue IS NOT NULL;
CREATE INDEX idx_literal_lang ON nodes(lang);
CREATE INDEX idx_triples_p ON triples(predicate) WHERE deleted = false;
[02/15] git commit: local triple registry as default
Posted by ja...@apache.org.
local triple registry as default
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/00ecba56
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/00ecba56
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/00ecba56
Branch: refs/heads/ldp
Commit: 00ecba56c40d640ba7ef87091a3d234d375b514e
Parents: 471edcb
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Fri Mar 28 15:30:34 2014 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Fri Mar 28 15:30:34 2014 +0100
----------------------------------------------------------------------
.../java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/00ecba56/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
index 0e1ce3f..6da8f7b 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
@@ -112,7 +112,7 @@ public class KiWiConfiguration {
private int datacenterId = 0;
- private RegistryStrategy registryStrategy = RegistryStrategy.CACHE;
+ private RegistryStrategy registryStrategy = RegistryStrategy.LOCAL;
private CacheMode cacheMode = CacheMode.REPLICATED;