|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/cdromlib/objentr.h |
source navigation diff markup identifier search freetext search file search |
1 /* objentr.h
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * RCS $Id: objentr.h,v 6.3 1999/08/17 16:31:27 kans Exp $
27 *
28 * Author: Ostell, Schuler
29 *
30 * Version Creation Date: 6/28/94
31 *
32 * File Description:
33 * entrez index access library for Entrez
34 *
35 * Modifications:
36 * --------------------------------------------------------------------------
37 * Date Name Description of modification
38 * ------- ---------- -----------------------------------------------------
39 * 06-28-94 Schuler This file created from definitions extracted
40 * from accentr.h
41 * 11-21-94 Schuler Changed DocUid from long to Int4
42 * 11-30-94 Schuler Added cd_count field to EntrezInfo
43 * 03-13-95 Schuler Bumped DocType_MAX up to 8 (was 5)
44 * 05-16-94 Schuler Added RCS Log directive. Comments will henceforth
45 * be inserted automatically into the source at the
46 * time it is checked into the system.
47
48 $Log: objentr.h,v $
49 Revision 6.3 1999/08/17 16:31:27 kans
50 increased field tag size to handle current data
51
52 Revision 6.2 1998/03/26 23:23:19 yaschenk
53 adding CdRomAsnLoad() as extern function to load Asn tree
54
55 Revision 6.1 1997/10/07 22:09:46 volodya
56 new data fields (entrezDate, pStatus, pLanguage, pPubType) have added to DocSum structure
57
58 Revision 6.0 1997/08/25 18:13:18 madden
59 Revision changed to 6.0
60
61 Revision 5.3 1997/06/26 21:55:48 vakatov
62 [PC] DLL'd "ncbicdr.lib", "ncbiacc.lib", "ncbinacc.lib" and "ncbicacc.lib"
63
64 Revision 5.2 1997/03/05 16:48:47 brandon
65 added link information to EntrezInfo structure
66
67 * Revision 5.1 1996/07/22 15:31:40 brandon
68 * *** empty log message ***
69 *
70 * Revision 5.0 1996/05/28 13:55:34 ostell
71 * Set to revision 5.0
72 *
73 * Revision 4.0 1995/07/26 13:50:32 ostell
74 * force revision to 4.0
75 *
76 * Revision 1.8 1995/07/10 19:42:49 epstein
77 * add object loaders for DocSum
78 *
79 * Revision 1.7 1995/05/16 14:12:46 schuler
80 * Automatic comment insertion enabled
81 *
82 * ==========================================================================
83 */
84
85 #ifndef _ObjEntr_h_
86 #define _ObjEntr_h_
87
88 #undef NLM_EXTERN
89 #ifdef NLM_IMPORT
90 #define NLM_EXTERN NLM_IMPORT
91 #else
92 #define NLM_EXTERN extern
93 #endif
94
95 #ifdef __cplusplus
96 extern "C" {
97 #endif
98
99
100 #define DocType_MAX 5
101
102 /*typedef long DocUid;*/
103 #define DocUid Int4
104
105 typedef struct CdDate
106 {
107 unsigned year : 12;
108 unsigned month : 5;
109 unsigned day : 6;
110 }
111 CdDate;
112
113 typedef struct DocSum
114 {
115 DocUid uid;
116 DocUid secondaryUid;
117 unsigned non_document :1;
118 unsigned translated_title :1;
119 unsigned no_authors :1;
120 unsigned no_abstract :1;
121 unsigned is_segmented :1;
122 unsigned is_partial :1;
123 unsigned not_yet_neighbored :1;
124 CdDate create;
125 CdDate modify;
126 char *caption;
127 char *title;
128 char *extra;
129 short link_count[DocType_MAX];
130 Uint4 entrezDate; /* Entrez Date */
131 CharPtr pStatus; /* Article processing status */
132 CharPtr pLanguage; /* Language abbreviations */
133 CharPtr pPubType; /* Publication type */
134 }
135 DocSum, PNTR DocSumPtr;
136
137 typedef enum PostType
138 {
139 PostType_sort,
140 PostType_unsort,
141 PostType_hier,
142 PostType_text,
143 PostType_other =255
144 }
145 PostType;
146
147 typedef struct EntrezFieldData
148 {
149 long num_terms; /* number of terms in this field */
150 short num_bucket; /* number of buckets of terms */
151 }
152 EntrezFieldData, *EntrezFieldDataPtr;
153
154 typedef struct EntrezTypeData
155 {
156 long num; /* number of entries */
157 long num_uids; /* number of uids */
158 DocUid minuid; /* minimum uid for this type */
159 DocUid maxuid; /* maxuid for this type */
160 short num_bucket; /* number of uid buckets */
161 EntrezFieldData *fields;
162 }
163 EntrezTypeData, *EntrezTypeDataPtr;
164
165 typedef struct EntrezTypeInfo
166 {
167 short id; /* id number to pass to APIs */
168 char tag[4]; /* 2-letter tag (for internal use) */
169 char *name; /* short string to go on menu */
170 char *descr; /* longer, descriptive string */
171 char *asntype; /* ASN.1 type (e.g. "Medline-entry") */
172 }
173 EntrezTypeInfo;
174
175 typedef struct EntrezFieldInfo
176 {
177 short id; /* id number to pass to APIs */
178 char tag[7]; /* 4-letter tag (for internal use) */
179 char *name; /* short string to go on menu */
180 char *descr; /* longer, descriptive string */
181 unsigned single_token :1; /* all terms are single-token */
182 unsigned has_special :1; /* terms may have special postings */
183 unsigned hier_avail :1; /* a hierarchical counterpart exists */
184 short hier_id; /* field-id of hierarchy */
185 PostType post_type; /* postings type */
186 }
187 EntrezFieldInfo;
188
189 typedef struct EntrezLinkInfo
190 {
191 Int4 id; /* id number to pass to APIs (volatile) */
192 CharPtr tag; /* identifier string (for internal use) */
193 CharPtr name; /* short string to go on menu */
194 CharPtr descr; /* longer, descriptive string */
195 Int4 dbfrom; /* database link points from */
196 Int4 dbto; /* database link points to */
197 Int4 datasize; /* size of link-associated data (bytes) */
198 Int4 reciprocal; /* id number of reciprocal link(volatile)*/
199 }
200 EntrezLinkInfo;
201
202 typedef struct EntrezDivInfo
203 {
204 char tag[4]; /* 3-letter tag (for internal use) */
205 char *descr; /* Division description */
206 char *reldate; /* Release number and/or date string */
207 CdDate date; /* Structured release date */
208 long *docs; /* Document counts for each type */
209 }
210 EntrezDivInfo;
211
212 typedef struct EntrezInfo
213 {
214 char *volume_label; /* name */
215 char *descr; /* description */
216 short version; /* major release number */
217 short issue; /* minor release number */
218 short format; /* (for internal use) */
219 CdDate release_date; /* Entrez release date */
220 CdDate close_date; /* close-of-date date for Entrez release */
221 Boolean no_compression; /* **DEFUNCT** */
222 short huff_count; /* **DEFUNCT** */
223 short *huff_left; /* **DEFUNCT** */
224 short *huff_right; /* **DEFUNCT** */
225 short type_count; /* number of document types */
226 EntrezTypeData *types;
227 EntrezTypeInfo *type_info;
228 char **type_names; /* **DEFUNCT** Use type_info[n]->name instead */
229 short type_bucket_size;
230 short field_count;
231 EntrezFieldInfo *field_info;
232 char **field_names; /* **DEFUNCT** Use field_info[n]->name instead */
233 short field_bucket_size;
234 short div_count; /* number of divisions */
235 EntrezDivInfo *div_info; /* division-specific info */
236 int cd_count; /* how many CD-ROMs in distribution? zero for net */
237 Int4 link_count;
238 EntrezLinkInfo *link_info;
239 }
240 EntrezInfo, *EntrezInfoPtr;
241
242 NLM_EXTERN Boolean LIBCALL CdRomAsnLoad PROTO((void));
243 NLM_EXTERN EntrezInfoPtr LIBCALL EntrezInfoFree PROTO((EntrezInfo *info));
244 NLM_EXTERN EntrezInfoPtr LIBCALL EntrezInfoAsnRead PROTO((AsnIo *aip, AsnType *orig));
245 NLM_EXTERN Boolean LIBCALL EntrezInfoAsnWrite PROTO((EntrezInfo *info, AsnIo *aip, AsnType *orig));
246
247
248 NLM_EXTERN DocSumPtr LIBCALL DocSumNew PROTO (( void ));
249 NLM_EXTERN DocSumPtr LIBCALL DocSumAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
250 NLM_EXTERN Boolean LIBCALL DocSumAsnWrite PROTO (( DocSumPtr , AsnIoPtr, AsnTypePtr));
251
252 #ifdef __cplusplus
253 }
254 #endif
255
256 #undef NLM_EXTERN
257 #ifdef NLM_EXPORT
258 #define NLM_EXTERN NLM_EXPORT
259 #else
260 #define NLM_EXTERN
261 #endif
262
263 #endif
264
265
266 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |