Source Code Cross Referenced for DummyCrawlerConfig.java in  » Search-Engine » regain » net » sf » regain » crawler » config » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » regain » net.sf.regain.crawler.config 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * regain - A file search engine providing plenty of formats
003:         * Copyright (C) 2004  Til Schneider
004:         *
005:         * This library is free software; you can redistribute it and/or
006:         * modify it under the terms of the GNU Lesser General Public
007:         * License as published by the Free Software Foundation; either
008:         * version 2.1 of the License, or (at your option) any later version.
009:         *
010:         * This library is distributed in the hope that it will be useful,
011:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
012:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013:         * Lesser General Public License for more details.
014:         *
015:         * You should have received a copy of the GNU Lesser General Public
016:         * License along with this library; if not, write to the Free Software
017:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
018:         *
019:         * Contact: Til Schneider, info@murfman.de
020:         *
021:         * CVS information:
022:         *  $RCSfile$
023:         *   $Source$
024:         *     $Date: 2007-10-20 18:22:56 +0200 (Sa, 20 Okt 2007) $
025:         *   $Author: til132 $
026:         * $Revision: 247 $
027:         */
028:        package net.sf.regain.crawler.config;
029:
030:        import java.util.Properties;
031:
032:        /**
033:         * Stellt alle zu konfigurierenden Einstellungen hardcodiert zur Verfügung.
034:         *
035:         * @author Til Schneider, www.murfman.de
036:         */
037:        public class DummyCrawlerConfig implements  CrawlerConfig {
038:
039:            /**
040:             * Gibt den Host-Namen des Proxy-Servers zurück. Wenn kein Host konfiguriert
041:             * wurde, wird <CODE>null</CODE> zurückgegeben.
042:             *
043:             * @return Der Host-Namen des Proxy-Servers.
044:             */
045:            public String getProxyHost() {
046:                return "idatmpsrv";
047:            }
048:
049:            /**
050:             * Gibt den Port des Proxy-Servers zurück. Wenn kein Port konfiguriert wurde,
051:             * wird <CODE>null</CODE> zurückgegeben.
052:             *
053:             * @return Der Port des Proxy-Servers.
054:             */
055:            public String getProxyPort() {
056:                return "3128";
057:            }
058:
059:            /**
060:             * Gibt den Benutzernamen für die Anmeldung beim Proxy-Server zurück. Wenn
061:             * kein Benutzernamen konfiguriert wurde, wird <CODE>null</CODE> zurückgegeben.
062:             *
063:             * @return Der Benutzernamen für die Anmeldung beim Proxy-Server.
064:             */
065:            public String getProxyUser() {
066:                return null;
067:            }
068:
069:            /**
070:             * Gibt das Passwort für die Anmeldung beim Proxy-Server zurück. Wenn kein
071:             * Passwort konfiguriert wurde, wird <CODE>null</CODE> zurückgegeben.
072:             *
073:             * @return Das Passwort für die Anmeldung beim Proxy-Server.
074:             */
075:            public String getProxyPassword() {
076:                return null;
077:            }
078:
079:            // overridden
080:            public String getUserAgent() {
081:                return null;
082:            }
083:
084:            /**
085:             * Gibt den Timeout für HTTP-Downloads zurück. Dieser Wert bestimmt die
086:             * maximale Zeit in Sekunden, die ein HTTP-Download insgesamt dauern darf.
087:             *
088:             * @return Den Timeout für HTTP-Downloads
089:             */
090:            public int getHttpTimeoutSecs() {
091:                return 180;
092:            }
093:
094:            /**
095:             * Gibt zurück, ob URLs geladen werden sollen, die weder durchsucht noch
096:             * indiziert werden.
097:             *
098:             * @return Ob URLs geladen werden sollen, die weder durchsucht noch indiziert
099:             *         werden.
100:             */
101:            public boolean getLoadUnparsedUrls() {
102:                return false;
103:            }
104:
105:            /**
106:             * Gibt zurück, ob ein Suchindex erstellt werden soll.
107:             *
108:             * @return Ob ein Suchindex erstellt werden soll.
109:             */
110:            public boolean getBuildIndex() {
111:                return true;
112:            }
113:
114:            /**
115:             * Gibt das Verzeichnis zurück, in dem der stehen soll.
116:             *
117:             * @return Das Verzeichnis, in dem der Suchindex stehen soll.
118:             */
119:            public String getIndexDir() {
120:                return "c:\\Temp\\searchIndex";
121:            }
122:
123:            /**
124:             * Gibt den zu verwendenden Analyzer-Typ zurück.
125:             *
126:             * @return en zu verwendenden Analyzer-Typ
127:             */
128:            public String getAnalyzerType() {
129:                return "german";
130:            }
131:
132:            // overridden
133:            public int getMaxFieldLength() {
134:                return -1;
135:            }
136:
137:            /**
138:             * Gibt alle Worte zurück, die nicht indiziert werden sollen.
139:             *
140:             * @return Alle Worte, die nicht indiziert werden sollen.
141:             */
142:            public String[] getStopWordList() {
143:                return null;
144:            }
145:
146:            /**
147:             * Gibt alle Worte zurück, die bei der Indizierung nicht vom Analyzer
148:             * verändert werden sollen.
149:             *
150:             * @return Alle Worte, die bei der Indizierung nicht vom Analyzer
151:             *         verändert werden sollen.
152:             */
153:            public String[] getExclusionList() {
154:                return null;
155:            }
156:
157:            /**
158:             * Gibt zurück, ob Analyse-Deteien geschrieben werden sollen.
159:             * <p>
160:             * Diese Dateien helfen, die Qualität der Index-Erstellung zu prüfen und
161:             * werden in einem Unterverzeichnis im Index-Verzeichnis angelegt.
162:             *
163:             * @return Ob Analyse-Deteien geschrieben werden sollen.
164:             */
165:            public boolean getWriteAnalysisFiles() {
166:                return true;
167:            }
168:
169:            /**
170:             * Returns the interval between two breakpoint in minutes. If set to 0, no
171:             * breakpoints will be created.
172:             *
173:             * @return the interval between two breakpoint in minutes.
174:             */
175:            public int getBreakpointInterval() {
176:                return 10;
177:            }
178:
179:            /**
180:             * Gibt den maximalen Prozentsatz von gescheiterten Dokumenten zurück. (0..1)
181:             * <p>
182:             * Ist das Verhälnis von gescheiterten Dokumenten zur Gesamtzahl von
183:             * Dokumenten größer als dieser Prozentsatz, so wird der Index verworfen.
184:             * <p>
185:             * Gescheiterte Dokumente sind Dokumente die es entweder nicht gibt (Deadlink)
186:             * oder die nicht ausgelesen werden konnten.
187:             *
188:             * @return Den maximalen Prozentsatz von gescheiterten Dokumenten zurück.
189:             */
190:            public double getMaxFailedDocuments() {
191:                return 0.1;
192:            }
193:
194:            /**
195:             * Gibt den Namen der Kontrolldatei für erfolgreiche Indexerstellung zurück.
196:             * <p>
197:             * Diese Datei wird erzeugt, wenn der Index erstellt wurde, ohne dass
198:             * fatale Fehler aufgetreten sind.
199:             * <p>
200:             * Wenn keine Kontrolldatei erzeugt werden soll, dann wird <code>null</code>
201:             * zurückgegeben.
202:             *
203:             * @return Der Name der Kontrolldatei für erfolgreiche Indexerstellung
204:             */
205:            public String getFinishedWithoutFatalsFileName() {
206:                return null;
207:            }
208:
209:            /**
210:             * Gibt den Namen der Kontrolldatei für fehlerhafte Indexerstellung zurück.
211:             * <p>
212:             * Diese Datei wird erzeugt, wenn der Index erstellt wurde, wobei
213:             * fatale Fehler aufgetreten sind.
214:             * <p>
215:             * Wenn keine Kontrolldatei erzeugt werden soll, dann wird <code>null</code>
216:             * zurückgegeben.
217:             *
218:             * @return Der Name der Kontrolldatei für fehlerhafte Indexerstellung
219:             */
220:            public String getFinishedWithFatalsFileName() {
221:                return null;
222:            }
223:
224:            /**
225:             * Gibt die StartUrls zurück, bei denen der Crawler-Prozeß beginnen soll.
226:             *
227:             * @return Die StartUrls.
228:             */
229:            public StartUrl[] getStartUrls() {
230:                return new StartUrl[] { new StartUrl(
231:                        "http://www.dm-drogeriemarkt.de/CDA/Home/", true, true),
232:                /*
233:                new StartUrl("http://www.dm-drogeriemarkt.de/CDA/verteilerseite/0,2098,0-15-X,00.html", true, true),
234:                new StartUrl("http://www.dm-drogeriemarkt.de/CDA/verteilerseite/0,1651,0-16-X,00.html", true, true),
235:                new StartUrl("http://www.dm-drogeriemarkt.de/CDA/verteilerseite/0,1651,0-17-X,00.html", true, true),
236:                new StartUrl("http://www.dm-drogeriemarkt.de/CDA/verteilerseite/0,1651,0-18-X,00.html", true, true),
237:                new StartUrl("http://www.dm-drogeriemarkt.de/CDA/verteilerseite/0,1651,0-19-X,00.html", true, true),
238:                new StartUrl("http://www.dm-drogeriemarkt.de/CDA/verteilerseite/0,1651,0-173-X,00.html", true, true)
239:                 */
240:                };
241:            }
242:
243:            /**
244:             * Gibt die UrlPattern zurück, die der HTML-Parser nutzen soll, um URLs zu
245:             * identifizieren.
246:             *
247:             * @return Die UrlPattern für den HTML-Parser.
248:             */
249:            public UrlPattern[] getHtmlParserUrlPatterns() {
250:                return new UrlPattern[] {
251:                        new UrlPattern("=\"([^\"]*\\.html)\"", 1, true, true),
252:                        new UrlPattern("=\"([^\"]*\\.(pdf|xls|doc|rtf|ppt))\"",
253:                                1, false, true),
254:                        new UrlPattern("=\"([^\"]*\\.(js|css|jpg|gif|png))\"",
255:                                1, false, false) };
256:            }
257:
258:            /**
259:             * Gets the black list.
260:             * <p>
261:             * The black list is an array of UrlMatchers, a URLs <i>must not</i> match to,
262:             * in order to be processed.
263:             * 
264:             * @return The black list.
265:             */
266:            public UrlMatcher[] getBlackList() {
267:                return new UrlMatcher[0];
268:            }
269:
270:            /**
271:             * Gets the white list.
272:             * <p>
273:             * The black list is an array of WhiteListEntry, a URLs <i>must</i> match to,
274:             * in order to be processed.
275:             *
276:             * @return Die Weiße Liste
277:             */
278:            public WhiteListEntry[] getWhiteList() {
279:                return new WhiteListEntry[] { new WhiteListEntry(
280:                        new PrefixUrlMatcher("file://"), null) };
281:            }
282:
283:            // overridden
284:            public String[] getValuePrefetchFields() {
285:                return null;
286:            }
287:
288:            /**
289:             * Gibt die regulären Ausdrücke zurück, auf die die URL eines Dokuments passen
290:             * muss, damit anstatt des wirklichen Dokumententitels der Text des Links, der
291:             * auf das Dokument gezeigt hat, als Dokumententitel genutzt wird.
292:             *
293:             * @return Die regulären Ausdrücke, die Dokumente bestimmen, für die der
294:             *         Linktext als Titel genommen werden soll.
295:             */
296:            public String[] getUseLinkTextAsTitleRegexList() {
297:                return null;
298:            }
299:
300:            /**
301:             * Gets the list with the preparator settings.
302:             *
303:             * @return The list with the preparator settings.
304:             */
305:            public PreparatorSettings[] getPreparatorSettingsList() {
306:                return new PreparatorSettings[] {
307:                        new PreparatorSettings(
308:                                true,
309:                                "net.sf.regain.crawler.document.HtmlPreparator",
310:                                null, new PreparatorConfig()),
311:                        new PreparatorSettings(true,
312:                                "net.sf.regain.crawler.document.XmlPreparator",
313:                                null, new PreparatorConfig()) };
314:            }
315:
316:            /**
317:             * Gets the list of the auxiliary fields.
318:             * 
319:             * @return The list of the auxiliary fields. May be null.
320:             */
321:            public AuxiliaryField[] getAuxiliaryFieldList() {
322:                return null;
323:            }
324:
325:            /**
326:             * Gets the class name of the
327:             * {@link net.sf.regain.crawler.access.CrawlerAccessController} to use.
328:             * Returns <code>null</code> if no CrawlerAccessController should be used.
329:             * 
330:             * @return The class name of the CrawlerAccessController. 
331:             */
332:            public String getCrawlerAccessControllerClass() {
333:                return null;
334:            }
335:
336:            /**
337:             * Gets the name of jar file to load the
338:             * {@link net.sf.regain.crawler.access.CrawlerAccessController} from.
339:             * Returns <code>null</code> if the CrawlerAccessController already is in the
340:             * classpath.
341:             * 
342:             * @return The name of jar file to load the CrawlerAccessController from. 
343:             */
344:            public String getCrawlerAccessControllerJar() {
345:                return null;
346:            }
347:
348:            /**
349:             * Gets the configuration of the
350:             * {@link net.sf.regain.crawler.access.CrawlerAccessController}. May be
351:             * <code>null</code>.
352:             * 
353:             * @return The the configuration of the CrawlerAccessController. 
354:             */
355:            public Properties getCrawlerAccessControllerConfig() {
356:                return null;
357:            }
358:
359:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.