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
RevLine 
[174]1/**********************************************************************
2 *
3 * queryaction.h --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
[533]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.
[174]9 *
[533]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 *
[174]24 *********************************************************************/
25
26
27#ifndef QUERYACTION_H
28#define QUERYACTION_H
29
30#include "gsdlconf.h"
[22046]31#include "basequeryaction.h"
[1270]32#include "receptionist.h"
[174]33
34
[22046]35class queryaction : public basequeryaction {
[757]36
[275]37protected:
[7385]38 text_t m_strUseInterfaceLanguageForQuery;
[337]39 text_t formatstring;
[7385]40 text_tmap reqfields; // required fields
[403]41 int num_phrases;
[337]42
[22046]43 virtual text_t query_filter_name () {return "QueryFilter";}
44
[928]45 virtual void define_query_macros (cgiargsclass &args, displayclass &disp,
[22046]46 int numDocs, isapprox isApprox);
[397]47
[22046]48 virtual void get_formatted_query_string (text_t &formattedstring,
49 bool segment,
50 cgiargsclass &args,
51 displayclass &disp,
52 ostream &logout);
53
[2769]54 void define_query_interface(displayclass &disp, cgiargsclass &args,
[4200]55 recptprotolistclass *protos, ostream &logout);
56
[22046]57 virtual void define_form_macros (displayclass &disp, cgiargsclass &args,
58 recptprotolistclass *protos,
59 ostream &logout);
[1915]60
[4780]61 void set_gformselection_macro (text_t current_value,
62 const FilterOption_t &option,
63 displayclass &disp);
[12785]64 void set_sfselection_macro (text_t current_value,
65 const FilterOption_t &option,
66 displayclass &disp);
[4780]67
[928]68 void output_ccp (cgiargsclass &args, recptprotolistclass *protos,
69 displayclass &disp, outconvertclass &outconvert,
70 ostream &textout, ostream &logout);
[22046]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
[928]82
[1915]83 bool search_multiple_collections (cgiargsclass &args,
84 recptprotolistclass *protos,
85 browsermapclass *browsers,
86 displayclass &disp,
87 outconvertclass &outconvert,
88 ostream &textout,
[757]89 ostream &logout);
[1915]90
[3364]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);
[757]98
99
[22046]100 virtual bool save_search_history(cgiargsclass &args, int numdocs,
101 isapprox isApprox);
[928]102
[174]103public:
104 queryaction ();
[22046]105 virtual ~queryaction ();
[1270]106
[174]107 void configure (const text_t &key, const text_tarray &cfgline);
108 bool init (ostream &logout);
109
[928]110 virtual text_t get_action_name () {return "q";}
[174]111
[928]112 virtual bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
[3546]113 recptprotolistclass *protos, ostream &logout);
[757]114
[928]115 virtual void define_internal_macros (displayclass &disp, cgiargsclass &args,
[757]116 recptprotolistclass *protos, ostream &logout);
117
[928]118 virtual void define_external_macros (displayclass &disp, cgiargsclass &args,
[757]119 recptprotolistclass *protos, ostream &logout);
[174]120
[928]121 virtual bool do_action (cgiargsclass &args, recptprotolistclass *protos,
[757]122 browsermapclass *browsers, displayclass &disp,
[421]123 outconvertclass &outconvert, ostream &textout,
124 ostream &logout);
[3546]125
[174]126};
127
128#endif
Note: See TracBrowser for help on using the repository browser.