IDZEBRA 2.2.8
zebramap.h
Go to the documentation of this file.
1/* This file is part of the Zebra server.
2 Copyright (C) Index Data
3
4Zebra is free software; you can redistribute it and/or modify it under
5the terms of the GNU General Public License as published by the Free
6Software Foundation; either version 2, or (at your option) any later
7version.
8
9Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10WARRANTY; without even the implied warranty of MERCHANTABILITY or
11FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
18*/
19
20#ifndef ZEBRAMAP_H
21#define ZEBRAMAP_H
22
23#include <yaz/proto.h>
24#include <idzebra/res.h>
25
26YAZ_BEGIN_CDECL
27
28typedef struct zebra_maps_s *zebra_maps_t;
29typedef struct zebra_map *zebra_map_t;
30
31YAZ_EXPORT
32zebra_maps_t zebra_maps_open(Res res, const char *base_path,
33 const char *profile_path);
34YAZ_EXPORT
35ZEBRA_RES zebra_maps_read_file(zebra_maps_t zms, const char *fname);
36
37YAZ_EXPORT
39
40YAZ_EXPORT
42
43YAZ_EXPORT
44const char **zebra_maps_input(zebra_map_t zm,
45 const char **from, int len, int first);
46
47YAZ_EXPORT
48const char **zebra_maps_search(zebra_map_t zm,
49 const char **from, int len, int *q_map_match);
50
51YAZ_EXPORT
52const char *zebra_maps_output(zebra_map_t zm, const char **from);
53
54YAZ_EXPORT
55int zebra_maps_attr(zebra_maps_t zms, Z_AttributesPlusTerm *zapt,
56 const char **reg_id, char **search_type, char *rank_type,
57 int *complete_flag, int *sort_flag);
58
59YAZ_EXPORT
60int zebra_maps_sort(zebra_maps_t zms, Z_SortAttributes *sortAttributes,
61 int *numerical);
62
63YAZ_EXPORT
65
66YAZ_EXPORT
68
69YAZ_EXPORT
71
72YAZ_EXPORT
74
75YAZ_EXPORT
77
78YAZ_EXPORT
80
81YAZ_EXPORT
83
84YAZ_EXPORT
86
87YAZ_EXPORT
88WRBUF zebra_replace(zebra_map_t zm, const char *ex_list,
89 const char *input_str, int input_len);
90
91YAZ_EXPORT
92zebra_map_t zebra_map_get(zebra_maps_t zms, const char *id);
93
94YAZ_EXPORT
96
97YAZ_EXPORT
99 const char *buf, size_t len);
100
101YAZ_EXPORT
103 const char **result_buf, size_t *result_len,
104 const char **display_buf, size_t *display_len);
105
106YAZ_END_CDECL
107
108#endif
109/*
110 * Local variables:
111 * c-basic-offset: 4
112 * c-file-style: "Stroustrup"
113 * indent-tabs-mode: nil
114 * End:
115 * vim: shiftwidth=4 tabstop=8 expandtab
116 */
117
WRBUF input_str
Definition zebramap.c:66
short ZEBRA_RES
Common return type for Zebra API.
Definition util.h:80
int zebra_maps_is_index(zebra_map_t zm)
Definition zebramap.c:464
zebra_map_t zebra_map_get(zebra_maps_t zms, const char *id)
Definition zebramap.c:355
const char ** zebra_maps_input(zebra_map_t zm, const char **from, int len, int first)
Definition zebramap.c:399
int zebra_maps_is_alwaysmatches(zebra_map_t zm)
Definition zebramap.c:485
int zebra_maps_is_first_in_field(zebra_map_t zm)
Definition zebramap.c:492
int zebra_map_tokenize_next(zebra_map_t zm, const char **result_buf, size_t *result_len, const char **display_buf, size_t *display_len)
Definition zebramap.c:658
void zebra_maps_define_default_sort(zebra_maps_t zms)
Definition zebramap.c:349
void zebra_maps_close(zebra_maps_t zm)
Definition zebramap.c:84
int zebra_maps_is_sort(zebra_map_t zm)
Definition zebramap.c:478
int zebra_maps_is_staticrank(zebra_map_t zm)
Definition zebramap.c:471
int zebra_maps_attr(zebra_maps_t zms, Z_AttributesPlusTerm *zapt, const char **reg_id, char **search_type, char *rank_type, int *complete_flag, int *sort_flag)
Definition zebramap.c:515
int zebra_maps_is_positioned(zebra_map_t zm)
Definition zebramap.c:457
int zebra_maps_is_icu(zebra_map_t zm)
Definition zebramap.c:741
int zebra_map_tokenize_start(zebra_map_t zm, const char *buf, size_t len)
Definition zebramap.c:702
const char * zebra_maps_output(zebra_map_t zm, const char **from)
Definition zebramap.c:438
const char ** zebra_maps_search(zebra_map_t zm, const char **from, int len, int *q_map_match)
Definition zebramap.c:412
int zebra_maps_sort(zebra_maps_t zms, Z_SortAttributes *sortAttributes, int *numerical)
Definition zebramap.c:499
struct zebra_map * zebra_map_t
Definition zebramap.h:29
struct zebra_maps_s * zebra_maps_t
Definition zebramap.h:28
int zebra_maps_is_complete(zebra_map_t zm)
Definition zebramap.c:450
ZEBRA_RES zebra_maps_read_file(zebra_maps_t zms, const char *fname)
Definition zebramap.c:295
WRBUF zebra_replace(zebra_map_t zm, const char *ex_list, const char *input_str, int input_len)
Definition zebramap.c:619
zebra_map_t zebra_map_get_or_add(zebra_maps_t zms, const char *id)
Definition zebramap.c:364
zebra_maps_t zebra_maps_open(Res res, const char *base_path, const char *profile_path)
Definition zebramap.c:324