[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] | 35 | class queryaction : public basequeryaction {
|
---|
[757] | 36 |
|
---|
[275] | 37 | protected:
|
---|
[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 |
|
---|
[22046] | 91 | virtual bool save_search_history(cgiargsclass &args, int numdocs,
|
---|
| 92 | isapprox isApprox);
|
---|
[928] | 93 |
|
---|
[174] | 94 | public:
|
---|
| 95 | queryaction ();
|
---|
[22046] | 96 | virtual ~queryaction ();
|
---|
[1270] | 97 |
|
---|
[174] | 98 | void configure (const text_t &key, const text_tarray &cfgline);
|
---|
| 99 | bool init (ostream &logout);
|
---|
| 100 |
|
---|
[928] | 101 | virtual text_t get_action_name () {return "q";}
|
---|
[174] | 102 |
|
---|
[928] | 103 | virtual bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
|
---|
[3546] | 104 | recptprotolistclass *protos, ostream &logout);
|
---|
[757] | 105 |
|
---|
[928] | 106 | virtual void define_internal_macros (displayclass &disp, cgiargsclass &args,
|
---|
[757] | 107 | recptprotolistclass *protos, ostream &logout);
|
---|
| 108 |
|
---|
[928] | 109 | virtual void define_external_macros (displayclass &disp, cgiargsclass &args,
|
---|
[757] | 110 | recptprotolistclass *protos, ostream &logout);
|
---|
[174] | 111 |
|
---|
[928] | 112 | virtual bool do_action (cgiargsclass &args, recptprotolistclass *protos,
|
---|
[757] | 113 | browsermapclass *browsers, displayclass &disp,
|
---|
[421] | 114 | outconvertclass &outconvert, ostream &textout,
|
---|
| 115 | ostream &logout);
|
---|
[3546] | 116 |
|
---|
[174] | 117 | };
|
---|
| 118 |
|
---|
| 119 | #endif
|
---|