-/* $Id: d1_attset.c,v 1.3 2004-09-28 10:15:03 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
+/* $Id: d1_attset.c,v 1.4 2004-09-28 10:43:37 adam Exp $
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
This file is part of the Zebra server.
#include <stdlib.h>
#include <yaz/log.h>
-#include <d1_attset.h>
#include <idzebra/data1.h>
data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, char *name)
-/* $Id: d1_map.c,v 1.4 2004-09-28 10:15:03 adam Exp $
+/* $Id: d1_map.c,v 1.5 2004-09-28 10:43:37 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
#include <yaz/readconf.h>
#include <yaz/tpath.h>
#include <d1_absyn.h>
-#include <d1_map.h>
data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
{
-# $Id: Makefile.am,v 1.15 2004-09-28 10:15:03 adam Exp $
-noinst_HEADERS = bfile.h bset.h charmap.h d1_attset.h d1_map.h \
+# $Id: Makefile.am,v 1.16 2004-09-28 10:43:37 adam Exp $
+noinst_HEADERS = bfile.h bset.h charmap.h \
dict.h direntz.h isam-codec.h isamb.h isamc.h isamg.h \
isams.h mfile.h passwddb.h dfa.h zebra_xpath.h d1_absyn.h \
rset.h set.h sortidx.h str.h zebra-lock.h zebramap.h zebrautl.h
+++ /dev/null
-/* $Id: d1_attset.h,v 1.2 2002-10-22 13:19:50 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
- Index Data Aps
-
-This file is part of the Zebra server.
-
-Zebra 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
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
-*/
-
-#ifndef D1_ATTSET_H
-#define D1_ATTSET_H
-
-#include <yaz/oid.h>
-
-YAZ_BEGIN_CDECL
-
-/*
- * This structure describes a attset, perhaps made up by inclusion
- * (supersetting) of other attribute sets. When indexing and searching,
- * we perform a normalisation, where we associate a given tag with
- * the set that originally defined it, rather than the superset. This
- * allows the most flexible access. Eg, the tags common to GILS and BIB-1
- * should be searchable by both names.
- */
-
-struct data1_attset;
-
-typedef struct data1_local_attribute
-{
- int local;
- struct data1_local_attribute *next;
-} data1_local_attribute;
-
-typedef struct data1_attset data1_attset;
-typedef struct data1_att data1_att;
-typedef struct data1_attset_child data1_attset_child;
-
-struct data1_att
-{
- data1_attset *parent; /* attribute set */
- char *name; /* symbolic name of this attribute */
- int value; /* attribute value */
- data1_local_attribute *locals; /* local index values */
- data1_att *next;
-};
-
-struct data1_attset_child {
- data1_attset *child;
- data1_attset_child *next;
-};
-
-struct data1_attset
-{
- char *name; /* symbolic name */
- oid_value reference; /* external ID of attset */
- data1_att *atts; /* attributes */
- data1_attset_child *children; /* included attset */
- data1_attset *next; /* next in cache */
-};
-
-typedef struct data1_handle_info *data1_handle;
-
-YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
- char *name);
-YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
-
-YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);
-
-YAZ_END_CDECL
-
-#endif
+++ /dev/null
-/* $Id: d1_map.h,v 1.2 2002-10-22 13:19:50 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
- Index Data Aps
-
-This file is part of the Zebra server.
-
-Zebra 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
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
-*/
-
-#ifndef D1_MAP_H
-#define D1_MAP_H
-
-YAZ_BEGIN_CDECL
-
-typedef struct data1_maptag
-{
- int new_field;
- int type;
-#define D1_MAPTAG_numeric 1
-#define D1_MAPTAG_string 2
- int which;
- union
- {
- int numeric;
- char *string;
- } value;
- struct data1_maptag *next;
-} data1_maptag;
-
-typedef struct data1_mapunit
-{
- int no_data;
- char *source_element_name;
- data1_maptag *target_path;
- struct data1_mapunit *next;
-} data1_mapunit;
-
-typedef struct data1_maptab
-{
- char *name;
- oid_value target_absyn_ref;
- char *target_absyn_name;
- data1_mapunit *map;
- struct data1_maptab *next;
-} data1_maptab;
-
-YAZ_END_CDECL
-
-#endif
-/* $Id: data1.h,v 1.1 2004-09-28 10:15:03 adam Exp $
+/* $Id: data1.h,v 1.2 2004-09-28 10:43:37 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <yaz/proto.h>
#include <idzebra/version.h>
-#include <d1_attset.h>
-#include <d1_map.h>
#include <yaz/yaz-util.h>
#include <yaz/wrbuf.h>
#define DATA1_MAX_SYMBOL 31
+/*
+ * This structure describes a attset, perhaps made up by inclusion
+ * (supersetting) of other attribute sets. When indexing and searching,
+ * we perform a normalisation, where we associate a given tag with
+ * the set that originally defined it, rather than the superset. This
+ * allows the most flexible access. Eg, the tags common to GILS and BIB-1
+ * should be searchable by both names.
+ */
+
+struct data1_attset;
+
+typedef struct data1_local_attribute
+{
+ int local;
+ struct data1_local_attribute *next;
+} data1_local_attribute;
+
+typedef struct data1_attset data1_attset;
+typedef struct data1_att data1_att;
+typedef struct data1_attset_child data1_attset_child;
+
+struct data1_att
+{
+ data1_attset *parent; /* attribute set */
+ char *name; /* symbolic name of this attribute */
+ int value; /* attribute value */
+ data1_local_attribute *locals; /* local index values */
+ data1_att *next;
+};
+
+struct data1_attset_child {
+ data1_attset *child;
+ data1_attset_child *next;
+};
+
+struct data1_attset
+{
+ char *name; /* symbolic name */
+ oid_value reference; /* external ID of attset */
+ data1_att *atts; /* attributes */
+ data1_attset_child *children; /* included attset */
+ data1_attset *next; /* next in cache */
+};
+
+typedef struct data1_handle_info *data1_handle;
+
+YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
+ char *name);
+YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
+
+YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);
+
+typedef struct data1_maptag
+{
+ int new_field;
+ int type;
+#define D1_MAPTAG_numeric 1
+#define D1_MAPTAG_string 2
+ int which;
+ union
+ {
+ int numeric;
+ char *string;
+ } value;
+ struct data1_maptag *next;
+} data1_maptag;
+
+typedef struct data1_mapunit
+{
+ int no_data;
+ char *source_element_name;
+ data1_maptag *target_path;
+ struct data1_mapunit *next;
+} data1_mapunit;
+
+typedef struct data1_maptab
+{
+ char *name;
+ oid_value target_absyn_ref;
+ char *target_absyn_name;
+ data1_mapunit *map;
+ struct data1_maptab *next;
+} data1_maptab;
+
typedef struct data1_name
{
char *name;