ca.quine.jcommons.freemind.maputil
Class SearchNodeApplicator

java.lang.Object
  |
  +--ca.quine.jcommons.freemind.maputil.SearchNodeApplicator
All Implemented Interfaces:
INodeApplicator

public class SearchNodeApplicator
extends Object
implements INodeApplicator


Field Summary
static int SEARCH_CONTAINS
          Find all Nodes which have text that contains the given search text.
static int SEARCH_EXACT_MATCH
          Find all Nodes which have text that equals the given search text.
static int SEARCH_REGEXP
          Find all Nodes which have text that matches the given regex.
 
Fields inherited from interface ca.quine.jcommons.freemind.maputil.INodeApplicator
SEARCH_CONTINUE, SEARCH_STOP, SEARCH_TRIM
 
Constructor Summary
SearchNodeApplicator(int searchType, String searchText)
          Creates a new SearchNodeApplicator with the given searchType and searchText.
 
Method Summary
 int apply(Node parentNode, Node node)
           
 ArrayList getMatchedNodes()
          Returns the list of Nodes that were found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEARCH_CONTAINS

public static final int SEARCH_CONTAINS
Find all Nodes which have text that contains the given search text.

See Also:
Constant Field Values

SEARCH_EXACT_MATCH

public static final int SEARCH_EXACT_MATCH
Find all Nodes which have text that equals the given search text.

See Also:
Constant Field Values

SEARCH_REGEXP

public static final int SEARCH_REGEXP
Find all Nodes which have text that matches the given regex.

See Also:
Constant Field Values
Constructor Detail

SearchNodeApplicator

public SearchNodeApplicator(int searchType,
                            String searchText)
Creates a new SearchNodeApplicator with the given searchType and searchText.

Parameters:
searchType - one of SEARCH_CONTAINS, SEARCH_EXACT_MATCH or SEARCH_REGEXP
searchText - the text (or regex) to search for
Method Detail

apply

public int apply(Node parentNode,
                 Node node)
Specified by:
apply in interface INodeApplicator

getMatchedNodes

public ArrayList getMatchedNodes()
Returns the list of Nodes that were found.

Returns:
an ArrayList of Nodes.