YAZ  5.23.1
solrtransform.c
Go to the documentation of this file.
1 /* This file is part of the YAZ toolkit.
2  * Copyright (C) Index Data
3  * See the file LICENSE for details.
4  */
10 #if HAVE_CONFIG_H
11 #include <config.h>
12 #endif
13 
14 #include <assert.h>
15 #include <stdlib.h>
16 #include <string.h>
17 #include <yaz/rpn2cql.h>
18 #include <yaz/solr.h>
19 
21 {
22  return cql_transform_create();
23 }
24 
26 {
27  return cql_transform_open_FILE(f);
28 }
29 
31 {
32  return cql_transform_open_fname(fname);
33 }
34 
35 int solr_transform_define_pattern(cql_transform_t ct, const char *pattern,
36  const char *value)
37 {
38  return cql_transform_define_pattern(ct, pattern, value);
39 }
40 
42 {
44 }
45 
47 {
48  return cql_transform_error(ct, addinfo);
49 }
50 
52  const char *addinfo)
53 {
54  cql_transform_set_error(ct, error, addinfo);
55 }
56 
58  const char *category,
59  Z_AttributeList *attributes)
60 {
61  return cql_lookup_reverse(ct, category, attributes);
62 }
63 
64 
65 /*
66  * Local variables:
67  * c-basic-offset: 4
68  * c-file-style: "Stroustrup"
69  * indent-tabs-mode: nil
70  * End:
71  * vim: shiftwidth=4 tabstop=8 expandtab
72  */
73 
void solr_transform_set_error(solr_transform_t ct, int error, const char *addinfo)
sets error and addinfo for transform
Definition: solrtransform.c:51
Header for RPN to CQL tranform.
solr_transform_t solr_transform_open_fname(const char *fname)
creates a SOLR transform handle from a file
Definition: solrtransform.c:30
void cql_transform_set_error(cql_transform_t ct, int error, const char *addinfo)
sets error and addinfo for transform
int solr_transform_error(solr_transform_t ct, const char **addinfo)
returns additional information for last transform
Definition: solrtransform.c:46
cql_transform_t cql_transform_create(void)
creates a CQL transform handle
Definition: cqltransform.c:53
const char * cql_lookup_reverse(cql_transform_t ct, const char *category, Z_AttributeList *attributes)
find a pattern that has a subset of attributes
Definition: cqltransform.c:322
int cql_transform_define_pattern(cql_transform_t ct, const char *pattern, const char *value)
defines CQL transform pattern
Definition: cqltransform.c:204
int cql_transform_error(cql_transform_t ct, const char **addinfo)
returns additional information for last transform
solr_transform_t solr_transform_open_FILE(FILE *f)
creates a SOLR transform handle from am opened file handle
Definition: solrtransform.c:25
void solr_transform_close(solr_transform_t ct)
destroys a SOLR transform handle
Definition: solrtransform.c:41
cql_transform_t cql_transform_open_fname(const char *fname)
creates a CQL transform handle from a file
Definition: cqltransform.c:276
solr_transform_t solr_transform_create(void)
creates a SOLR transform handle
Definition: solrtransform.c:20
void cql_transform_close(cql_transform_t ct)
destroys a CQL transform handle
Definition: cqltransform.c:256
cql_transform_t cql_transform_open_FILE(FILE *f)
creates a CQL transform handle from am opened file handle
Definition: cqltransform.c:215
int solr_transform_define_pattern(cql_transform_t ct, const char *pattern, const char *value)
defines SOLR transform pattern
Definition: solrtransform.c:35
Header with public definitions about Solr.
const char * solr_lookup_reverse(solr_transform_t ct, const char *category, Z_AttributeList *attributes)
find a pattern that has a subset of attributes
Definition: solrtransform.c:57