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