[15425] | 1 | /**********************************************************************
|
---|
| 2 | *
|
---|
| 3 | * z3950parser.h -- convert Z39.50's RPN query syntax into Greenstone
|
---|
| 4 | * Copyright (C) 2000 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 | #ifndef Z3950PARSER_H
|
---|
| 27 | #define Z3950PARSER_H
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | #include <string>
|
---|
| 31 | #include <list>
|
---|
| 32 |
|
---|
| 33 | #include <stdio.h>
|
---|
| 34 | #include <stdlib.h>
|
---|
| 35 | #include <ctype.h>
|
---|
| 36 | #include <time.h>
|
---|
| 37 |
|
---|
| 38 | // Greenstone headers
|
---|
| 39 | #include "fileutil.h"
|
---|
| 40 | #include "comtypes.h"
|
---|
| 41 | #include "nullproto.h"
|
---|
| 42 | #include "z3950_to_gsdl.h"
|
---|
| 43 |
|
---|
| 44 | // YAZ headers
|
---|
| 45 | extern "C" {
|
---|
| 46 | #include <yaz/backend.h>
|
---|
| 47 | #include <yaz/log.h>
|
---|
| 48 | #ifdef ASN_COMPILED
|
---|
| 49 | #include <yaz/ill.h>
|
---|
| 50 | #endif
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | extern text_t gsdlhome;
|
---|
| 54 | extern list<FilterResponse_t> Response_tlist;
|
---|
| 55 | extern list<text_t> Response_tlist_colnames;
|
---|
| 56 | extern list<int> Response_tlist_sizes;
|
---|
| 57 | extern z3950Server *Server;
|
---|
| 58 | extern collectset *Cservers;
|
---|
| 59 | extern nullproto *Protocol;
|
---|
| 60 | extern map<text_t, gsdlCollection> Collection_map;
|
---|
| 61 | extern map<text_t, text_t> Resultsets;
|
---|
| 62 |
|
---|
| 63 | void Z_AttributeList_parse(bend_search_rr *rr, Z_AttributeList *Z, text_t &GSQuery);
|
---|
| 64 |
|
---|
| 65 | void Z_Term_parse(bend_search_rr *rr, Z_Term *Z, text_t &GSQuery);
|
---|
| 66 |
|
---|
| 67 | void Z_ProximityOperator_parse(bend_search_rr *rr, Z_ProximityOperator *Z, text_t &GSQuery);
|
---|
| 68 |
|
---|
| 69 | void Z_Operator_parse(bend_search_rr *rr, Z_Operator *Z, text_t &GSQuery);
|
---|
| 70 |
|
---|
| 71 | void Z_Operand_parse(bend_search_rr *rr, Z_Operand *Z, text_t &GSQuery);
|
---|
| 72 |
|
---|
| 73 | void Z_RPNStructure_parse(bend_search_rr *rr, Z_RPNStructure *Z, text_t &GSQuery);
|
---|
| 74 |
|
---|
| 75 | text_t ZQueryToGSQuery(bend_search_rr *rr);
|
---|
| 76 |
|
---|
| 77 | #endif
|
---|