lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r816082 - /lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java
Date Thu, 17 Sep 2009 07:41:14 GMT
Author: noble
Date: Thu Sep 17 07:41:14 2009
New Revision: 816082

URL: http://svn.apache.org/viewvc?rev=816082&view=rev
Log:
refactoring

Modified:
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java?rev=816082&r1=816081&r2=816082&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorBase.java
Thu Sep 17 07:41:14 2009
@@ -54,15 +54,20 @@
   public void init(Context context) {
     rowIterator = null;
     this.context = context;
+    resolver = (VariableResolverImpl) context.getVariableResolver();    
     if (isFirstInit) {
-      entityName = context.getEntityAttribute("name");
-      String s = context.getEntityAttribute(ON_ERROR);
-      if (s != null) onError = s;
+      firstInit(context);
     }
-    resolver = (VariableResolverImpl) context.getVariableResolver();
     query = null;
-    isFirstInit = false;
+  }
 
+  /**first time init call. do one-time operations here
+   */
+  protected void firstInit(Context context) {
+    entityName = context.getEntityAttribute("name");
+    String s = context.getEntityAttribute(ON_ERROR);
+    if (s != null) onError = s;
+    isFirstInit = false;
   }
 
 



Mime
View raw message