org.pfsw.text
Class MatchElement

java.lang.Object
  extended by org.pfsw.text.MatchElement
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MatchAttribute, MatchGroup

public abstract class MatchElement
extends java.lang.Object
implements java.io.Serializable

Implements all common state and behavior of elements in a match rule.

See Also:
Serialized Form

Constructor Summary
MatchElement()
          Initialize the new instance with default values.
 
Method Summary
protected abstract  void apply(MatchRuleVisitor visitor)
           
protected abstract  void applyDatatypes(java.util.Map<java.lang.String,java.lang.Class<?>> datatypes)
           
protected abstract  boolean doMatch(java.util.Map<java.lang.String,?> dictionary)
           
 boolean getAnd()
           
 boolean getNot()
           
protected abstract  void ignoreCase(boolean ignoreIt)
           
protected abstract  void ignoreCaseInName(boolean newValue)
           
 boolean isAttribute()
           
 boolean isGroup()
           
 boolean matches(java.util.Map<java.lang.String,?> dictionary)
          Returns true, if the attributes and their values in the given dictionary comply to the rules of the receiver.
protected abstract  void multiCharWildcardMatchesEmptyString(boolean yesOrNo)
           
 void setAnd(boolean newValue)
           
 void setNot(boolean newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatchElement

public MatchElement()
Initialize the new instance with default values.

Method Detail

getAnd

public boolean getAnd()

setAnd

public void setAnd(boolean newValue)

getNot

public boolean getNot()

setNot

public void setNot(boolean newValue)

matches

public boolean matches(java.util.Map<java.lang.String,?> dictionary)
Returns true, if the attributes and their values in the given dictionary comply to the rules of the receiver.

Parameters:
dictionary - The attribute-value pairs that have to be checked against the rules

isGroup

public boolean isGroup()

isAttribute

public boolean isAttribute()

multiCharWildcardMatchesEmptyString

protected abstract void multiCharWildcardMatchesEmptyString(boolean yesOrNo)

doMatch

protected abstract boolean doMatch(java.util.Map<java.lang.String,?> dictionary)

ignoreCaseInName

protected abstract void ignoreCaseInName(boolean newValue)

ignoreCase

protected abstract void ignoreCase(boolean ignoreIt)

apply

protected abstract void apply(MatchRuleVisitor visitor)

applyDatatypes

protected abstract void applyDatatypes(java.util.Map<java.lang.String,java.lang.Class<?>> datatypes)
                                throws MatchRuleException
Throws:
MatchRuleException