YAZ  5.23.1
Functions
solrtransform.c File Reference

Old wrappers. More...

#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <yaz/rpn2cql.h>
#include <yaz/solr.h>

Go to the source code of this file.

Functions

solr_transform_t solr_transform_create (void)
 creates a SOLR transform handle More...
 
solr_transform_t solr_transform_open_FILE (FILE *f)
 creates a SOLR transform handle from am opened file handle More...
 
solr_transform_t solr_transform_open_fname (const char *fname)
 creates a SOLR transform handle from a file More...
 
int solr_transform_define_pattern (cql_transform_t ct, const char *pattern, const char *value)
 defines SOLR transform pattern More...
 
void solr_transform_close (solr_transform_t ct)
 destroys a SOLR transform handle More...
 
int solr_transform_error (solr_transform_t ct, const char **addinfo)
 returns additional information for last transform More...
 
void solr_transform_set_error (solr_transform_t ct, int error, const char *addinfo)
 sets error and addinfo for transform More...
 
const char * solr_lookup_reverse (solr_transform_t ct, const char *category, Z_AttributeList *attributes)
 find a pattern that has a subset of attributes More...
 

Detailed Description

Old wrappers.

Definition in file solrtransform.c.

Function Documentation

const char* solr_lookup_reverse ( solr_transform_t  ct,
const char *  category,
Z_AttributeList attributes 
)

find a pattern that has a subset of attributes

Parameters
ctSOLR transform handle
categorypattern category
attributesRPN attributes
Returns
pattern value or NULL if not found

Definition at line 57 of file solrtransform.c.

References cql_lookup_reverse().

Referenced by check_range(), rpn2solr_attr(), and rpn2solr_simple().

void solr_transform_close ( solr_transform_t  ct)

destroys a SOLR transform handle

Parameters
ctSOLR transform handle

Definition at line 41 of file solrtransform.c.

References cql_transform_close().

solr_transform_t solr_transform_create ( void  )

creates a SOLR transform handle

Returns
transform handle or NULL for failure

Definition at line 20 of file solrtransform.c.

References cql_transform_create().

int solr_transform_define_pattern ( solr_transform_t  ct,
const char *  pattern,
const char *  value 
)

defines SOLR transform pattern

Parameters
ctSOLR transform handle
patternpattern string
valuepattern value
Returns
0 for succes; -1 for failure

Definition at line 35 of file solrtransform.c.

References cql_transform_define_pattern().

int solr_transform_error ( solr_transform_t  ct,
const char **  addinfo 
)

returns additional information for last transform

Parameters
ctSOLR transform handle
addinfoadditional info (result)
Returns
error code

Definition at line 46 of file solrtransform.c.

References cql_transform_error().

solr_transform_t solr_transform_open_FILE ( FILE *  f)

creates a SOLR transform handle from am opened file handle

Parameters
ffile where transformation spec is read
Returns
transform handle or NULL for failure

The transformation spec is read from a FILE handle which is assumed opened for reading.

Definition at line 25 of file solrtransform.c.

References cql_transform_open_FILE().

solr_transform_t solr_transform_open_fname ( const char *  fname)

creates a SOLR transform handle from a file

Parameters
fnamename of where transformation spec is read
Returns
transform handle or NULL for failure

Definition at line 30 of file solrtransform.c.

References cql_transform_open_fname().

void solr_transform_set_error ( solr_transform_t  ct,
int  error,
const char *  addinfo 
)

sets error and addinfo for transform

Parameters
ctSOLR transform handle
errorerror code
addinfoadditional info

Definition at line 51 of file solrtransform.c.

References cql_transform_set_error().

Referenced by solr_transform_rpn2solr_stream().