clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1489038 - /clerezza/trunk/rdf.jena.facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
Date Mon, 03 Jun 2013 15:47:49 GMT
Author: reto
Date: Mon Jun  3 15:47:49 2013
New Revision: 1489038

URL: http://svn.apache.org/r1489038
Log:
CLEREZZA-787: returning iterator over empty collection when filtering with literal as subject
or literal or bnode as predicate

Modified:
    clerezza/trunk/rdf.jena.facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java

Modified: clerezza/trunk/rdf.jena.facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
URL: http://svn.apache.org/viewvc/clerezza/trunk/rdf.jena.facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java?rev=1489038&r1=1489037&r2=1489038&view=diff
==============================================================================
--- clerezza/trunk/rdf.jena.facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
(original)
+++ clerezza/trunk/rdf.jena.facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
Mon Jun  3 15:47:49 2013
@@ -119,6 +119,9 @@ public class JenaGraph extends GraphBase
         UriRef predicate = null;
         Resource object = null;
         if (m.getMatchSubject() != null) {
+            if (m.getMatchSubject().isLiteral()) {
+                return Collections.EMPTY_SET.iterator();
+            }
             subject = jena2TriaUtil.convertNonLiteral(m.getMatchSubject());
             if (subject == null) {
                 return Collections.EMPTY_SET.iterator();
@@ -131,6 +134,9 @@ public class JenaGraph extends GraphBase
             }
         }        
         if (m.getMatchPredicate() != null) {
+            if (!m.getMatchPredicate().isURI()) {
+                return Collections.EMPTY_SET.iterator();
+            }
             predicate = jena2TriaUtil.convertJenaUri2UriRef(m.getMatchPredicate());
         }
 



Mime
View raw message