You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/05/03 13:17:33 UTC
[1/2] git commit: sparql bug fix
Updated Branches:
refs/heads/develop ac1b54bd7 -> 9432e3117
sparql bug fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/2f3dabb0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/2f3dabb0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/2f3dabb0
Branch: refs/heads/develop
Commit: 2f3dabb064fa4f6876e67b2004bb9f8b5c7cca6c
Parents: 2129626
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Fri May 3 13:17:16 2013 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Fri May 3 13:17:16 2013 +0200
----------------------------------------------------------------------
.../sparql/persistence/KiWiSparqlConnection.java | 2 +-
.../marmotta/kiwi/persistence/KiWiConnection.java | 66 +++++++-------
.../marmotta/kiwi/sail/KiWiSailConnection.java | 3 +
.../src/main/resources/ehcache-kiwi.xml | 6 +-
libraries/kiwi/pom.xml | 13 ---
5 files changed, 40 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2f3dabb0/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/persistence/KiWiSparqlConnection.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/persistence/KiWiSparqlConnection.java b/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/persistence/KiWiSparqlConnection.java
index 0772e4c..b675ddf 100644
--- a/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/persistence/KiWiSparqlConnection.java
+++ b/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/persistence/KiWiSparqlConnection.java
@@ -526,7 +526,7 @@ public class KiWiSparqlConnection {
if(expr instanceof ValueConstant) {
if(((ValueConstant) expr).getValue() instanceof Literal) {
Literal l = (Literal)((ValueConstant) expr).getValue();
- String type = l.getDatatype().stringValue();
+ String type = l.getDatatype() != null ? l.getDatatype().stringValue() : null;
if(StringUtils.equals(Namespaces.NS_XSD + "double", type)
|| StringUtils.equals(Namespaces.NS_XSD + "float", type)
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2f3dabb0/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 f7130d9..19e10bc 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
@@ -547,13 +547,13 @@ public class KiWiConnection {
return (KiWiLiteral)element.getObjectValue();
}
+ requireJDBCConnection();
+
// ltype not persisted
if(ltype != null && ltype.getId() == null) {
return null;
}
- requireJDBCConnection();
-
// otherwise prepare a query, depending on the parameters given
final PreparedStatement query;
if(lang == null && ltype == null) {
@@ -600,20 +600,20 @@ public class KiWiConnection {
* @throws SQLException
*/
public KiWiDateLiteral loadLiteral(Date date) throws SQLException {
- KiWiUriResource ltype = loadUriResource(Namespaces.NS_XSD + "dateTime");
-
- if(ltype == null || ltype.getId() == null) {
- return null;
- }
-
// look in cache
- Element element = literalCache.get(LiteralCommons.createCacheKey(DateUtils.getDateWithoutFraction(date),ltype.stringValue()));
+ Element element = literalCache.get(LiteralCommons.createCacheKey(DateUtils.getDateWithoutFraction(date),Namespaces.NS_XSD + "dateTime"));
if(element != null) {
return (KiWiDateLiteral)element.getObjectValue();
}
requireJDBCConnection();
+ KiWiUriResource ltype = loadUriResource(Namespaces.NS_XSD + "dateTime");
+
+ if(ltype == null || ltype.getId() == null) {
+ return null;
+ }
+
// otherwise prepare a query, depending on the parameters given
PreparedStatement query = getPreparedStatement("load.literal_by_tv");
query.setTimestamp(1, new Timestamp(DateUtils.getDateWithoutFraction(date).getTime()));
@@ -648,21 +648,21 @@ public class KiWiConnection {
* @throws SQLException
*/
public KiWiIntLiteral loadLiteral(long value) throws SQLException {
- KiWiUriResource ltype = loadUriResource(Namespaces.NS_XSD + "integer");
-
- // ltype not persisted
- if(ltype == null || ltype.getId() == null) {
- return null;
- }
-
// look in cache
- Element element = literalCache.get(LiteralCommons.createCacheKey(Long.toString(value),null,ltype.stringValue()));
+ Element element = literalCache.get(LiteralCommons.createCacheKey(Long.toString(value),null,Namespaces.NS_XSD + "integer"));
if(element != null) {
return (KiWiIntLiteral)element.getObjectValue();
}
requireJDBCConnection();
+ KiWiUriResource ltype = loadUriResource(Namespaces.NS_XSD + "integer");
+
+ // ltype not persisted
+ if(ltype == null || ltype.getId() == null) {
+ return null;
+ }
+
// otherwise prepare a query, depending on the parameters given
PreparedStatement query = getPreparedStatement("load.literal_by_iv");
query.setLong(1,value);
@@ -696,21 +696,21 @@ public class KiWiConnection {
* @throws SQLException
*/
public KiWiDoubleLiteral loadLiteral(double value) throws SQLException {
- KiWiUriResource ltype = loadUriResource(Namespaces.NS_XSD + "double");
-
- // ltype not persisted
- if(ltype == null || ltype.getId() == null) {
- return null;
- }
-
// look in cache
- Element element = literalCache.get(LiteralCommons.createCacheKey(Double.toString(value),null,ltype.stringValue()));
+ Element element = literalCache.get(LiteralCommons.createCacheKey(Double.toString(value),null,Namespaces.NS_XSD + "double"));
if(element != null) {
return (KiWiDoubleLiteral)element.getObjectValue();
}
requireJDBCConnection();
+ KiWiUriResource ltype = loadUriResource(Namespaces.NS_XSD + "double");
+
+ // ltype not persisted
+ if(ltype == null || ltype.getId() == null) {
+ return null;
+ }
+
// otherwise prepare a query, depending on the parameters given
PreparedStatement query = getPreparedStatement("load.literal_by_dv");
query.setDouble(1, value);
@@ -744,15 +744,8 @@ public class KiWiConnection {
* @throws SQLException
*/
public KiWiBooleanLiteral loadLiteral(boolean value) throws SQLException {
- KiWiUriResource ltype = loadUriResource(Namespaces.NS_XSD + "boolean");
-
- // ltype not persisted
- if(ltype == null || ltype.getId() == null) {
- return null;
- }
-
// look in cache
- Element element = literalCache.get(LiteralCommons.createCacheKey(Boolean.toString(value),null,ltype.stringValue()));
+ Element element = literalCache.get(LiteralCommons.createCacheKey(Boolean.toString(value),null,Namespaces.NS_XSD + "boolean"));
if(element != null) {
return (KiWiBooleanLiteral)element.getObjectValue();
}
@@ -760,6 +753,13 @@ public class KiWiConnection {
requireJDBCConnection();
+ KiWiUriResource ltype = loadUriResource(Namespaces.NS_XSD + "boolean");
+
+ // ltype not persisted
+ if(ltype == null || ltype.getId() == null) {
+ return null;
+ }
+
// otherwise prepare a query, depending on the parameters given
PreparedStatement query = getPreparedStatement("load.literal_by_bv");
query.setBoolean(1, value);
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2f3dabb0/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 5086cf0..6336f9f 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
@@ -151,6 +151,9 @@ public class KiWiSailConnection extends NotifyingSailConnectionBase implements I
if(contextSet.size() == 0) {
contextSet.add(valueFactory.createURI(defaultContext));
}
+ if(inferred) {
+ contextSet.add(valueFactory.createURI(inferredContext));
+ }
KiWiResource ksubj = valueFactory.convert(subj);
KiWiUriResource kpred = valueFactory.convert(pred);
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2f3dabb0/libraries/kiwi/kiwi-triplestore/src/main/resources/ehcache-kiwi.xml
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/ehcache-kiwi.xml b/libraries/kiwi/kiwi-triplestore/src/main/resources/ehcache-kiwi.xml
index 179f24d..9d27ef1 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/ehcache-kiwi.xml
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/ehcache-kiwi.xml
@@ -149,7 +149,7 @@ are "on" and "off". The default is "autodetect".
a cache from database ID to KiWiNode; should be very large since this kind of lookup is a very frequent operation
-->
<cache name="node-cache"
- maxElementsInMemory="500000"
+ maxElementsInMemory="5000000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LFU"/>
@@ -159,7 +159,7 @@ are "on" and "off". The default is "autodetect".
from the database by avoiding reconstructing each triple from the database result
-->
<cache name="triple-cache"
- maxElementsInMemory="100000"
+ maxElementsInMemory="500000"
overflowToDisk="false"
timeToLiveSeconds="3600"
memoryStoreEvictionPolicy="LFU"/>
@@ -176,7 +176,7 @@ are "on" and "off". The default is "autodetect".
<!-- a cache from URI to KiWiUriResource -->
<cache name="uri-cache"
- maxElementsInMemory="50000"
+ maxElementsInMemory="500000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LFU"/>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/2f3dabb0/libraries/kiwi/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/kiwi/pom.xml b/libraries/kiwi/pom.xml
index 1edc769..6ef36c8 100644
--- a/libraries/kiwi/pom.xml
+++ b/libraries/kiwi/pom.xml
@@ -100,19 +100,6 @@
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
- <!-- do not install / deploy reactor -->
- <plugin>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-install-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
</plugins>
</build>
[2/2] git commit: Merge branch 'develop' of
https://git-wip-us.apache.org/repos/asf/incubator-marmotta into develop
Posted by ss...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-marmotta into develop
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/9432e311
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/9432e311
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/9432e311
Branch: refs/heads/develop
Commit: 9432e31177b04abaa94233f1c565a16a992e6ef9
Parents: 2f3dabb ac1b54b
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Fri May 3 13:17:22 2013 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Fri May 3 13:17:22 2013 +0200
----------------------------------------------------------------------
client/marmotta-client-js-sample-webapp/pom.xml | 2 +-
client/marmotta-client-php/pom.xml | 2 +-
libraries/ldcache/ldcache-backend-mapdb/pom.xml | 2 +-
parent/pom.xml | 7 +-
.../main/resources/web/admin/snorql/snorql.html | 7 +-
.../src/main/resources/web/admin/snorql/snorql.js | 117 ++++++++-------
pom.xml | 4 +-
7 files changed, 76 insertions(+), 65 deletions(-)
----------------------------------------------------------------------