org.pfsw.text
Interface MatchRuleVisitor

All Known Implementing Classes:
LdapMatchRuleVisitor, MatchRulePrinter, SqlMatchRuleVisitor

public interface MatchRuleVisitor

Implementers of this interface can be used with MatchRule.apply() to navigate through the parsed rule tree and execute specific tasks on the elements.


Method Summary
 void attribute(java.lang.String name, MatchRuleCompareOperator compareOperator, java.lang.String[] values, boolean andOperator, boolean notOperator)
          This method will be called for each attribute.
 void endGroup()
          This method will be called for each group end occurence.
 void startGroup(boolean andOperator, boolean notOperator)
          This method will be called for each start of a new group.
 void walkThroughFinished()
          This method will be called when the MatchRule has finished to walk through its elements.
 void walkThroughInit()
          This method will be called right before the MatchRule walks through its elements.
 

Method Detail

walkThroughInit

void walkThroughInit()
This method will be called right before the MatchRule walks through its elements.


walkThroughFinished

void walkThroughFinished()
This method will be called when the MatchRule has finished to walk through its elements.


startGroup

void startGroup(boolean andOperator,
                boolean notOperator)
This method will be called for each start of a new group.

Parameters:
andOperator - If true it is an AND combination otherwise it is OR
notOperator - Is only true for a NOT operation

endGroup

void endGroup()
This method will be called for each group end occurence.


attribute

void attribute(java.lang.String name,
               MatchRuleCompareOperator compareOperator,
               java.lang.String[] values,
               boolean andOperator,
               boolean notOperator)
This method will be called for each attribute.

Parameters:
name - The attribute's name
compareOperator - The operator used to compare values
values - All values the attribute my match (implicit OR combination !)
andOperator - If true it is an AND combination otherwise it is OR
notOperator - Is only true for a NOT operation