IDZEBRA  2.1.2
Data Structures | Macros | Functions
recgrs.c File Reference
#include <stdio.h>
#include <assert.h>
#include <sys/types.h>
#include <ctype.h>
#include <yaz/log.h>
#include <yaz/oid_db.h>
#include <yaz/diagbib1.h>
#include <d1_absyn.h>
#include <idzebra/recgrs.h>

Go to the source code of this file.

Data Structures

struct  source_parser
 

Macros

#define GRS_MAX_WORD   512
 
#define MAX_ATTR_COUNT   50
 

Functions

static int sp_lex (struct source_parser *sp)
 
static int sp_expr (struct source_parser *sp, data1_node *n, RecWord *wrd)
 
static int sp_range (struct source_parser *sp, data1_node *n, RecWord *wrd)
 
static int sp_first (struct source_parser *sp, data1_node *n, RecWord *wrd)
 
static struct source_parsersource_parser_create (void)
 
static void source_parser_destroy (struct source_parser *sp)
 
static int sp_parse (struct source_parser *sp, data1_node *n, RecWord *wrd, const char *src)
 
int d1_check_xpath_predicate (data1_node *n, struct xpath_predicate *p)
 
static int dfa_match_first (struct DFA_state **dfaar, const char *text)
 
data1_termlistxpath_termlist_by_tagpath (char *tagpath, data1_node *n)
 
static void index_xpath_attr (char *tag_path, char *name, char *value, char *structure, struct recExtractCtrl *p, RecWord *wrd)
 
static void mk_tag_path_full (char *tag_path_full, size_t max, data1_node *n)
 
static void index_xpath (struct source_parser *sp, data1_node *n, struct recExtractCtrl *p, int level, RecWord *wrd, char *xpath_index, int xpath_is_start)
 
static void index_termlist (struct source_parser *sp, data1_node *par, data1_node *n, struct recExtractCtrl *p, int level, RecWord *wrd)
 
static int dumpkeys_r (struct source_parser *sp, data1_node *n, struct recExtractCtrl *p, int level, RecWord *wrd)
 
static int dumpkeys (data1_node *n, struct recExtractCtrl *p, RecWord *wrd)
 
int grs_extract_tree (struct recExtractCtrl *p, data1_node *n)
 
static int grs_extract_sub (void *clientData, struct recExtractCtrl *p, NMEM mem, data1_node *(*grs_read)(struct grs_read_info *))
 
int zebra_grs_extract (void *clientData, struct recExtractCtrl *p, data1_node *(*grs_read)(struct grs_read_info *))
 
static int process_comp (data1_handle dh, data1_node *n, Z_RecordComposition *c, char **addinfo, ODR o)
 
static void zebra_xml_metadata (struct recRetrieveCtrl *p, data1_node *top, NMEM mem)
 
int zebra_grs_retrieve (void *clientData, struct recRetrieveCtrl *p, data1_node *(*grs_read)(struct grs_read_info *))
 

Macro Definition Documentation

#define GRS_MAX_WORD   512

Definition at line 35 of file recgrs.c.

#define MAX_ATTR_COUNT   50

Referenced by index_xpath().

Function Documentation

int d1_check_xpath_predicate ( data1_node n,
struct xpath_predicate p 
)
static int dfa_match_first ( struct DFA_state **  dfaar,
const char *  text 
)
static
static int dumpkeys ( data1_node n,
struct recExtractCtrl p,
RecWord wrd 
)
static

Definition at line 876 of file recgrs.c.

References dumpkeys_r(), source_parser_create(), and source_parser_destroy().

Referenced by grs_extract_sub(), and grs_extract_tree().

static int dumpkeys_r ( struct source_parser sp,
data1_node n,
struct recExtractCtrl p,
int  level,
RecWord wrd 
)
static
static int grs_extract_sub ( void *  clientData,
struct recExtractCtrl p,
NMEM  mem,
data1_node *(*)(struct grs_read_info *)  grs_read 
)
static
int grs_extract_tree ( struct recExtractCtrl p,
data1_node n 
)
static void index_termlist ( struct source_parser sp,
data1_node par,
data1_node n,
struct recExtractCtrl p,
int  level,
RecWord wrd 
)
static
static void index_xpath ( struct source_parser sp,
data1_node n,
struct recExtractCtrl p,
int  level,
RecWord wrd,
char *  xpath_index,
int  xpath_is_start 
)
static
static void index_xpath_attr ( char *  tag_path,
char *  name,
char *  value,
char *  structure,
struct recExtractCtrl p,
RecWord wrd 
)
static
static void mk_tag_path_full ( char *  tag_path_full,
size_t  max,
data1_node n 
)
static

Definition at line 509 of file recgrs.c.

References DATA1N_root, DATA1N_tag, data1_node::parent, data1_node::tag, data1_node::u, and data1_node::which.

Referenced by index_xpath().

static int process_comp ( data1_handle  dh,
data1_node n,
Z_RecordComposition *  c,
char **  addinfo,
ODR  o 
)
static
static struct source_parser* source_parser_create ( void  )
static

Definition at line 255 of file recgrs.c.

References source_parser::nmem.

Referenced by dumpkeys().

static void source_parser_destroy ( struct source_parser sp)
static

Definition at line 263 of file recgrs.c.

References source_parser::nmem.

Referenced by dumpkeys().

static int sp_expr ( struct source_parser sp,
data1_node n,
RecWord wrd 
)
static
static int sp_first ( struct source_parser sp,
data1_node n,
RecWord wrd 
)
static
static int sp_lex ( struct source_parser sp)
static
static int sp_parse ( struct source_parser sp,
data1_node n,
RecWord wrd,
const char *  src 
)
static
static int sp_range ( struct source_parser sp,
data1_node n,
RecWord wrd 
)
static
data1_termlist* xpath_termlist_by_tagpath ( char *  tagpath,
data1_node n 
)
int zebra_grs_extract ( void *  clientData,
struct recExtractCtrl p,
data1_node *(*)(struct grs_read_info *)  grs_read 
)

Definition at line 935 of file recgrs.c.

References grs_extract_sub().

Referenced by extract_marc(), extract_marcxml(), extract_regx(), and grs_extract_sgml().

int zebra_grs_retrieve ( void *  clientData,
struct recRetrieveCtrl p,
data1_node *(*)(struct grs_read_info *)  grs_read 
)
static void zebra_xml_metadata ( struct recRetrieveCtrl p,
data1_node top,
NMEM  mem 
)
static