com.sun.labs.minion.pipeline
Interface Stage

All Superinterfaces:
com.sun.labs.util.props.Component, com.sun.labs.util.props.Configurable, PipelineStage
All Known Implementing Classes:
BlurbStage, DropNumbersStage, Dropper, HighlightStage, InvFileMemoryPartition, JCCTokenizer, LowerCaseStage, PrintStage, PrintTokenStage, QuestioningStage, ReplacementStage, StageAdapter, StatStage, StemStage, StopWordsStage, TokenCollectorStage, Tokenizer, UniversalTokenizer

public interface Stage
extends com.sun.labs.util.props.Configurable, PipelineStage


Method Summary
 FieldInfo defineField(FieldInfo fi)
          Defines a field into which an application will index data.
 void dump(IndexConfig iC)
          Tells a stage that its data must be dumped to the index.
 void endDocument(long size)
          Processes the event that comes at the end of a document.
 void endField(FieldInfo fi)
          Processes the event that occurs at the end of a field.
 Stage getDownstream()
          Gets the downstream stage of this stage.
 java.lang.String getName()
          Gets the configuration name of this stage.
 void punctuation(Token p)
          Processes some punctuation from further up the pipeline.
 void savedData(java.lang.Object sd)
          Processes saved data from further up the pipeline.
 void setDownstream(Stage s)
          Sets the downstream stage of this stage.
 void shutdown(IndexConfig iC)
          Tells a stage that it needs to shutdown, terminating any processing that it is doing first.
 void startDocument(java.lang.String key)
          Process the event that occurs at the start of a document.
 void startField(FieldInfo fi)
          Processes the event that occurs at the start of a field.
 void text(char[] t, int b, int e)
          Processes some text from further up the pipeline.
 void token(Token t)
          Processes a token from further up the pipeline.
 
Methods inherited from interface com.sun.labs.util.props.Configurable
newProperties
 

Method Detail

getName

java.lang.String getName()
Gets the configuration name of this stage. This information can be gotten from the @link{com.sun.labs.util.prop.PropertySheet#getInstanceName} method from the property sheet that is used to configure the stage in the newProperties method of the Configurable interface.


setDownstream

void setDownstream(Stage s)
Sets the downstream stage of this stage.


getDownstream

Stage getDownstream()
Gets the downstream stage of this stage.


defineField

FieldInfo defineField(FieldInfo fi)
Defines a field into which an application will index data.

Parameters:
fi - The FieldInfo object that describes the field we want defined.
Returns:
A complete field information object, including the ID for the field.

startDocument

void startDocument(java.lang.String key)
Process the event that occurs at the start of a document.

Parameters:
key - The document key for this document.

startField

void startField(FieldInfo fi)
Processes the event that occurs at the start of a field.

Specified by:
startField in interface PipelineStage
Parameters:
fi - The FieldInfo object that describes the field that is starting.

text

void text(char[] t,
          int b,
          int e)
Processes some text from further up the pipeline.

Specified by:
text in interface PipelineStage
Parameters:
t - The text to tokenize.
b - The beginning position in the text buffer.
e - The ending position in the text buffer.

token

void token(Token t)
Processes a token from further up the pipeline.

Parameters:
t - The token to process.

punctuation

void punctuation(Token p)
Processes some punctuation from further up the pipeline.

Parameters:
p - The punctuation to process.

savedData

void savedData(java.lang.Object sd)
Processes saved data from further up the pipeline.

Specified by:
savedData in interface PipelineStage
Parameters:
sd - The data to process.

endField

void endField(FieldInfo fi)
Processes the event that occurs at the end of a field.

Specified by:
endField in interface PipelineStage
Parameters:
fi - The FieldInfo object that describes the field that is ending.

endDocument

void endDocument(long size)
Processes the event that comes at the end of a document.

Parameters:
size - The size of the data that was processed for this file.

dump

void dump(IndexConfig iC)
Tells a stage that its data must be dumped to the index.

Parameters:
iC - The configuration for the index, which can be used to retrieve things like the index directory.

shutdown

void shutdown(IndexConfig iC)
Tells a stage that it needs to shutdown, terminating any processing that it is doing first.

Parameters:
iC - The configuration for the index, which can be used to retrieve things like the index directory.