Package org.terrier.terms
Class BaseTermPipelineAccessor
- java.lang.Object
-
- org.terrier.terms.BaseTermPipelineAccessor
-
- All Implemented Interfaces:
TermPipeline
,TermPipelineAccessor
public class BaseTermPipelineAccessor extends java.lang.Object implements TermPipeline, TermPipelineAccessor
A base implementation for TermPipelineAccessor- Since:
- 3.0
- Author:
- Craig Macondald
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
logger
static java.lang.String
NAMESPACE_PIPELINE
The default namespace for TermPipeline modules to be loaded fromprotected java.lang.String
pipelineOutput
This class is used as a TermPipelineAccessor, and this variable stores the result of the TermPipeline run for that term.
-
Constructor Summary
Constructors Constructor Description BaseTermPipelineAccessor(java.lang.String... pipes)
Construct a term pipeline using the specified class names
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
pipelineTerm(java.lang.String t)
A term pipeline accessorvoid
processTerm(java.lang.String t)
Make this object a term pipeline implementor.boolean
reset()
This method implements the specific rest option needed to implements query or doc oriented policy.boolean
resetPipeline()
Reset all the pipeline.
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
NAMESPACE_PIPELINE
public static final java.lang.String NAMESPACE_PIPELINE
The default namespace for TermPipeline modules to be loaded from- See Also:
- Constant Field Values
-
pipelineOutput
protected java.lang.String pipelineOutput
This class is used as a TermPipelineAccessor, and this variable stores the result of the TermPipeline run for that term.
-
-
Method Detail
-
processTerm
public void processTerm(java.lang.String t)
Make this object a term pipeline implementor.- Specified by:
processTerm
in interfaceTermPipeline
- Parameters:
t
- String the term to process.- See Also:
TermPipeline
-
reset
public boolean reset()
This method implements the specific rest option needed to implements query or doc oriented policy.- Specified by:
reset
in interfaceTermPipeline
- Returns:
- results of the operation
-
pipelineTerm
public java.lang.String pipelineTerm(java.lang.String t)
A term pipeline accessor- Specified by:
pipelineTerm
in interfaceTermPipelineAccessor
- Parameters:
t
- String the term to process.- Returns:
- String the processed term.
-
resetPipeline
public boolean resetPipeline()
Reset all the pipeline.- Specified by:
resetPipeline
in interfaceTermPipelineAccessor
- Returns:
- return how the reset operation has gone over all the stage
-
-