net.sf.regain.crawler.preparator
Class FilenamePreparator
java.lang.Object
net.sf.regain.crawler.document.AbstractPreparator
net.sf.regain.crawler.preparator.FilenamePreparator
- All Implemented Interfaces:
- Pluggable, Preparator, WriteablePreparator
public class FilenamePreparator
- extends AbstractPreparator
Like EmptyPreparator, but indexes the filename as content.
- Author:
- Benjamin
Methods inherited from class net.sf.regain.crawler.document.AbstractPreparator |
accepts, addAdditionalField, cleanUp, close, concatenateStringParts, getAdditionalFields, getCleanedContent, getCleanedMetaData, getHeadlines, getPath, getPriority, getSummary, getTitle, init, setCleanedContent, setCleanedMetaData, setHeadlines, setPath, setPriority, setSummary, setTitle, setUrlRegex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilenamePreparator
public FilenamePreparator()
prepare
public void prepare(RawDocument rawDocument)
throws RegainException
- Description copied from interface:
Preparator
- Prepares a document for indexing.
- Parameters:
rawDocument
- The document to prepare.
- Throws:
RegainException
- If preparing the document failed.
getName
private static String getName(String filename)
- From: Apache Commons IO
- Parameters:
filename
-
- Returns:
- the file name
indexOfLastSeparator
private static int indexOfLastSeparator(String filename)
Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info