[Yanel-commits] rev 25520 - public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Wed Jun 27 11:25:41 CEST 2007


Author: michi
Date: 2007-06-27 11:25:41 +0200 (Wed, 27 Jun 2007)
New Revision: 25520

Modified:
   public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java
Log:
get language fixed

Modified: public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java	2007-06-27 09:24:26 UTC (rev 25519)
+++ public/yanel/trunk/src/contributions/resources/nutch/src/java/org/wyona/yanel/impl/resources/NutchResource.java	2007-06-27 09:25:41 UTC (rev 25520)
@@ -183,8 +183,6 @@
             hitsPerPage = _hitsPerPage;
         }
 
-        String language = getLanguage();
-
         int idx = 0;
         try {
             idx = Integer.parseInt(request.getParameter("idx"));
@@ -199,7 +197,7 @@
         }
 
         searchTerm = request.getParameter("query");
-        return getView(new Path(request.getServletPath()), viewId, idx, id, language);
+        return getView(new Path(request.getServletPath()), viewId, idx, id, getLanguage());
     }
 
     /**
@@ -372,7 +370,7 @@
                 transformer.setParameter("totalHits", "" + totalHits);
                 transformer.setParameter("query", "" + searchTerm);
                 transformer.setParameter("start", "" + start);
-                transformer.setParameter("yanel.meta.lanugage", getLanguage());
+                transformer.setParameter("yanel.meta.language", getLanguage());
                 transformer.setParameter("show", getShowParameterValue());
 
                 // create xinclude transformer:
@@ -647,14 +645,8 @@
      * @return StreamSource
      */
     private StreamSource getGlobalXSLTStreamSource() throws Exception {
-        String xsltPath;
-        ResourceConfiguration rc = getConfiguration();
-        if (rc != null) {
-            xsltPath = rc.getProperty("global-xslt");
-        } else {
-            xsltPath = getRTI().getProperty("global-xslt");
-        }
-        log.debug("XSLT: " + xsltPath);
+        String xsltPath = getResourceConfigProperty("global-xslt");
+        if(log.isDebugEnabled()) log.debug("XSLT: " + xsltPath);
         if (xsltPath != null) {
             return new StreamSource(getRealm().getRepository().getInputStream(new org.wyona.yarep.core.Path(xsltPath)));
         } else {
@@ -721,6 +713,10 @@
      * Get language
      */
     private String getLanguage() throws Exception {
+/*
+        log.debug("Res config property: " + getResourceConfigProperty("language"));
+        log.debug("Requested language: " + getRequestedLanguage());
+*/
         return getRequestedLanguage();
     }
 




More information about the Yanel-commits mailing list