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/09/10 11:45:09 UTC

git commit: fixes MARMOTTA-300 and MARMOTTA-302

Updated Branches:
  refs/heads/develop 69cc8f3a9 -> 83522bfc1


fixes MARMOTTA-300 and MARMOTTA-302


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/83522bfc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/83522bfc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/83522bfc

Branch: refs/heads/develop
Commit: 83522bfc1f38f4cad7068043abd6fb62f86c5f96
Parents: 69cc8f3
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Sep 10 11:44:51 2013 +0200
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Sep 10 11:44:51 2013 +0200

----------------------------------------------------------------------
 .../sesame/repository/ResourceUtils.java        | 22 ++++++++++----------
 .../kiwi/persistence/KiWiConnection.java        |  4 ++--
 2 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/83522bfc/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/sesame/repository/ResourceUtils.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/sesame/repository/ResourceUtils.java b/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/sesame/repository/ResourceUtils.java
index c048cb9..95cc9a4 100644
--- a/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/sesame/repository/ResourceUtils.java
+++ b/commons/marmotta-commons/src/main/java/org/apache/marmotta/commons/sesame/repository/ResourceUtils.java
@@ -82,7 +82,7 @@ public class ResourceUtils {
      * @return true if the {@link Resource} is ever used as subject.
      */
     public static boolean isSubject(RepositoryConnection conn, final Resource rsc) {
-        return existsStatement(conn, rsc, null, null, null);
+        return existsStatement(conn, rsc, null, null);
     }
 
     /**
@@ -102,7 +102,7 @@ public class ResourceUtils {
      * @return true if the {@link URI} is ever used as predicate.
      */
     public static boolean isPredicate(RepositoryConnection conn, final URI uri) {
-        return existsStatement(conn, null, uri, null, null);
+        return existsStatement(conn, null, uri, null);
     }
 
     /**
@@ -122,7 +122,7 @@ public class ResourceUtils {
      * @return true if the {@link Value} is ever used as predicate.
      */
     public static boolean isObject(RepositoryConnection conn, final Value val) {
-        return existsStatement(conn, null, null, val, null);
+        return existsStatement(conn, null, null, val);
     }
 
 
@@ -143,7 +143,7 @@ public class ResourceUtils {
      * @return true if the {@link Resource} is ever used as context.
      */
     public static boolean isContext(RepositoryConnection conn, Resource rsc) {
-        return existsStatement(conn, null, null, null, rsc);
+        return existsStatement(conn, null, null, null);
     }
 
     /**
@@ -168,16 +168,16 @@ public class ResourceUtils {
     /**
      * Check for the existence of a {@link Statement} with the provided constraints. <code>null</code> is a wildcard.
      * <br>This is a convenience method and does not really fit whith <em>Resource</em>Utils.
-     * @param conn the {@link ResourceConnection} to check on
-     * @param subj the subject of the {@link Statement} or <code>null</code> for a wildcard.
-     * @param pred the predicate of the {@link Statement} or <code>null</code> for a wildcard.
-     * @param object the object of the {@link Statement} or <code>null</code> for a wildcard.
-     * @param ctx the context of the {@link Statement} or <code>null</code> for a wildcard.
+     *
+     * @param conn the {@link org.apache.marmotta.commons.sesame.repository.ResourceConnection} to check on
+     * @param subj the subject of the {@link org.openrdf.model.Statement} or <code>null</code> for a wildcard.
+     * @param pred the predicate of the {@link org.openrdf.model.Statement} or <code>null</code> for a wildcard.
+     * @param object the object of the {@link org.openrdf.model.Statement} or <code>null</code> for a wildcard.
      * @return true if a {@link Statement} with the provided constraints exists.
      */
-    public static boolean existsStatement(RepositoryConnection conn, Resource subj, URI pred, Value object, Resource ctx) {
+    public static boolean existsStatement(RepositoryConnection conn, Resource subj, URI pred, Value object) {
         try {
-            return conn.hasStatement(subj,pred,object,true,ctx);
+            return conn.hasStatement(subj,pred,object,true);
         } catch (RepositoryException e) {
             log.error(e.getMessage());
             return false;

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/83522bfc/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 3467525..3043e70 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
@@ -1591,7 +1591,7 @@ public class KiWiConnection {
             if(row.getLong("ltype") != 0) {
                 result.setType((KiWiUriResource) loadNodeById(row.getLong("ltype")));
             } else {
-                log.warn("Loaded literal without type: '{}' (id:{}).", result.getContent(), result.getId());
+                log.debug("Loaded literal without type: '{}' (id:{}).", result.getContent(), result.getId());
             }
 
             cacheNode(result);
@@ -1687,7 +1687,7 @@ public class KiWiConnection {
             result.setCreator((KiWiResource)loadNodeById(row.getLong("creator")));
         }
         result.setDeleted(row.getBoolean("deleted"));
-        result.setInferred(row.getBoolean("deleted"));
+        result.setInferred(row.getBoolean("inferred"));
         result.setCreated(new Date(row.getTimestamp("createdAt").getTime()));
         try {
             if(row.getDate("deletedAt") != null) {