public void traverse(TraversalListener<Object> observer) {
String searchString = getSearchString();
if (!"".equals(searchString)) {
String searchType = getSearchType();
if ("Title".equals(searchType))
new TitleWikiPageFinder(searchString, observer).search(root);
else {
Pattern regularExpression = Pattern.compile(searchString, CASE_INSENSITIVE + LITERAL);
new RegularExpressionWikiPageFinder(regularExpression, observer).search(root);
}
}