org.opensolaris.opengrok.analysis.plain
Class PlainAnalyzer

java.lang.Object
  extended by org.apache.lucene.analysis.Analyzer
      extended by org.opensolaris.opengrok.analysis.FileAnalyzer
          extended by org.opensolaris.opengrok.analysis.plain.PlainAnalyzer
Direct Known Subclasses:
CAnalyzer, CxxAnalyzer, FortranAnalyzer, JavaAnalyzer, LispAnalyzer, ShAnalyzer, SQLAnalyzer, TclAnalyzer

public class PlainAnalyzer
extends FileAnalyzer

Analyzer for plain text files Created on September 21, 2005


Nested Class Summary
 
Nested classes/interfaces inherited from class org.opensolaris.opengrok.analysis.FileAnalyzer
FileAnalyzer.Genre
 
Field Summary
protected  char[] content
           
protected  Definitions defs
           
protected  int len
           
 
Fields inherited from class org.opensolaris.opengrok.analysis.FileAnalyzer
ctags, project
 
Constructor Summary
protected PlainAnalyzer(FileAnalyzerFactory factory)
          Creates a new instance of PlainAnalyzer
 
Method Summary
 void analyze(org.apache.lucene.document.Document doc, java.io.InputStream in)
           
 org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName, java.io.Reader reader)
           
 void writeXref(java.io.Writer out)
          Write a cross referenced HTML file.
 
Methods inherited from class org.opensolaris.opengrok.analysis.FileAnalyzer
getFactory, getGenre, setCtags, writeXref
 
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getPositionIncrementGap, getPreviousTokenStream, reusableTokenStream, setPreviousTokenStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

content

protected char[] content

len

protected int len

defs

protected Definitions defs
Constructor Detail

PlainAnalyzer

protected PlainAnalyzer(FileAnalyzerFactory factory)
Creates a new instance of PlainAnalyzer

Method Detail

analyze

public void analyze(org.apache.lucene.document.Document doc,
                    java.io.InputStream in)
             throws java.io.IOException
Overrides:
analyze in class FileAnalyzer
Throws:
java.io.IOException

tokenStream

public org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName,
                                                          java.io.Reader reader)
Overrides:
tokenStream in class FileAnalyzer

writeXref

public void writeXref(java.io.Writer out)
               throws java.io.IOException
Write a cross referenced HTML file.

Overrides:
writeXref in class FileAnalyzer
Parameters:
out - Writer to write HTML cross-reference
Throws:
java.io.IOException - if an error occurs