Author: mickw
Date: 2006-04-25 13:43:22 +0200 (Tue, 25 Apr 2006)
New Revision: 2793

Removed:
   
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchTabs.java
Modified:
   trunk/pom.xml
   
trunk/src/java/no/schibstedsok/front/searchportal/analyzer/AnalysisRuleFactory.java
   
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
   
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/FileResourceLoader.java
   
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/LocalEntityResolver.java
   
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/UrlResourceLoader.java
   
trunk/src/java/no/schibstedsok/front/searchportal/query/token/RegExpEvaluatorFactory.java
   trunk/src/java/no/schibstedsok/front/searchportal/servlet/SearchServlet.java
   
trunk/src/java/no/schibstedsok/front/searchportal/view/config/SearchTabFactory.java
Log:
LocalEntityResolver changes. class made package private.


Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml       2006-04-25 10:02:18 UTC (rev 2792)
+++ trunk/pom.xml       2006-04-25 11:43:22 UTC (rev 2793)
@@ -96,6 +96,16 @@
         </includes>
       </resource>
       <resource>
+        <filtering>true</filtering>
+        <directory>src/main/conf</directory>
+        <includes>
+          <include>*.xml</include>
+          <include>*.properties</include>
+          <include>*.csv</include>
+          <include>*.txt</include>
+        </includes>
+      </resource>
+      <resource>
         <directory>src/webapp/dtds</directory>
         <includes>
           <include>*.dtd</include>

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/analyzer/AnalysisRuleFactory.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/analyzer/AnalysisRuleFactory.java
 2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/analyzer/AnalysisRuleFactory.java
 2006-04-25 11:43:22 UTC (rev 2793)
@@ -10,7 +10,6 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 import no.schibstedsok.common.ioc.BaseContext;
 import no.schibstedsok.front.searchportal.configuration.loader.DocumentLoader;
-import 
no.schibstedsok.front.searchportal.configuration.loader.LocalEntityResolver;
 import no.schibstedsok.front.searchportal.query.token.TokenPredicate;
 import no.schibstedsok.front.searchportal.util.SearchConstants;
 import org.apache.commons.collections.Predicate;
@@ -87,7 +86,6 @@
         final DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
         factory.setValidating(false);
         final DocumentBuilder builder = factory.newDocumentBuilder();
-        builder.setEntityResolver(new LocalEntityResolver());
         loader = 
context.newDocumentLoader(SearchConstants.ANALYSIS_RULES_XMLFILE, builder);
 
         INSTANCES.put(context.getSite(), this);

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
      2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
      2006-04-25 11:43:22 UTC (rev 2793)
@@ -19,7 +19,6 @@
 import no.schibstedsok.front.searchportal.InfrastructureException;
 import no.schibstedsok.front.searchportal.configuration.loader.DocumentContext;
 import no.schibstedsok.front.searchportal.configuration.loader.DocumentLoader;
-import 
no.schibstedsok.front.searchportal.configuration.loader.LocalEntityResolver;
 import 
no.schibstedsok.front.searchportal.executor.ParallelSearchCommandExecutor;
 import no.schibstedsok.front.searchportal.executor.SearchCommandExecutor;
 import 
no.schibstedsok.front.searchportal.executor.SequentialSearchCommandExecutor;
@@ -140,7 +139,6 @@
         final DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
         factory.setValidating(false);
         final DocumentBuilder builder = factory.newDocumentBuilder();
-        builder.setEntityResolver(new LocalEntityResolver());
         loader = context.newDocumentLoader(SearchConstants.MODES_XMLFILE, 
builder);
 
         // update the store of factories

Deleted: 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchTabs.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchTabs.java 
    2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchTabs.java 
    2006-04-25 11:43:22 UTC (rev 2793)
@@ -1,31 +0,0 @@
-package no.schibstedsok.front.searchportal.configuration;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @deprecated use the new datamodel configuration API instead. eg 
SearchTabFactory and SearchModeFactory
- * @author <a href="mailto:[EMAIL PROTECTED]">Magnus Eklund</a>
- * @version <tt>$Revision$</tt>
- */
-public class SearchTabs {
-
-    public Map searchModes = new HashMap();
-
-//    public void addMode(SearchMode mode) {
-//        searchModes.put(mode.getKey(), mode);
-//    }
-
-    public SearchMode getSearchMode(String modeKey) {
-        return (SearchMode) searchModes.get(modeKey);
-    }
-
-    public void stopAll() {
-        for (Iterator iterator = searchModes.keySet().iterator(); 
iterator.hasNext();) {
-            String key = (String) iterator.next();
-            SearchMode mode = (SearchMode) searchModes.get(key);
-            mode.getExecutor().stop();
-        }
-    }
-}

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/FileResourceLoader.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/FileResourceLoader.java
      2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/FileResourceLoader.java
      2006-04-25 11:43:22 UTC (rev 2793)
@@ -57,6 +57,7 @@
             final DocumentBuilder builder) {
 
         final DocumentLoader dl = new FileResourceLoader(siteCxt);
+        builder.setEntityResolver(new LocalEntityResolver());
         dl.init(resource, builder);
         return dl;
     }

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/LocalEntityResolver.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/LocalEntityResolver.java
     2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/LocalEntityResolver.java
     2006-04-25 11:43:22 UTC (rev 2793)
@@ -10,7 +10,7 @@
 import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 
-public final class LocalEntityResolver implements EntityResolver {
+final class LocalEntityResolver implements EntityResolver {
 
     private static final Logger LOG = 
Logger.getLogger(LocalEntityResolver.class);
     private static final String INFO_LOADING_DTD = "Loading local DTD ";
@@ -18,7 +18,8 @@
 
     public InputSource resolveEntity(final String publicId, final String 
systemId) {
 
-        if (systemId.startsWith("http://sesam.no/dtds/";)) {
+        // the latter is only for development purposes when dtds have't been 
published to production yet
+        if (systemId.startsWith("http://sesam.no/dtds/";) || 
systemId.startsWith("http://localhost";)) {
             
             final String rsc = systemId.substring(systemId.lastIndexOf('/'));
             LOG.info(INFO_LOADING_DTD + rsc);

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/UrlResourceLoader.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/UrlResourceLoader.java
       2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/configuration/loader/UrlResourceLoader.java
       2006-04-25 11:43:22 UTC (rev 2793)
@@ -66,6 +66,7 @@
             final DocumentBuilder builder) {
 
         final DocumentLoader dl = new UrlResourceLoader(siteCxt);
+        builder.setEntityResolver(new LocalEntityResolver());
         dl.init(resource, builder);
         return dl;
     }
@@ -213,8 +214,4 @@
         return success;
     }
 
-    public static PropertiesLoader newPropertiesLoader(BaseContext 
baseContext, String resource, Properties properties) {
-        return null;
-    }
-
 }
\ No newline at end of file

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/query/token/RegExpEvaluatorFactory.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/query/token/RegExpEvaluatorFactory.java
   2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/query/token/RegExpEvaluatorFactory.java
   2006-04-25 11:43:22 UTC (rev 2793)
@@ -5,7 +5,6 @@
 import javax.xml.parsers.ParserConfigurationException;
 import no.schibstedsok.common.ioc.BaseContext;
 import no.schibstedsok.front.searchportal.configuration.loader.DocumentLoader;
-import 
no.schibstedsok.front.searchportal.configuration.loader.LocalEntityResolver;
 import no.schibstedsok.front.searchportal.configuration.loader.ResourceContext;
 import no.schibstedsok.front.searchportal.site.Site;
 import no.schibstedsok.front.searchportal.site.SiteContext;
@@ -77,7 +76,6 @@
         final DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
         factory.setValidating(false);
         final DocumentBuilder builder = factory.newDocumentBuilder();
-        builder.setEntityResolver(new LocalEntityResolver());
         loader = 
context.newDocumentLoader(SearchConstants.REGEXP_EVALUATOR_XMLFILE, builder);
 
         INSTANCES.put(context.getSite(), this);

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/servlet/SearchServlet.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/servlet/SearchServlet.java    
    2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/servlet/SearchServlet.java    
    2006-04-25 11:43:22 UTC (rev 2793)
@@ -8,7 +8,6 @@
 import no.schibstedsok.common.ioc.ContextWrapper;
 import no.schibstedsok.front.searchportal.configuration.SearchMode;
 import no.schibstedsok.front.searchportal.configuration.SearchModeFactory;
-import no.schibstedsok.front.searchportal.configuration.SearchTabs;
 import no.schibstedsok.front.searchportal.configuration.loader.DocumentLoader;
 import no.schibstedsok.front.searchportal.configuration.loader.ResourceContext;
 import no.schibstedsok.front.searchportal.site.Site;

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/view/config/SearchTabFactory.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/view/config/SearchTabFactory.java
 2006-04-25 10:02:18 UTC (rev 2792)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/view/config/SearchTabFactory.java
 2006-04-25 11:43:22 UTC (rev 2793)
@@ -20,7 +20,6 @@
 import no.schibstedsok.front.searchportal.configuration.SearchModeFactory;
 import no.schibstedsok.front.searchportal.configuration.loader.DocumentContext;
 import no.schibstedsok.front.searchportal.configuration.loader.DocumentLoader;
-import 
no.schibstedsok.front.searchportal.configuration.loader.LocalEntityResolver;
 import no.schibstedsok.front.searchportal.site.Site;
 import no.schibstedsok.front.searchportal.site.SiteContext;
 import no.schibstedsok.front.searchportal.util.SearchConstants;
@@ -95,7 +94,6 @@
         final DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
         factory.setValidating(false);
         final DocumentBuilder builder = factory.newDocumentBuilder();
-        builder.setEntityResolver(new LocalEntityResolver());
         loader = context.newDocumentLoader(SearchConstants.VIEWS_XMLFILE, 
builder);
 
         // update the store of factories

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

Reply via email to