01: /**********************************************************************************
02: *
03: * Copyright (c) 2003, 2004 The Regents of the University of Michigan, Trustees of Indiana University,
04: * Board of Trustees of the Leland Stanford, Jr., University, and The MIT Corporation
05: *
06: * Licensed under the Educational Community License Version 1.0 (the "License");
07: * By obtaining, using and/or copying this Original Work, you agree that you have read,
08: * understand, and will comply with the terms and conditions of the Educational Community License.
09: * You may obtain a copy of the License at:
10: *
11: * http://cvs.sakaiproject.org/licenses/license_1_0.html
12: *
13: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
14: * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
15: * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16: * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18: *
19: **********************************************************************************/package edu.indiana.lib.twinpeaks.search;
20:
21: import java.lang.*;
22: import java.util.*;
23:
24: import org.w3c.dom.*;
25:
26: /**
27: * Search characteristics, all matching items
28: */
29: public interface SearchResultInterface {
30:
31: /**
32: * Save various attributes of the general search request
33: * @param query The QueryBase extension that sent the search request
34: */
35: public void initialize(QueryBase query);
36:
37: /**
38: * Populate the search result list
39: */
40: public void doParse();
41:
42: /**
43: * Fetch the original query text
44: * @return Search string
45: */
46: public String getQuery();
47:
48: /**
49: * Return search results as a String
50: * @return Result Document
51: */
52: public String getSearchResponseString();
53:
54: /**
55: * Return the starting item number for this search (one based)
56: * @return Starting item number
57: */
58: public int getSearchStart();
59:
60: /**
61: * Return the count of matching items found
62: * @return Item count
63: */
64: public int getMatchCount();
65:
66: /**
67: * Fetch the "next preview page" reference (used to paginate results
68: * null if none)
69: * @return Next page reference
70: */
71: public String getNextPreviewPage();
72:
73: /**
74: * Fetch the "previous preview page" reference (used to paginate results,
75: * null if none)
76: * @return Previous page reference
77: */
78: public String getPreviousPreviewPage();
79:
80: /**
81: * Can this display be paginated (next/previous pages for display)?
82: * @return true if so
83: */
84: public boolean canPaginate();
85:
86: /**
87: * Get an iterator to the result list
88: * @return An iterator to the list of matching items
89: */
90: public Iterator iterator();
91: }
|