org.pfsw.text
Class MatchGroup

java.lang.Object
  extended by org.pfsw.text.MatchElement
      extended by org.pfsw.text.MatchGroup
All Implemented Interfaces:
java.io.Serializable

public class MatchGroup
extends MatchElement

Represents a group of MatchAttributes and/or MatchGroups

See Also:
Serialized Form

Constructor Summary
MatchGroup()
          Initialize the new instance with default values.
 
Method Summary
protected  void addAll(java.util.Collection<StringPattern> coll, StringPattern[] patternArray)
           
 void addElement(MatchElement element)
          Add the specified element to the group.
protected  void apply(MatchRuleVisitor visitor)
           
protected  void applyDatatypes(java.util.Map<java.lang.String,java.lang.Class<?>> datatypes)
           
protected  boolean doMatch(java.util.Map<java.lang.String,?> dictionary)
           
 int elementCount()
          Returns the current number of elements in this group.
protected  MatchElement getElement(int index)
           
protected  java.util.List<MatchElement> getElements()
           
protected  void ignoreCase(boolean ignoreIt)
           
 void ignoreCaseInName(boolean ignoreIt)
          Defines whether or not the case of characters in attribute names must be ignored.
 boolean isGroup()
          Returns always true, because this is a group.
protected  void multiCharWildcardMatchesEmptyString(boolean yesOrNo)
           
protected  java.util.List<MatchElement> newElementList()
           
protected  void optimize()
           
protected  void optimizeAttribute(int index)
           
protected  void removeElements(int from, int to)
           
protected  void setElements(java.util.List<MatchElement> newValue)
           
 
Methods inherited from class org.pfsw.text.MatchElement
getAnd, getNot, isAttribute, matches, setAnd, setNot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatchGroup

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

Method Detail

addElement

public void addElement(MatchElement element)
Add the specified element to the group. The element will be added at the end of the element list.


isGroup

public boolean isGroup()
Returns always true, because this is a group.

Overrides:
isGroup in class MatchElement

elementCount

public int elementCount()
Returns the current number of elements in this group.


getElement

protected MatchElement getElement(int index)

doMatch

protected boolean doMatch(java.util.Map<java.lang.String,?> dictionary)
Specified by:
doMatch in class MatchElement

ignoreCase

protected void ignoreCase(boolean ignoreIt)
Specified by:
ignoreCase in class MatchElement

ignoreCaseInName

public void ignoreCaseInName(boolean ignoreIt)
Defines whether or not the case of characters in attribute names must be ignored.

Specified by:
ignoreCaseInName in class MatchElement

multiCharWildcardMatchesEmptyString

protected void multiCharWildcardMatchesEmptyString(boolean yesOrNo)
Specified by:
multiCharWildcardMatchesEmptyString in class MatchElement

apply

protected void apply(MatchRuleVisitor visitor)
Specified by:
apply in class MatchElement

applyDatatypes

protected void applyDatatypes(java.util.Map<java.lang.String,java.lang.Class<?>> datatypes)
                       throws MatchRuleException
Specified by:
applyDatatypes in class MatchElement
Throws:
MatchRuleException

optimize

protected void optimize()

optimizeAttribute

protected void optimizeAttribute(int index)

addAll

protected void addAll(java.util.Collection<StringPattern> coll,
                      StringPattern[] patternArray)

removeElements

protected void removeElements(int from,
                              int to)

newElementList

protected java.util.List<MatchElement> newElementList()

getElements

protected java.util.List<MatchElement> getElements()

setElements

protected void setElements(java.util.List<MatchElement> newValue)