Author: ssmiweve
Date: 2009-01-15 20:47:06 +0100 (Thu, 15 Jan 2009)
New Revision: 7147

Modified:
   
branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/PlatefoodPPCSearchCommand.java
Log:
clean out some non-sesat code

Modified: 
branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/PlatefoodPPCSearchCommand.java
===================================================================
--- 
branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/PlatefoodPPCSearchCommand.java
        2009-01-15 14:26:07 UTC (rev 7146)
+++ 
branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/PlatefoodPPCSearchCommand.java
        2009-01-15 19:47:06 UTC (rev 7147)
@@ -29,11 +29,8 @@
 import java.net.SocketTimeoutException;
 import java.net.URLEncoder;
 import no.sesat.search.mode.config.PlatefoodPpcCommandConfig;
-import no.sesat.search.query.token.Categories;
-import no.sesat.search.query.token.TokenPredicateUtility;
 import no.sesat.search.result.BasicResultList;
 import no.sesat.search.result.BasicResultItem;
-import no.sesat.search.result.PlatefoodSearchResult;
 import no.sesat.search.result.ResultItem;
 import no.sesat.search.result.ResultList;
 import no.sesat.search.site.config.SiteConfiguration;
@@ -115,14 +112,9 @@
         final PlatefoodPpcCommandConfig ppcConfig
             = (PlatefoodPpcCommandConfig) context.getSearchConfiguration();
 
-        // TODO smelling of non-sesat business logic here. AND presentation 
logic. move out.
-        top = rq.getEngine().evaluateQuery(Categories.LOAN_TRIGGER, 
rq.getQuery());
-        top |= rq.getEngine().evaluateQuery(Categories.SUDOKU_TRIGGER, 
rq.getQuery());
-        top &= 
rq.getEngine().evaluateQuery(TokenPredicateUtility.getTokenPredicate("PPCTOPLIST").exactPeer(),
 rq.getQuery());
-
         try {
             final Document doc = getXmlRestful().getXmlResult();
-            final PlatefoodSearchResult<ResultItem> searchResult = new 
PlatefoodSearchResult<ResultItem>(top);
+            final BasicResultList<ResultItem> searchResult = new 
BasicResultList<ResultItem>();
 
             if (doc != null) {
                 final Element elem = doc.getDocumentElement();
@@ -168,8 +160,8 @@
         final NodeList imageUrl = 
ppcListing.getElementsByTagName("chan:line1");
         final NodeList phone = 
ppcListing.getElementsByTagName("chan:phoneNumber");
 
-        final String place = ppcListing.getParentNode().getParentNode()
-                .getAttributes().getNamedItem("id").getNodeValue();
+        final String place
+                = 
ppcListing.getParentNode().getParentNode().getAttributes().getNamedItem("id").getNodeValue();
 
         LOG.debug("T3X: "+ place);
 
@@ -179,17 +171,6 @@
         if (desc1.getLength() > 0) {
             String sDesc1 = desc1.item(0).getFirstChild().getNodeValue();
             if (sDesc1.matches("....@\\..*")) {
-                String media[] = sDesc1.split("@\\.");
-                if (media.length >= 2 ) {
-                    if(media[1].trim().length()>0) {
-                        item.addField("imageUrl", 
"http://sesam.se/export/t3/"+media[1].trim());
-                    }
-                    if (media.length >= 4) {
-                        if(media[2].trim().length()>0) {
-                            item.addField("flashUrl", 
"http://sesam.se/export/t3/"+media[2].trim());
-                        }
-                    }
-                }
                 item.addField("description1", sDesc1.replaceAll("@\\...@\\.", 
""));
             } else {
                 item.addField("description1", sDesc1);

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

Reply via email to