-/* $Id: config.h,v 1.22 2007-04-26 10:19:05 marc Exp $
- Copyright (c) 2006-2007, Index Data.
-
-This file is part of Pazpar2.
+/* This file is part of Pazpar2.
+ Copyright (C) 2006-2008 Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
for more details.
You should have received a copy of the GNU General Public License
-along with Pazpar2; see the file LICENSE. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
- */
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+*/
#ifndef CONFIG_H
#define CONFIG_H
#include <libxslt/xsltutils.h>
#include <yaz/nmem.h>
+#include "charsets.h"
enum conf_metadata_type {
Metadata_type_generic, // Generic text field
Metadata_type_number, // A number
- Metadata_type_year // A number
+ Metadata_type_year, // A number
+ Metadata_type_date // A number
};
enum conf_metadata_merge {
Metadata_sortkey_string // Flat string
};
-
+// This controls the ability to insert 'static' values from settings into retrieval recs
+enum conf_setting_type {
+ Metadata_setting_no,
+ Metadata_setting_postproc, // Insert setting value into normalized record
+ Metadata_setting_parameter // Expose value to normalization stylesheets
+};
// Describes known metadata elements and how they are to be manipulated
// An array of these structure provides a 'map' against which
// into service/record_cluster->sortkey array
enum conf_metadata_type type;
enum conf_metadata_merge merge;
+ enum conf_setting_type setting; // Value is to be taken from session/db settings?
};
const char *name,
enum conf_metadata_type type,
enum conf_metadata_merge merge,
+ enum conf_setting_type setting,
int brief,
int termlist,
int rank,
struct conf_metadata *metadata;
int num_sortkeys;
struct conf_sortkey *sortkeys;
+
};
struct conf_service * conf_service_create(NMEM nmem,
int num_metadata, int num_sortkeys);
+
struct conf_metadata* conf_service_add_metadata(NMEM nmem,
struct conf_service *service,
int field_id,
const char *name,
enum conf_metadata_type type,
enum conf_metadata_merge merge,
+ enum conf_setting_type setting,
int brief,
int termlist,
int rank,
char *proxy_host;
int proxy_port;
char *myurl;
- char *zproxy_host;
- int zproxy_port;
char *settings;
+
+ pp2_charset_t relevance_pct;
+ pp2_charset_t sort_pct;
+ pp2_charset_t mergekey_pct;
+
struct conf_service *service;
struct conf_server *next;
};