1 /* $Id: d1_attset.h,v 1.2 2002-10-22 13:19:50 adam Exp $
2 Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
5 This file is part of the Zebra server.
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with Zebra; see the file LICENSE.zebra. If not, write to the
19 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
31 * This structure describes a attset, perhaps made up by inclusion
32 * (supersetting) of other attribute sets. When indexing and searching,
33 * we perform a normalisation, where we associate a given tag with
34 * the set that originally defined it, rather than the superset. This
35 * allows the most flexible access. Eg, the tags common to GILS and BIB-1
36 * should be searchable by both names.
41 typedef struct data1_local_attribute
44 struct data1_local_attribute *next;
45 } data1_local_attribute;
47 typedef struct data1_attset data1_attset;
48 typedef struct data1_att data1_att;
49 typedef struct data1_attset_child data1_attset_child;
53 data1_attset *parent; /* attribute set */
54 char *name; /* symbolic name of this attribute */
55 int value; /* attribute value */
56 data1_local_attribute *locals; /* local index values */
60 struct data1_attset_child {
62 data1_attset_child *next;
67 char *name; /* symbolic name */
68 oid_value reference; /* external ID of attset */
69 data1_att *atts; /* attributes */
70 data1_attset_child *children; /* included attset */
71 data1_attset *next; /* next in cache */
74 typedef struct data1_handle_info *data1_handle;
76 YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
78 YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
80 YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);