Author: magnuse
Date: 2006-05-08 10:38:24 +0200 (Mon, 08 May 2006)
New Revision: 2868

Modified:
   
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
   
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/TvEnrichmentDateFormatHandler.java
   
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/WeatherCelciusHandler.java
   
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/WeatherDateHandler.java
Log:
Added attributes to tv and weather result handlers.


Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
      2006-05-05 15:03:56 UTC (rev 2867)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
      2006-05-08 08:38:24 UTC (rev 2868)
@@ -692,6 +692,14 @@
                         dh.setTargetField(rh.getAttribute("target"));
                         dh.setSourceField(rh.getAttribute("source"));
                         break;
+                    case WEATHER_CELCIUS:
+                        final WeatherCelciusHandler ch = 
(WeatherCelciusHandler) handler;
+                        ch.setTargetField(rh.getAttribute("target"));
+                        ch.setSourceField(rh.getAttribute("source"));
+                    case WEATHER_DATE:
+                        final WeatherDateHandler dateh = (WeatherDateHandler) 
handler;
+                        dateh.setTargetField(rh.getAttribute("target"));
+                        dateh.setSourceField(rh.getAttribute("source"));
                 }
 
                 return handler;

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/TvEnrichmentDateFormatHandler.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/TvEnrichmentDateFormatHandler.java
 2006-05-05 15:03:56 UTC (rev 2867)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/TvEnrichmentDateFormatHandler.java
 2006-05-08 08:38:24 UTC (rev 2868)
@@ -3,7 +3,6 @@
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.Iterator;
 import java.util.Map;
 import no.schibstedsok.front.searchportal.result.SearchResultItem;
 
@@ -53,4 +52,5 @@
         }
     }
 
+
 }

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/WeatherCelciusHandler.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/WeatherCelciusHandler.java
 2006-05-05 15:03:56 UTC (rev 2867)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/WeatherCelciusHandler.java
 2006-05-08 08:38:24 UTC (rev 2868)
@@ -29,6 +29,10 @@
         this.targetField = targetField;
     }
 
+    public void setSourceField(final String sourceField) {
+        this.sourceField = sourceField;
+    }
+    
     public void handleResult(final Context cxt, final Map parameters) {
         for (final SearchResultItem item : cxt.getSearchResult().getResults()) 
{
             String celcius = item.getField(sourceField);

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/WeatherDateHandler.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/WeatherDateHandler.java
    2006-05-05 15:03:56 UTC (rev 2867)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/WeatherDateHandler.java
    2006-05-08 08:38:24 UTC (rev 2868)
@@ -32,6 +32,10 @@
         this.targetField = targetField;
     }
 
+        public void setSourceField(String string) {
+        this.sourceField = sourceField;
+    }
+
     public void handleResult(final Context cxt, final Map parameters) {
 
         for (final SearchResultItem item : cxt.getSearchResult().getResults()) 
{

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to