Author: daniele
Date: 2007-03-28 16:51:55 +0200 (Wed, 28 Mar 2007)
New Revision: 4675

Modified:
   
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/SearchModeFactory.java
   
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
   
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/config/CatalogueSearchConfiguration.java
   
trunk/core-api/src/main/java/no/schibstedsok/searchportal/result/CatalogueSearchResultItem.java
Log:
added new property for search configruation and fix a minor bug in search 
command.

Modified: 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/SearchModeFactory.java
===================================================================
--- 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/SearchModeFactory.java
       2007-03-28 14:33:21 UTC (rev 4674)
+++ 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/SearchModeFactory.java
       2007-03-28 14:51:55 UTC (rev 4675)
@@ -775,7 +775,8 @@
                 if (sc instanceof CatalogueSearchConfiguration) {
                     final CatalogueSearchConfiguration csc = 
(CatalogueSearchConfiguration) sc;
                     fillBeanProperty(csc, inherit, "queryParameterWhere", 
ParseType.String, commandE, "");
-                    fillBeanProperty(csc, inherit, "searchBy", 
ParseType.String, commandE, "");
+                    fillBeanProperty(csc, inherit, "searchBy", 
ParseType.String, commandE, ""); 
+                    fillBeanProperty(csc, inherit, "slideshowUrl", 
ParseType.String, commandE, "");                     
                     fillBeanProperty(csc, inherit, "split", ParseType.Boolean, 
commandE, "false");
                 }
                 if (sc instanceof CatalogueAdsSearchConfiguration) {

Modified: 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
===================================================================
--- 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
  2007-03-28 14:33:21 UTC (rev 4674)
+++ 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/command/CatalogueSearchCommand.java
  2007-03-28 14:51:55 UTC (rev 4675)
@@ -361,12 +361,11 @@
             useTerm=false;
         }
 
-        
-        Pattern p = Pattern.compile(".*\\.|.*\\-");        
+        Pattern p = Pattern.compile("\\.|\\-");        
         Matcher m = p.matcher(getTransformedTerms().get(clause));
 
-        hasNotWordCharacters = m.matches();
-        
+        hasNotWordCharacters = m.find();
+
         if(useTerm){
             
             if(hasNotWordCharacters){

Modified: 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/config/CatalogueSearchConfiguration.java
===================================================================
--- 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/config/CatalogueSearchConfiguration.java
     2007-03-28 14:33:21 UTC (rev 4674)
+++ 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/mode/config/CatalogueSearchConfiguration.java
     2007-03-28 14:51:55 UTC (rev 4675)
@@ -17,6 +17,9 @@
     /** The name of the parameter which holds the geographic user supplied 
location.*/
     private String queryParameterWhere;
     
+    /** the base url to access the slideshow images in the info page. */
+    private String slideshowUrl;
+    
     /**
      *  ????
      */
@@ -81,4 +84,18 @@
     public Boolean getSplit(){
         return this.split;
     }
+
+    /**
+     *  getter for base url for slideshow images.
+     */
+    public String getSlideshowUrl() {
+        return slideshowUrl;
+    }
+
+    /**
+     *  setter for base url for slideshow images.
+     */    
+    public void setSlideshowUrl(String slideshowUrl) {
+        this.slideshowUrl = slideshowUrl;
+    }
 }

Modified: 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/result/CatalogueSearchResultItem.java
===================================================================
--- 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/result/CatalogueSearchResultItem.java
     2007-03-28 14:33:21 UTC (rev 4674)
+++ 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/result/CatalogueSearchResultItem.java
     2007-03-28 14:51:55 UTC (rev 4675)
@@ -70,16 +70,12 @@
      * @return  a description of the result item.
      */
     public String getCompanyDescription(){
-       if(!isCommercial()){
+       String description = getField("iyplogotekst");
+       if(!isCommercial() || (description != null && description.length() > 
0)){
                return null;
        }
        
-       String description = getField("iyplogotekst");
-       
-       if(description != null && description.length() > 0){
-               return description;
-       }
-       return "en lang fortelling på mer en 40 tegn blir nok choppet etter en 
stund.";
+        return description;
     }
     
     /**

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

Reply via email to