source: trunk/src/org/expeditee/greenstone/Query.java@ 312

Last change on this file since 312 was 312, checked in by ra33, 16 years ago

Added search agents for HCI bib tec

File size: 3.1 KB
Line 
1package org.expeditee.greenstone;
2
3import java.util.Vector;
4
5public class Query implements Cloneable
6{
7 private String queryText;
8 private String stemming;
9 private String casefolding;
10 private String maxDocsToReturn;
11 private String sortBy;
12 private String matchMode;
13 private String index;
14 private String firstDoc;
15 private String lastDoc;
16
17 private QueryOutcome queryOutcome;
18
19 public Query()
20 {
21 queryText = "the";
22 stemming = "0";
23 casefolding = "1";
24 maxDocsToReturn = "5";
25 sortBy = "1";
26 matchMode = "all";
27 index = "TX";
28 firstDoc = "0";
29 lastDoc = "0";
30
31 queryOutcome = new QueryOutcome();
32 }
33
34 public Query clone() {
35 try {
36 return (Query)super.clone();
37 }
38 catch (CloneNotSupportedException e) {
39 throw new InternalError(e.toString());
40 }
41 }
42
43 public String toString() {
44 String dump = "\nqueryText\t" + this.queryText + "\nstemming\t" + stemming + "\ncasefolding\t" + casefolding + "\nmaxDocs\t\t" + maxDocsToReturn;
45 dump = dump + "\nsortBy\t\t" + sortBy + "\nmatchMode\t" + matchMode + "\nindex\t\t" + index;
46 dump = dump + "\nfirstDoc\t" + firstDoc + "\nlastDoc\t\t" + lastDoc + "\n";
47
48 return dump + queryOutcome.toString();
49 }
50
51 public void setQueryText(String queryText) {
52 this.queryText = new String(queryText);
53 }
54
55 public void setStemming(String stemming) {
56 this.stemming = new String(stemming);
57 }
58
59 public void setCasefolding(String casefolding) {
60 this.casefolding = new String(casefolding);
61 }
62
63 public void setMaxDocsToReturn(String maxDocsToReturn) {
64 this.maxDocsToReturn = new String(maxDocsToReturn);
65 }
66/*
67 public void setSortBy(String sortBy) {
68 this.sortBy = new String(sortBy);
69 }
70*/
71
72 public void setMatchMode(String matchMode) {
73 this.matchMode = new String(matchMode);
74 }
75
76 public void setIndex(String index) {
77 this.index = new String(index);
78 }
79
80 public void setFirstDoc(String firstDoc) {
81 this.firstDoc = new String(firstDoc);
82 }
83
84 public void setLastDoc(String lastDoc) {
85 this.lastDoc = new String(lastDoc);
86 }
87
88
89 public void addQueryOutcome(QueryOutcome queryOutcome) {
90 this.queryOutcome = queryOutcome;
91 }
92
93
94
95
96 public String getQueryText() {
97 return this.queryText;
98 }
99
100 public String getStemming() {
101 return this.stemming;
102 }
103
104 public String getCasefolding() {
105 return this.casefolding;
106 }
107
108 public String getMaxDocsToReturn() {
109 return this.maxDocsToReturn;
110 }
111
112 public String getSortBy() {
113 return this.sortBy;
114 }
115
116 public String getMatchMode() {
117 return this.matchMode;
118 }
119
120 public String getIndex() {
121 return this.index;
122 }
123
124 public String getFirstDoc() {
125 return this.firstDoc;
126 }
127
128 public String getLastDoc() {
129 return this.lastDoc;
130 }
131
132
133 public QueryOutcome getQueryOutcome() {
134 return this.queryOutcome;
135 }
136}
Note: See TracBrowser for help on using the repository browser.