| java.lang.Object com.ecyrd.jspwiki.SearchMatcher
SearchMatcher | public class SearchMatcher (Code) | | SearchMatcher performs the task of matching a search query to a page's
contents. This utility class is isolated to simplify WikiPageProvider
implementations and to offer an easy target for upgrades. The upcoming(?)
TranslatorReader rewrite will presumably invalidate this, among other things.
since: 2.1.5 author: ebu at ecyrd dot com |
Inner Class :public class SearchResultImpl implements SearchResult | |
SearchMatcher | public SearchMatcher(WikiEngine engine, QueryItem[] queries)(Code) | | Creates a new SearchMatcher.
Parameters: engine - The WikiEngine Parameters: queries - A list of queries |
matchPageContent | public SearchResult matchPageContent(String wikiname, String pageText) throws IOException(Code) | | Compares the page content, available through the given stream, to the
query items of this matcher. Returns a search result object describing
the quality of the match.
This method would benefit of regexps (1.4) and streaming. FIXME!
Parameters: wikiname - The name of the page Parameters: pageText - The content of the page A SearchResult item, or null, there are no queries throws: IOException - If reading page content fails |
|
|