source: trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/QueryHistoryItem.java@ 2275

Last change on this file since 2275 was 2275, checked in by daven, 23 years ago

updated QueryHistory to include options (stemming) and to display them..
however there is a screen real estate problem :-(
But checking in the underlying support anyway. Will sort out display soon.

  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1
2/*
3 * QueryHistoryItem.java
4 * Copyright (C) 2001 New Zealand Digital Library Project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21
22package org.nzdl.gsdl.SimpleGraphicalClient;
23
24import java.io.*;
25import java.util.*;
26
27public class QueryHistoryItem extends Object
28{
29
30 private Date date;
31 private String user; // should be a Person object
32 private Query query;
33 private String collectionName;
34 private long numOfHits;
35 private String queryType; // boolean or ranked
36 private boolean stemmed;
37 private boolean caseMatched;
38
39 // time
40 // person
41 // etc
42
43 public QueryHistoryItem(Query newQuery, Date newDate, String newCollectionName, String newUser, long newNumOfHits, String newQueryType, boolean newStemmed, boolean newCaseMatched) {
44 query = newQuery;
45 date = newDate;
46 user = newUser;
47 collectionName = newCollectionName;
48 numOfHits = newNumOfHits;
49 queryType = newQueryType;
50 stemmed = newStemmed;
51 caseMatched = newCaseMatched;
52 }
53
54 public String getCollectionName() {
55 return collectionName;
56 }
57
58 public String getUser() {
59 return user;
60 }
61
62 public Query getQuery() {
63 return query;
64 }
65
66 public Date getDate() {
67 return date;
68 }
69
70 public long getNumOfHits() {
71 return numOfHits;
72 }
73
74 public String getQueryType() {
75 return queryType;
76 }
77
78 public boolean getStemmed() {
79 return stemmed;
80 }
81
82 public boolean getCaseMatched() {
83 return caseMatched;
84 }
85
86 public String toString () {
87 return( user + " " + date + " " + collectionName +" terms");
88 }
89
90
91} //end QueryHistoryItem class
Note: See TracBrowser for help on using the repository browser.