PAZPAR2_LAST_ERROR
};
+enum pazpar2_database_criterion_type {
+ PAZPAR2_STRING_MATCH,
+ PAZPAR2_SUBSTRING_MATCH
+};
+
// Represents a (virtual) database on a host
struct database {
struct host *host;
struct database_criterion {
char *name;
+ enum pazpar2_database_criterion_type type;
struct database_criterion_value *values;
struct database_criterion *next;
};
-// Normalization filter. Turns incoming record into internal representation
-// Simple sequence of stylesheets run in series.
-struct database_retrievalmap {
- xsltStylesheet *stylesheet;
- struct marcmap *marcmap;
- struct database_retrievalmap *next;
-};
-
// Represents a database as viewed from one session, possibly with settings overriden
// for that session
struct session_database
{
struct database *database;
struct setting **settings;
-#ifdef RETIRED
- yaz_marc_t yaz_marc;
-#endif
- struct database_retrievalmap *map;
+ normalize_record_t map;
struct session_database *next;
};
int total_merged;
int number_of_warnings_unknown_elements;
int number_of_warnings_unknown_metadata;
+ normalize_cache_t normalize_cache;
};
struct statistics {
int host_getaddrinfo(struct host *host);
-xmlDoc *normalize_record(struct session_database *sdb, struct session *se,
- const char *rec);
-xmlDoc *record_to_xml(struct session_database *sdb, const char *rec);
-
struct record *ingest_record(struct client *cl, const char *rec,
int record_no);
void session_alert_watch(struct session *s, int what);