Rank-weight may be controlled via query.
[idzebra-moved-to-github.git] / include / zebramap.h
1 /*
2  * Copyright (C) 1994-1999, Index Data
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: zebramap.h,v $
7  * Revision 1.12  2001-11-14 22:06:27  adam
8  * Rank-weight may be controlled via query.
9  *
10  * Revision 1.11  2001/01/22 10:42:56  adam
11  * Added numerical sort.
12  *
13  * Revision 1.10  1999/11/30 13:48:03  adam
14  * Improved installation. Updated for inclusion of YAZ header files.
15  *
16  * Revision 1.9  1999/09/07 07:19:21  adam
17  * Work on character mapping. Implemented replace rules.
18  *
19  * Revision 1.8  1999/02/12 13:29:21  adam
20  * Implemented position-flag for registers.
21  *
22  * Revision 1.7  1999/02/02 14:50:46  adam
23  * Updated WIN32 code specific sections. Changed header.
24  *
25  * Revision 1.6  1998/06/23 15:33:33  adam
26  * Added feature to specify sort criteria in query (type 7 specifies
27  * sort flags).
28  *
29  * Revision 1.5  1998/03/05 08:39:26  adam
30  * Minor changes to zebramap data structures. Changed query
31  * mapping rules.
32  *
33  * Revision 1.4  1998/02/10 12:03:05  adam
34  * Implemented Sort.
35  *
36  * Revision 1.3  1997/11/18 10:05:08  adam
37  * Changed character map facility so that admin can specify character
38  * mapping files for each register type, w, p, etc.
39  *
40  * Revision 1.2  1997/10/29 12:02:47  adam
41  * Added missing prototype.
42  *
43  * Revision 1.1  1997/10/27 14:33:04  adam
44  * Moved towards generic character mapping depending on "structure"
45  * field in abstract syntax file. Fixed a few memory leaks. Fixed
46  * bug with negative integers when doing searches with relational
47  * operators.
48  *
49  */
50
51 #ifndef ZEBRAMAP_H
52 #define ZEBRAMAP_H
53
54 #include <yaz/proto.h>
55 #include <res.h>
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
61 typedef struct zebra_maps *ZebraMaps;
62 ZebraMaps zebra_maps_open (Res res);
63
64 void zebra_maps_close (ZebraMaps zm);
65
66 const char **zebra_maps_input (ZebraMaps zms, unsigned reg_id,
67                                const char **from, int len);
68 const char *zebra_maps_output(ZebraMaps, unsigned reg_id, const char **from);
69
70 int zebra_maps_attr (ZebraMaps zms, Z_AttributesPlusTerm *zapt,
71                      unsigned *reg_id, char **search_type, char *rank_type,
72                      int *complete_flag, int *sort_flag);
73
74 int zebra_maps_sort (ZebraMaps zms, Z_SortAttributes *sortAttributes,
75                      int *numerical);
76
77 int zebra_maps_is_complete (ZebraMaps zms, unsigned reg_id);
78 int zebra_maps_is_sort (ZebraMaps zms, unsigned reg_id);
79 int zebra_maps_is_positioned (ZebraMaps zms, unsigned reg_id);
80
81 WRBUF zebra_replace(ZebraMaps zms, unsigned reg_id, const char *ex_list,
82                     const char *input_str, int input_len);
83
84 #ifdef __cplusplus
85 }
86 #endif
87
88 #endif