Author: rharo
Date: Tue Jul 16 09:50:51 2013
New Revision: 1503640
URL: http://svn.apache.org/r1503640
Log:
Fixed STANBOL-1120 with the proposed patches
Modified:
stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties
stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java
Modified:
stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties
URL:
http://svn.apache.org/viewvc/stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties?rev=1503640&r1=1503639&r2=1503640&view=diff
==============================================================================
---
stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties
(original)
+++
stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties
Tue Jul 16 09:50:51 2013
@@ -289,3 +289,10 @@ org.apache.stanbol.entityhub.site.fieldM
#org.apache.stanbol.entityhub.site.attributionUrl=http://example.org/About.html
#org.apache.stanbol.entityhub.site.attribution=To the universe
+
+# Fail on Error loading Resource Files
+# The indexing tool can be configured to fail on error loading resource files.
+# By default, a resource file will be ignored when an error occurs while
trying to load it
+failOnErrorLoadingResource=false
+
+
Modified:
stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java?rev=1503640&r1=1503639&r2=1503640&view=diff
==============================================================================
---
stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java
(original)
+++
stanbol/trunk/entityhub/indexing/source/jenatdb/src/main/java/org/apache/stanbol/entityhub/indexing/source/jenatdb/RdfIndexingSource.java
Tue Jul 16 09:50:51 2013
@@ -16,8 +16,6 @@
*/
package org.apache.stanbol.entityhub.indexing.source.jenatdb;
-import static
org.apache.stanbol.entityhub.indexing.source.jenatdb.Constants.DEFAULT_MODEL_DIRECTORY;
-import static
org.apache.stanbol.entityhub.indexing.source.jenatdb.Constants.PARAM_MODEL_DIRECTORY;
import static
org.apache.stanbol.entityhub.indexing.source.jenatdb.Utils.initTDBDataset;
import java.io.File;
@@ -44,7 +42,6 @@ import org.apache.stanbol.entityhub.serv
import org.apache.stanbol.entityhub.servicesapi.model.Text;
import org.apache.stanbol.entityhub.servicesapi.model.ValueFactory;
import org.apache.stanbol.entityhub.servicesapi.util.ModelUtils;
-import org.joda.time.field.ImpreciseDateTimeField;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -68,8 +65,6 @@ import com.hp.hpl.jena.rdf.model.AnonId;
import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.sparql.core.Var;
import com.hp.hpl.jena.sparql.engine.binding.Binding;
-import com.hp.hpl.jena.tdb.TDBFactory;
-import com.hp.hpl.jena.tdb.base.file.Location;
import com.hp.hpl.jena.tdb.store.DatasetGraphTDB;
import com.hp.hpl.jena.util.iterator.ExtendedIterator;
/**
@@ -126,7 +121,7 @@ public class RdfIndexingSource extends A
*/
public static final String DEFAULT_SOURCE_FOLDER_NAME = "rdfdata";
- public static final String DEFAULT_IMPORTED_FOLDER_NAME = "imported";
+ public static final String DEFAULT_IMPORTED_FOLDER_NAME = "imported";
//protected to allow internal classes direct access (without hidden getter/
//setter added by the compiler that decrease performance)
protected final static Logger log =
LoggerFactory.getLogger(RdfIndexingSource.class);
@@ -237,8 +232,10 @@ public class RdfIndexingSource extends A
new RdfImportFilter[filters.size()]));
}
}
+
+ boolean failOnError = indexingConfig.isFailOnError();
//create the ResourceLoader
- this.loader = new ResourceLoader(new
RdfResourceImporter(indexingDataset, importFilter), true);
+ this.loader = new ResourceLoader(new
RdfResourceImporter(indexingDataset, importFilter), failOnError);
value = config.get(PARAM_IMPORTED_FOLDER);
String importedFolderName;