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