| java.lang.Object edu.indiana.lib.twinpeaks.search.SearchResultBase
All known Subclasses: edu.indiana.lib.twinpeaks.search.singlesearch.web2.Web2Response,
SearchResultBase | abstract public class SearchResultBase implements SearchResultInterface(Code) | | Result rendering - base class and helpers
|
_searchResponseBytes | protected byte _searchResponseBytes(Code) | | |
_searchResponseDocument | protected Document _searchResponseDocument(Code) | | |
_searchResponseString | protected String _searchResponseString(Code) | | |
SearchResultBase | public SearchResultBase()(Code) | | Constructor
|
addItem | public void addItem(MatchItem item)(Code) | | Add a MatchItem object
Parameters: item - MatchItem to add |
canPaginate | public boolean canPaginate()(Code) | | Can this display be paginated (next/previous pages for display)?
true if so |
expectedNodeCount | public boolean expectedNodeCount(NodeList nodeList, int expected)(Code) | | Verify we have the expected number of Elements in a Node list
Parameters: nodeList - List of collected Elements Parameters: expected - Number of Elements we expect to see true If we have the expected number Elements |
getFullUrl | public String getFullUrl(String baseUrl, String urlFragment)(Code) | | Form a full URL (protocol, server, arguments) from a base URL and
provided parameters
Parameters: baseUrl - The base (or template) URL Parameters: urlFragment - The (possibly) relative URL to be combined with the base A full URL (as a String) |
getFullUrl | public String getFullUrl(String urlFragment)(Code) | | Form a full URL (protocol, server, arguments) from a provided URL
and a previously provided base URL
Parameters: urlFragment - The (possibly) relative URL to be combined with the base A full URL (as a String) |
getImageAttribute | public String getImageAttribute(Element parent, String name)(Code) | | Locate select attribute of the first matching image
Parameters: parent - Parent element (look here for IMG tag) Parameters: name - Attribute name (src, alt, etc) Image name value (null if none) |
getMatchCount | public int getMatchCount()(Code) | | Return the count of matching items returned
Item count |
getNextPreviewPage | public String getNextPreviewPage()(Code) | | Fetch the "next preview page" reference (used to paginate results
null if none)
Next page reference |
getPreviousPreviewPage | public String getPreviousPreviewPage()(Code) | | Fetch the "previous preview page" reference (used to paginate results,
null if none)
Previous page reference |
getQuery | public String getQuery()(Code) | | Fetch the original query text
Search string |
getSearchResponseDocument | public Document getSearchResponseDocument()(Code) | | Return search results as a Document
Result Document |
getSearchResponseString | public String getSearchResponseString()(Code) | | Return search results as a String
Result Document |
getSearchStart | public int getSearchStart()(Code) | | Return the starting item number for this search (one based)
Starting item number |
initialize | public void initialize(QueryBase query)(Code) | | Save various attributes of the general search request
Parameters: query - The QueryBase extension that sent the search request |
iterator | public Iterator iterator()(Code) | | Get an iterator to the result list
SearchResult Iterator |
parseResponse | protected Document parseResponse() throws SearchException(Code) | | Parse the search engine response as HTML.
See initialize() (override as reqired)
Response as a DOM Document |
prependProxy | public String prependProxy(String url, String proxy)(Code) | | Prepend proxy string (if not already present)
Parameters: url - Target URL Parameters: proxy - Proxy specification (Possibly) updated URL string |
saveBaseUrl | public void saveBaseUrl(String url)(Code) | | Save the request URL base (the server portion only)
Parameters: url - Request URL (with or without parameters) |
setNextPreviewPage | public void setNextPreviewPage(String reference)(Code) | | Set the "next preview page" reference
Parameters: reference - Next page reference |
setPreviousPreviewPage | public void setPreviousPreviewPage(String reference)(Code) | | Set the "previous preview page" reference
Parameters: reference - Previous page reference |
setSearchStart | public void setSearchStart(int start)(Code) | | Set the starting item number for this search (one based)
Parameters: start - Starting item number |
setSearchStart | public void setSearchStart(String start)(Code) | | Set the starting item number for this search (one based)
Parameters: start - Starting item number |
toArray | public MatchItem[] toArray()(Code) | | Return the MatchItem list as a simple array
MatchItem array |
|
|