org.cogroo.tools.checker
Interface GenericChecker<T>

All Known Subinterfaces:
Checker, TypedChecker
All Known Implementing Classes:
AbstractChecker, AbstractGenericChecker, AbstractTypedChecker, CheckerComposite, GenericCheckerComposite, GovernmentChecker, ParonymChecker, PunctuationChecker, RepetitionChecker, RulesApplier, SpaceChecker, TypedCheckerComposite

public interface GenericChecker<T>

Interface to implement checkers. Checkers should be added to CheckerComposite.


Method Summary
 List<Mistake> check(T sentence)
          Check the sentence for errors.
 String getIdPrefix()
          Each checker should have IDs with a fixed prefix so CheckerComposite can route the ignore message to the correct checker.
 int getPriority()
          Priority of this checker.
 Collection<RuleDefinition> getRulesDefinition()
          Returns the descriptions of the rules implemented by this checker.
 void ignore(String id)
          The checker should ignore the rule with the given id.
 void resetIgnored()
          Reset all ignored rules
 

Method Detail

getIdPrefix

String getIdPrefix()
Each checker should have IDs with a fixed prefix so CheckerComposite can route the ignore message to the correct checker.

Returns:
the id prefix

check

List<Mistake> check(T sentence)
Check the sentence for errors.

Parameters:
sentence - the sentence
Returns:
errors

ignore

void ignore(String id)
The checker should ignore the rule with the given id. IDs of a checker have a fixed prefix.

Parameters:
id - the rule id to be ignored

resetIgnored

void resetIgnored()
Reset all ignored rules


getPriority

int getPriority()
Priority of this checker. The higher is the number the higher is its priority

Returns:
the priority of this checker

getRulesDefinition

Collection<RuleDefinition> getRulesDefinition()
Returns the descriptions of the rules implemented by this checker.

Returns:
a list of descriptions


Copyright © 2012-2013 CoGrOO. All Rights Reserved.