source: main/trunk/greenstone2/runtime-src/src/recpt/queryaction.h@ 23378

Last change on this file since 23378 was 23378, checked in by kjdon, 13 years ago

removed search_single_collection as its the same as the one in basequeryaction. Also, reordered code in search_multiple_collection so that its a bit easier to understand

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1/**********************************************************************
2 *
3 * queryaction.h --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
6 * A component of the Greenstone digital library software
7 * from the New Zealand Digital Library Project at the
8 * University of Waikato, New Zealand.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 *********************************************************************/
25
26
27#ifndef QUERYACTION_H
28#define QUERYACTION_H
29
30#include "gsdlconf.h"
31#include "basequeryaction.h"
32#include "receptionist.h"
33
34
35class queryaction : public basequeryaction {
36
37protected:
38 text_t m_strUseInterfaceLanguageForQuery;
39 text_t formatstring;
40 text_tmap reqfields; // required fields
41 int num_phrases;
42
43 virtual text_t query_filter_name () {return "QueryFilter";}
44
45 virtual void define_query_macros (cgiargsclass &args, displayclass &disp,
46 int numDocs, isapprox isApprox);
47
48 virtual void get_formatted_query_string (text_t &formattedstring,
49 bool segment,
50 cgiargsclass &args,
51 displayclass &disp,
52 ostream &logout);
53
54 void define_query_interface(displayclass &disp, cgiargsclass &args,
55 recptprotolistclass *protos, ostream &logout);
56
57 virtual void define_form_macros (displayclass &disp, cgiargsclass &args,
58 recptprotolistclass *protos,
59 ostream &logout);
60
61 void set_gformselection_macro (text_t current_value,
62 const FilterOption_t &option,
63 displayclass &disp);
64 void set_sfselection_macro (text_t current_value,
65 const FilterOption_t &option,
66 displayclass &disp);
67
68 void output_ccp (cgiargsclass &args, recptprotolistclass *protos,
69 displayclass &disp, outconvertclass &outconvert,
70 ostream &textout, ostream &logout);
71
72 virtual void set_queryfilter_options (FilterRequest_t &request,
73 const text_t &querystring,
74 cgiargsclass &args);
75
76 virtual void set_queryfilter_options (FilterRequest_t &request,
77 const text_t &querystring1,
78 const text_t &querystring2,
79 cgiargsclass &args);
80
81
82
83 bool search_multiple_collections (cgiargsclass &args,
84 recptprotolistclass *protos,
85 browsermapclass *browsers,
86 displayclass &disp,
87 outconvertclass &outconvert,
88 ostream &textout,
89 ostream &logout);
90
91 virtual bool save_search_history(cgiargsclass &args, int numdocs,
92 isapprox isApprox);
93
94public:
95 queryaction ();
96 virtual ~queryaction ();
97
98 void configure (const text_t &key, const text_tarray &cfgline);
99 bool init (ostream &logout);
100
101 virtual text_t get_action_name () {return "q";}
102
103 virtual bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
104 recptprotolistclass *protos, ostream &logout);
105
106 virtual void define_internal_macros (displayclass &disp, cgiargsclass &args,
107 recptprotolistclass *protos, ostream &logout);
108
109 virtual void define_external_macros (displayclass &disp, cgiargsclass &args,
110 recptprotolistclass *protos, ostream &logout);
111
112 virtual bool do_action (cgiargsclass &args, recptprotolistclass *protos,
113 browsermapclass *browsers, displayclass &disp,
114 outconvertclass &outconvert, ostream &textout,
115 ostream &logout);
116
117};
118
119#endif
Note: See TracBrowser for help on using the repository browser.