| 
Regain 2.1.0-STABLE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.regain.crawler.config.XmlCrawlerConfig
public class XmlCrawlerConfig
Liest die konfigurierenden Einstellungen aus einer XML-Datei und stellt sie zur Verfᅵgung.
| Field Summary | |
|---|---|
private  String | 
mAnalyzerType
Der zu verwendende Analyzer-Typ.  | 
private  AuxiliaryField[] | 
mAuxiliaryFieldArr
The list of the auxiliary fields.  | 
private  UrlMatcher[] | 
mBlackList
The black list.  | 
private  int | 
mBreakpointInterval
The interval between two breakpoint in minutes.  | 
private  boolean | 
mBuildIndex
Gibt an, ob ein Suchindex erstellt werden soll.  | 
private  String | 
mCrawlerAccessControllerClass
The class name of the CrawlerAccessController to use.  | 
private  Properties | 
mCrawlerAccessControllerConfig
The configuration of the CrawlerAccessController.  | 
private  String | 
mCrawlerAccessControllerJar
The name of jar file to load the CrawlerAccessController from.  | 
private  PreparatorSettings[] | 
mCrawlerPluginSettingsArr
The list with the crawler plugin settings.  | 
private  String[] | 
mExclusionList
Enthᅵlt alle Worte, die bei der Indizierung nicht vom Analyzer verändert werden sollen.  | 
private  String | 
mFinishedWithFatalsFileName
Der Name der Kontrolldatei fᅵr fehlerhafte Indexerstellung.  | 
private  String | 
mFinishedWithoutFatalsFileName
Der Nam der Kontrolldatei fᅵr erfolgreiche Indexerstellung.  | 
private  UrlPattern[] | 
mHtmlParserUrlPatterns
Die UrlPattern, die der HTML-Parser nutzen soll, um URLs zu identifizieren.  | 
private  int | 
mHttpTimeoutSecs
Der Timeout fᅵr HTTP-Downloads.  | 
private  String | 
mIndexDir
Das Verzeichnis, in dem der Suchindex stehen soll.  | 
private  boolean | 
mLoadUnparsedUrls
Gibt an, ob URLs geladen werden sollen, die weder durchsucht noch indiziert werden.  | 
private  int | 
mMaxCycleCount
The maximum count of equal occurences of path-parts in an URI.  | 
private  double | 
mMaxFailedDocuments
Der maximale Prozentsatz von gescheiterten Dokumenten (0..100), der fᅵr die Freigabe eines Index toleriert wird.  | 
private  int | 
mMaxFieldLength
The maximum number of terms per document.  | 
private  int | 
mMaxSummaryLength
The maximum amount of characters which will be copied from content to summary  | 
private  PreparatorSettings[] | 
mPreparatorSettingsArr
The list with the preparator settings.  | 
private  String | 
mProxyHost
Der Host-Namen des Proxy-Servers.  | 
private  String | 
mProxyPassword
Das Passwort fᅵr die Anmeldung beim Proxy-Server.  | 
private  String | 
mProxyPort
Der Port des Proxy-Servers.  | 
private  String | 
mProxyUser
Der Benutzernamen fᅵr die Anmeldung beim Proxy-Server.  | 
private  StartUrl[] | 
mStartUrls
Die StartUrls.  | 
private  String[] | 
mStopWordList
List of all stop words (words which will not be indexed).  | 
private  String[] | 
mURLCleaners
 | 
private  String[] | 
mUseLinkTextAsTitleRegexList
Die regulᅵren Ausdrᅵcke, auf die die URL eines Dokuments passen muss, damit anstatt des wirklichen Dokumententitels der Text des Links, der auf das Dokument gezeigt hat, als Dokumententitel genutzt wird.  | 
private  String | 
mUserAgent
The user agent the crawler should in order to identify at the HTTP server(s).  | 
private  String[] | 
mValuePrefetchFields
The names of the fields to prefetch the destinct values for.  | 
private  WhiteListEntry[] | 
mWhiteListEntryArr
The white list.  | 
private  boolean | 
mWriteAnalysisFiles
Gibt an, ob Analyse-Deteien geschrieben werden sollen.  | 
private  boolean | 
storeContentForPreview
Flag for enabling/disabling content for a preview in the result page  | 
| Constructor Summary | |
|---|---|
XmlCrawlerConfig(File xmlFile)
Erzeugt eine neue XmlConfiguration-Instanz.  | 
|
| Method Summary | |
|---|---|
 String | 
getAnalyzerType()
Gibt den zu verwendenden Analyzer-Typ zurück.  | 
 AuxiliaryField[] | 
getAuxiliaryFieldList()
Gets the list of the auxiliary fields.  | 
 UrlMatcher[] | 
getBlackList()
Gets the black list.  | 
 int | 
getBreakpointInterval()
Returns the interval between two breakpoint in minutes.  | 
 boolean | 
getBuildIndex()
Gibt zurück, ob ein Suchindex erstellt werden soll.  | 
 String | 
getCrawlerAccessControllerClass()
Gets the class name of the CrawlerAccessController to use. | 
 Properties | 
getCrawlerAccessControllerConfig()
Gets the configuration of the CrawlerAccessController. | 
 String | 
getCrawlerAccessControllerJar()
Gets the name of jar file to load the CrawlerAccessController from. | 
 PreparatorSettings[] | 
getCrawlerPluginSettingsList()
Gets the list with the crawler plugin settings.  | 
 String[] | 
getExclusionList()
Gibt alle Worte zurück, die bei der Indizierung nicht vom Analyzer verändert werden sollen.  | 
 String | 
getFinishedWithFatalsFileName()
Gibt den Namen der Kontrolldatei fᅵr fehlerhafte Indexerstellung zurück.  | 
 String | 
getFinishedWithoutFatalsFileName()
Gibt den Namen der Kontrolldatei fᅵr erfolgreiche Indexerstellung zurück.  | 
 UrlPattern[] | 
getHtmlParserUrlPatterns()
Gibt die UrlPattern zurück, die der HTML-Parser nutzen soll, um URLs zu identifizieren.  | 
 int | 
getHttpTimeoutSecs()
Gibt den Timeout fᅵr HTTP-Downloads zurück.  | 
 String | 
getIndexDir()
Gibt das Verzeichnis zurück, in dem der Suchindex am Ende stehen soll.  | 
 boolean | 
getLoadUnparsedUrls()
Gibt zurück, ob URLs geladen werden sollen, die weder durchsucht noch indiziert werden.  | 
 int | 
getMaxCycleCount()
Returns the maximum count of equal occurences of path-parts in an URI.  | 
 double | 
getMaxFailedDocuments()
Gibt den maximalen Prozentsatz von gescheiterten Dokumenten zurück. (0..1) Ist das Verhᅵlnis von gescheiterten Dokumenten zur Gesamtzahl von Dokumenten grᅵᅵer als dieser Prozentsatz, so wird der Index verworfen.  | 
 int | 
getMaxFieldLength()
Returns the maximum number of terms that will be indexed for a single field in a document.  | 
 int | 
getMaxSummaryLength()
Returns maximum amount of characters which will be copied from content to summary  | 
 PreparatorSettings[] | 
getPreparatorSettingsList()
Gets the list with the preparator settings.  | 
 String | 
getProxyHost()
Gibt den Host-Namen des Proxy-Servers zurück.  | 
 String | 
getProxyPassword()
Gibt das Passwort fᅵr die Anmeldung beim Proxy-Server zurück.  | 
 String | 
getProxyPort()
Gibt den Port des Proxy-Servers zurück.  | 
 String | 
getProxyUser()
Gibt den Benutzernamen fᅵr die Anmeldung beim Proxy-Server zurück.  | 
 StartUrl[] | 
getStartUrls()
Gibt die StartUrls zurück, bei denen der Crawler-Prozeß beginnen soll.  | 
 String[] | 
getStopWordList()
Gibt alle Worte zurück, die nicht indiziert werden sollen.  | 
 boolean | 
getStoreContentForPreview()
Returns the flag for enabling/disabling the content-preview  | 
 String[] | 
getUntokenizedFieldNames()
Returns the names of the fields that shouldn't be tokenized.  | 
 String[] | 
getURLCleaners()
Returns the URLCleaners.  | 
 String[] | 
getUseLinkTextAsTitleRegexList()
Gibt die regulᅵren Ausdrᅵcke zurück, auf die die URL eines Dokuments passen muss, damit anstatt des wirklichen Dokumententitels der Text des Links, der auf das Dokument gezeigt hat, als Dokumententitel genutzt wird.  | 
 String | 
getUserAgent()
Returns the user agent the crawler should in order to identify at the HTTP server(s).  | 
 String[] | 
getValuePrefetchFields()
The names of the fields to prefetch the destinct values for.  | 
 WhiteListEntry[] | 
getWhiteList()
Gets the white list.  | 
 boolean | 
getWriteAnalysisFiles()
Gibt zurück, ob Analyse-Deteien geschrieben werden sollen.  | 
private  void | 
readAuxiliaryFieldList(org.w3c.dom.Node config)
Reads the list of auxiliary fields.  | 
private  void | 
readBlackList(org.w3c.dom.Node config)
Reads the black list from the configuration.  | 
private  void | 
readControlFileConfig(org.w3c.dom.Node config)
Liest die Namen der Kontrolldateien aus der Konfiguration.  | 
private  void | 
readCrawlerAccessController(org.w3c.dom.Node config)
Reads which CrawlerAccessController to use.  | 
private  void | 
readCrawlerPluginConfigSettingsList(org.w3c.dom.Node config,
                                    File xmlFile)
Reads the list of crawler plugin settings.  | 
private  void | 
readHtmlParserUrlPatterns(org.w3c.dom.Node config)
Reads the URL-patterns for the old HTML-parser from the config.  | 
private  void | 
readHttpTimeoutSecs(org.w3c.dom.Element config)
Liest den Timeout fᅵr HTTP-Downloads aus der Konfiguration.  | 
private  void | 
readIndexConfig(org.w3c.dom.Node config)
Liest die Einstellungen aus der Konfiguration, die den Suchindex betreffen.  | 
private  void | 
readLoadUnparsedUrls(org.w3c.dom.Element config)
Liest aus der Konfiguration, ob Dokumente geladen werden sollen, die weder indiziert, noch auf URLs durchsucht werden.  | 
private  void | 
readMaxCycleCount(org.w3c.dom.Element config)
Read the value for the cycle detection.  | 
private  void | 
readMaxSummaryLength(org.w3c.dom.Element config)
Read the value for the cycle detection.  | 
private  PreparatorConfig | 
readPreparatorConfig(org.w3c.dom.Node prepConfig,
                     File xmlFile,
                     String className)
Reads the configuration of a preparator from a node.  | 
private  void | 
readPreparatorSettingsList(org.w3c.dom.Node config,
                           File xmlFile)
Reads the list of preparator settings.  | 
private  void | 
readProxyConfig(org.w3c.dom.Node config)
Liest die Proxy-Einstellungen aus der Konfiguration.  | 
private  org.apache.regexp.RE | 
readRegexChild(org.w3c.dom.Node node)
Reads the regex child node from a node.  | 
private  void | 
readStartUrls(org.w3c.dom.Node config)
Liest die Start-URLs aus der Konfiguration.  | 
private  void | 
readURLCleaner(org.w3c.dom.Element config)
Read the URLCleaners from config.  | 
private  void | 
readUseLinkTextAsTitleRegexList(org.w3c.dom.Node config)
Liest die Liste der regulᅵren Ausdrᅵcke aus der Konfiguration, auf die die URL eines Dokuments passen muss, damit anstatt des wirklichen Dokumententitels der Text des Links, der auf das Dokument gezeigt hat, als Dokumententitel genutzt wird.  | 
private  void | 
readUserAgent(org.w3c.dom.Element config)
Reads the user agent from the config.  | 
private  void | 
readWhiteList(org.w3c.dom.Node config)
Reads the white list from the configuration.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private String mProxyHost
private String mProxyPort
private String mProxyUser
private String mProxyPassword
private String mUserAgent
private boolean mLoadUnparsedUrls
private boolean mBuildIndex
private int mHttpTimeoutSecs
private String mIndexDir
private int mMaxFieldLength
private int mMaxCycleCount
private String mAnalyzerType
private String[] mStopWordList
private String[] mExclusionList
private boolean mWriteAnalysisFiles
private int mBreakpointInterval
private double mMaxFailedDocuments
private String mFinishedWithoutFatalsFileName
private String mFinishedWithFatalsFileName
private StartUrl[] mStartUrls
private UrlPattern[] mHtmlParserUrlPatterns
private UrlMatcher[] mBlackList
private WhiteListEntry[] mWhiteListEntryArr
private String[] mValuePrefetchFields
private String[] mUseLinkTextAsTitleRegexList
private PreparatorSettings[] mPreparatorSettingsArr
private PreparatorSettings[] mCrawlerPluginSettingsArr
private AuxiliaryField[] mAuxiliaryFieldArr
private String mCrawlerAccessControllerClass
private String mCrawlerAccessControllerJar
private Properties mCrawlerAccessControllerConfig
private int mMaxSummaryLength
private boolean storeContentForPreview
private String[] mURLCleaners
| Constructor Detail | 
|---|
public XmlCrawlerConfig(File xmlFile)
                 throws RegainException
xmlFile - Die XML-Datei, aus der die Konfiguration gelesen werden soll.
RegainException - Falls die Konfiguration nicht korrekt gelesen werden
         konnte.| Method Detail | 
|---|
private void readURLCleaner(org.w3c.dom.Element config)
                     throws RegainException
config - 
RegainException
private void readMaxCycleCount(org.w3c.dom.Element config)
                        throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readLoadUnparsedUrls(org.w3c.dom.Element config)
                           throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readHttpTimeoutSecs(org.w3c.dom.Element config)
                          throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readUserAgent(org.w3c.dom.Element config)
                    throws RegainException
config - The configuration to read from.
RegainException - If the configuration has an error.
private void readProxyConfig(org.w3c.dom.Node config)
                      throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readIndexConfig(org.w3c.dom.Node config)
                      throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readControlFileConfig(org.w3c.dom.Node config)
                            throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readStartUrls(org.w3c.dom.Node config)
                    throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readHtmlParserUrlPatterns(org.w3c.dom.Node config)
                                throws RegainException
Diese werden beim durchsuchen eines HTML-Dokuments dazu verwendet, URLs zu identifizieren.
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readBlackList(org.w3c.dom.Node config)
                    throws RegainException
Documents that have an URL that matches to one entry of the black list, won't be processed.
config - The configuration to read from.
RegainException - If the configuration has an error.
private void readWhiteList(org.w3c.dom.Node config)
                    throws RegainException
Documents will only be processed if their URL matches to one entry from the white list.
config - The configuration to read from.
RegainException - If the configuration has an error.
private void readUseLinkTextAsTitleRegexList(org.w3c.dom.Node config)
                                      throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.
private void readPreparatorSettingsList(org.w3c.dom.Node config,
                                        File xmlFile)
                                 throws RegainException
config - The configuration to read fromxmlFile - The file the configuration was read from.
RegainException - If the configuration has errors.
private void readCrawlerPluginConfigSettingsList(org.w3c.dom.Node config,
                                                 File xmlFile)
                                          throws RegainException
config - The configuration to read fromxmlFile - The file the configuration was read from.
RegainException - If the configuration has errors.
private void readAuxiliaryFieldList(org.w3c.dom.Node config)
                             throws RegainException
config - The configuration to read from
RegainException - If the configuration has errors.
private org.apache.regexp.RE readRegexChild(org.w3c.dom.Node node)
                                     throws RegainException
node - The node to read the regex node from
RegainException - If there is no regular expression or if the regex
         could not be compiled.
private PreparatorConfig readPreparatorConfig(org.w3c.dom.Node prepConfig,
                                              File xmlFile,
                                              String className)
                                       throws RegainException
prepConfig - The node to read the preparator config from.xmlFile - The file the configuration was read from.className - The class name of the preparator.
RegainException - If the configuration has errors.
private void readCrawlerAccessController(org.w3c.dom.Node config)
                                  throws RegainException
config - The configuration to read from.
RegainException - If the configuration has errors.public String getProxyHost()
null zurückgegeben.
getProxyHost in interface CrawlerConfigpublic String getProxyPort()
null zurückgegeben.
getProxyPort in interface CrawlerConfigpublic String getProxyUser()
null zurückgegeben.
getProxyUser in interface CrawlerConfigpublic String getProxyPassword()
null zurückgegeben.
getProxyPassword in interface CrawlerConfigpublic String getUserAgent()
CrawlerConfig
getUserAgent in interface CrawlerConfigpublic int getHttpTimeoutSecs()
getHttpTimeoutSecs in interface CrawlerConfigpublic boolean getLoadUnparsedUrls()
getLoadUnparsedUrls in interface CrawlerConfigpublic boolean getBuildIndex()
getBuildIndex in interface CrawlerConfigpublic String getIndexDir()
getIndexDir in interface CrawlerConfigpublic String getAnalyzerType()
getAnalyzerType in interface CrawlerConfigpublic int getMaxFieldLength()
CrawlerConfigIs <= 0 if lucene's default should be used.
getMaxFieldLength in interface CrawlerConfigpublic String[] getStopWordList()
getStopWordList in interface CrawlerConfigpublic String[] getExclusionList()
getExclusionList in interface CrawlerConfigpublic boolean getWriteAnalysisFiles()
Diese Dateien helfen, die Qualitᅵt der Index-Erstellung zu prüfen und werden in einem Unterverzeichnis im Index-Verzeichnis angelegt.
getWriteAnalysisFiles in interface CrawlerConfigpublic int getBreakpointInterval()
getBreakpointInterval in interface CrawlerConfigpublic double getMaxFailedDocuments()
Ist das Verhᅵlnis von gescheiterten Dokumenten zur Gesamtzahl von Dokumenten grᅵᅵer als dieser Prozentsatz, so wird der Index verworfen.
Gescheiterte Dokumente sind Dokumente die es entweder nicht gibt (Deadlink) oder die nicht ausgelesen werden konnten.
getMaxFailedDocuments in interface CrawlerConfigpublic String getFinishedWithoutFatalsFileName()
Diese Datei wird erzeugt, wenn der Index erstellt wurde, ohne dass fatale Fehler aufgetreten sind.
 Wenn keine Kontrolldatei erzeugt werden soll, dann wird null
 zurückgegeben.
getFinishedWithoutFatalsFileName in interface CrawlerConfigpublic String getFinishedWithFatalsFileName()
Diese Datei wird erzeugt, wenn der Index erstellt wurde, wobei fatale Fehler aufgetreten sind.
 Wenn keine Kontrolldatei erzeugt werden soll, dann wird null
 zurückgegeben.
getFinishedWithFatalsFileName in interface CrawlerConfigpublic boolean getStoreContentForPreview()
getStoreContentForPreview in interface CrawlerConfigpublic StartUrl[] getStartUrls()
getStartUrls in interface CrawlerConfigpublic UrlPattern[] getHtmlParserUrlPatterns()
getHtmlParserUrlPatterns in interface CrawlerConfigpublic UrlMatcher[] getBlackList()
The black list is an array of UrlMatchers, a URLs must not match to, in order to be processed.
getBlackList in interface CrawlerConfigpublic WhiteListEntry[] getWhiteList()
The black list is an array of WhiteListEntry, a URLs must match to, in order to be processed.
getWhiteList in interface CrawlerConfigpublic String[] getValuePrefetchFields()
CrawlerConfigUsed for speeding up the search:input_fieldlist tag.
getValuePrefetchFields in interface CrawlerConfigpublic String[] getUseLinkTextAsTitleRegexList()
getUseLinkTextAsTitleRegexList in interface CrawlerConfigpublic PreparatorSettings[] getPreparatorSettingsList()
getPreparatorSettingsList in interface CrawlerConfigpublic PreparatorSettings[] getCrawlerPluginSettingsList()
getCrawlerPluginSettingsList in interface CrawlerConfigpublic AuxiliaryField[] getAuxiliaryFieldList()
getAuxiliaryFieldList in interface CrawlerConfigpublic String getCrawlerAccessControllerClass()
CrawlerAccessController to use.
 Returns null if no CrawlerAccessController should be used.
getCrawlerAccessControllerClass in interface CrawlerConfigpublic String getCrawlerAccessControllerJar()
CrawlerAccessController from.
 Returns null if the CrawlerAccessController already is in the
 classpath.
getCrawlerAccessControllerJar in interface CrawlerConfigpublic Properties getCrawlerAccessControllerConfig()
CrawlerAccessController. May be
 null.
getCrawlerAccessControllerConfig in interface CrawlerConfigpublic int getMaxCycleCount()
getMaxCycleCount in interface CrawlerConfigpublic int getMaxSummaryLength()
getMaxSummaryLength in interface CrawlerConfig
private void readMaxSummaryLength(org.w3c.dom.Element config)
                           throws RegainException
config - Die Konfiguration, aus der gelesen werden soll.
RegainException - Wenn die Konfiguration fehlerhaft ist.public String[] getUntokenizedFieldNames()
getUntokenizedFieldNames in interface CrawlerConfigpublic String[] getURLCleaners()
getURLCleaners in interface CrawlerConfig
  | 
Regain 2.1.0-STABLE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||