You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2012/04/08 16:16:37 UTC
svn commit: r1311010 -
/incubator/stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java
Author: rwesten
Date: Sun Apr 8 14:16:37 2012
New Revision: 1311010
URL: http://svn.apache.org/viewvc?rev=1311010&view=rev
Log:
Added a check for empty Jena URI resource to the initialisation method of the indexing iterator for Jena TDB
Modified:
incubator/stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java
Modified: incubator/stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java?rev=1311010&r1=1311009&r2=1311010&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java (original)
+++ incubator/stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java Sun Apr 8 14:16:37 2012
@@ -446,7 +446,9 @@ public class RdfIndexingSource implement
while(nextEntity == null && resultSet.hasNext()){
Binding firstValid = resultSet.nextBinding();
Node entityNode = firstValid.get(entityVar);
- if(entityNode.isURI()){ //only uri nodes are valid
+ if(entityNode.isURI() && //only uri nodes are valid
+ // it's unbelievable, but Jena URIs might be empty!
+ !entityNode.toString().isEmpty()){
//store it temporarily in nextBinding
nextBinding = firstValid;
//store it as next (first) entity