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

Last change on this file since 22984 was 22046, checked in by davidb, 14 years ago

Changes necessary to support new sql-query action

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 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 search_single_collection (cgiargsclass &args,
92 const text_t &collection,
93 recptprotolistclass *protos,
94 browsermapclass *browsers,
95 displayclass &disp,
96 outconvertclass &outconvert,
97 ostream &textout, ostream &logout);
98
99
100 virtual bool save_search_history(cgiargsclass &args, int numdocs,
101 isapprox isApprox);
102
103public:
104 queryaction ();
105 virtual ~queryaction ();
106
107 void configure (const text_t &key, const text_tarray &cfgline);
108 bool init (ostream &logout);
109
110 virtual text_t get_action_name () {return "q";}
111
112 virtual bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
113 recptprotolistclass *protos, ostream &logout);
114
115 virtual void define_internal_macros (displayclass &disp, cgiargsclass &args,
116 recptprotolistclass *protos, ostream &logout);
117
118 virtual void define_external_macros (displayclass &disp, cgiargsclass &args,
119 recptprotolistclass *protos, ostream &logout);
120
121 virtual bool do_action (cgiargsclass &args, recptprotolistclass *protos,
122 browsermapclass *browsers, displayclass &disp,
123 outconvertclass &outconvert, ostream &textout,
124 ostream &logout);
125
126};
127
128#endif
Note: See TracBrowser for help on using the repository browser.