|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/object/objbibli.h |
source navigation diff markup identifier search freetext search file search |
1 /* objbibli.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 * File Name: objbibli.h
27 *
28 * Author: James Ostell
29 *
30 * Version Creation Date: 1/1/91
31 *
32 * $Revision: 6.2 $
33 *
34 * File Description: Object manager interface for module NCBI-Biblio
35 *
36 * Modifications:
37 * --------------------------------------------------------------------------
38 * Date Name Description of modification
39 * ------- ---------- -----------------------------------------------------
40 * 05-17-93 Schuler struct affil ---> struct _affil_ (because one of
41 * the fields in the struct is also called affil, which
42 * C++ compilers take to be a constructor function).
43 *
44 * $Log: objbibli.h,v $
45 * Revision 6.2 2005/05/18 17:31:01 bollin
46 * added AffilMatch and AuthorMatch functions
47 *
48 * Revision 6.1 2000/01/18 19:40:52 ostell
49 * added support for PubStatusDate, ArticleIds
50 *
51 * Revision 6.0 1997/08/25 18:49:23 madden
52 * Revision changed to 6.0
53 *
54 * Revision 4.2 1997/06/19 18:40:50 vakatov
55 * [WIN32,MSVC++] Adopted for the "NCBIOBJ.LIB" DLL'ization
56 *
57 * Revision 4.1 1996/03/29 21:09:59 ostell
58 * added support for PubMedId
59 *
60 * Revision 4.0 1995/07/26 13:48:06 ostell
61 * force revision to 4.0
62 *
63 * Revision 3.2 1995/05/15 21:22:00 ostell
64 * added Log line
65 *
66 *
67 *
68 * ==========================================================================
69 */
70
71 #ifndef _NCBI_Biblio_
72 #define _NCBI_Biblio_
73
74 #ifndef _ASNTOOL_
75 #include <asn.h>
76 #endif
77 #ifndef _NCBI_General_
78 #include <objgen.h>
79 #endif
80
81 #undef NLM_EXTERN
82 #ifdef NLM_IMPORT
83 #define NLM_EXTERN NLM_IMPORT
84 #else
85 #define NLM_EXTERN extern
86 #endif
87
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
91
92 /*****************************************************************************
93 *
94 * loader
95 *
96 *****************************************************************************/
97 NLM_EXTERN Boolean LIBCALL BiblioAsnLoad PROTO((void));
98
99 /*****************************************************************************
100 *
101 * ArticleId
102 *
103 *****************************************************************************/
104 typedef ValNode ArticleId, PNTR ArticleIdPtr;
105
106 #define ARTICLEID_PUBMED 1 /* pubmed id - integer */
107 #define ARTICLEID_MEDLINE 2 /* medline uid - integer */
108 #define ARTICLEID_DOI 3 /* doi - string */
109 #define ARTICLEID_PII 4 /* pii - string */
110 #define ARTICLEID_PMCID 5 /* pubmed central id - integer */
111 #define ARTICLEID_PMCPID 6 /* publisherid from Pubmed central - string */
112 #define ARTICLEID_PMPID 7 /* publisherId from pubmed - string */
113 #define ARTICLEID_OTHER 8 /* generic - DbTag */
114
115 NLM_EXTERN ArticleIdPtr LIBCALL ArticleIdNew PROTO((void));
116 NLM_EXTERN ArticleIdPtr LIBCALL ArticleIdFree PROTO((ArticleIdPtr aidp));
117 NLM_EXTERN ArticleIdPtr LIBCALL ArticleIdAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
118 NLM_EXTERN Boolean LIBCALL ArticleIdAsnWrite PROTO((ArticleIdPtr aidp, AsnIoPtr aip, AsnTypePtr atp));
119
120
121 /*****************************************************************************
122 *
123 * PubStatusDate
124 *
125 *****************************************************************************/
126 #define PUBSTATUS_received 1
127 #define PUBSTATUS_accepted 2
128 #define PUBSTATUS_epublish 3
129 #define PUBSTATUS_ppublish 4
130 #define PUBSTATUS_revised 5
131 #define PUBSTATUS_pmc 6
132 #define PUBSTATUS_pmcr 7
133 #define PUBSTATUS_pubmed 8
134 #define PUBSTATUS_pubmedr 9
135 #define PUBSTATUS_aheadofprint 10
136 #define PUBSTATUS_premedline 11
137 #define PUBSTATUS_medline 12
138 #define PUBSTATUS_other 255
139
140 typedef struct _pubstatusdate_ {
141 Uint1 pubstatus;
142 DatePtr date;
143 struct _pubstatusdate_ * next;
144 } PubStatusDate, PNTR PubStatusDatePtr;
145
146 NLM_EXTERN PubStatusDatePtr LIBCALL PubStatusDateNew PROTO((void));
147 NLM_EXTERN PubStatusDatePtr LIBCALL PubStatusDateFree PROTO((PubStatusDatePtr psdp));
148 NLM_EXTERN PubStatusDatePtr LIBCALL PubStatusDateAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
149 NLM_EXTERN Boolean LIBCALL PubStatusDateAsnWrite PROTO((PubStatusDatePtr psdp, AsnIoPtr aip, AsnTypePtr atp));
150
151 /*****************************************************************************
152 *
153 * Affil
154 *
155 *****************************************************************************/
156 typedef struct _affil_ {
157 Uint1 choice; /* [1]=str,[2]=std */
158 CharPtr affil, /* also used for str */
159 div,
160 city,
161 sub,
162 country,
163 street,
164 email,
165 fax,
166 phone,
167 postal_code;
168 } Affil, PNTR AffilPtr;
169
170 NLM_EXTERN AffilPtr LIBCALL AffilNew PROTO((void));
171 NLM_EXTERN AffilPtr LIBCALL AffilFree PROTO((AffilPtr afp));
172 NLM_EXTERN AffilPtr LIBCALL AffilAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
173 NLM_EXTERN Boolean LIBCALL AffilAsnWrite PROTO((AffilPtr afp, AsnIoPtr aip, AsnTypePtr atp));
174 NLM_EXTERN Boolean AffilMatch (AffilPtr ap1, AffilPtr ap2);
175
176 /*****************************************************************************
177 *
178 * AuthList
179 *
180 *****************************************************************************/
181 typedef struct authors {
182 Uint1 choice; /* [1]=std, [2]=ml, [3]=str (only on Cit-art,gen) */
183 ValNodePtr names; /* the SEQUENCE OF */
184 AffilPtr affil;
185 } AuthList, PNTR AuthListPtr;
186
187 NLM_EXTERN AuthListPtr LIBCALL AuthListNew PROTO((void));
188 NLM_EXTERN AuthListPtr LIBCALL AuthListFree PROTO((AuthListPtr asp));
189 NLM_EXTERN AuthListPtr LIBCALL AuthListAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
190 NLM_EXTERN Boolean LIBCALL AuthListAsnWrite PROTO((AuthListPtr afp, AsnIoPtr aip, AsnTypePtr atp));
191 NLM_EXTERN Int2 LIBCALL AuthListMatch PROTO((AuthListPtr a, AuthListPtr b, Boolean all));
192
193 /*****************************************************************************
194 *
195 * Author
196 *
197 *****************************************************************************/
198 typedef struct author {
199 PersonIdPtr name;
200 Uint1 lr[2]; /* level[0], role[1] as in spec. 0=not used */
201 Uint1 is_corr; /* corresponding author? 255=not set, 0=false, 1=true */
202 AffilPtr affil;
203 } Author, PNTR AuthorPtr;
204
205 NLM_EXTERN AuthorPtr LIBCALL AuthorNew PROTO((void));
206 NLM_EXTERN AuthorPtr LIBCALL AuthorFree PROTO((AuthorPtr ap));
207 NLM_EXTERN AuthorPtr LIBCALL AuthorAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
208 NLM_EXTERN Boolean LIBCALL AuthorAsnWrite PROTO((AuthorPtr ap, AsnIoPtr aip, AsnTypePtr atp));
209 NLM_EXTERN Boolean LIBCALL AuthorMatch (AuthorPtr ap1, AuthorPtr ap2);
210
211 /*****************************************************************************
212 *
213 * Cit-art
214 *
215 *****************************************************************************/
216 typedef struct citart {
217 ValNodePtr title; /* choice[1]=name,[2]=tsub,[3]=trans */
218 AuthListPtr authors;
219 Uint1 from; /* [1]=journal,[2]=book,[3]=proc */
220 Pointer fromptr;
221 ArticleIdPtr ids;
222 } CitArt, PNTR CitArtPtr;
223
224 NLM_EXTERN CitArtPtr LIBCALL CitArtNew PROTO((void));
225 NLM_EXTERN CitArtPtr LIBCALL CitArtFree PROTO((CitArtPtr cap));
226 NLM_EXTERN CitArtPtr LIBCALL CitArtAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
227 NLM_EXTERN Boolean LIBCALL CitArtAsnWrite PROTO((CitArtPtr cap, AsnIoPtr aip, AsnTypePtr atp));
228 NLM_EXTERN Int2 LIBCALL CitArtMatch PROTO((CitArtPtr a, CitArtPtr b));
229
230 /*****************************************************************************
231 *
232 * Retraction/Erratum
233 *
234 *****************************************************************************/
235 typedef struct citretract {
236 Uint1 type; /* 1=retracted, 2=retraction notice, 3=in error, 4=erratum */
237 CharPtr exp; /* explanation */
238 } CitRetract, PNTR CitRetractPtr;
239
240 NLM_EXTERN CitRetractPtr LIBCALL CitRetractNew PROTO((void));
241 NLM_EXTERN CitRetractPtr LIBCALL CitRetractFree PROTO((CitRetractPtr crp));
242 NLM_EXTERN CitRetractPtr LIBCALL CitRetractAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
243 NLM_EXTERN Boolean LIBCALL CitRetractAsnWrite PROTO((CitRetractPtr crp, AsnIoPtr aip, AsnTypePtr atp));
244
245 /*****************************************************************************
246 *
247 * Imprint
248 *
249 *****************************************************************************/
250 typedef struct imprint {
251 DatePtr date;
252 CharPtr volume,
253 issue,
254 pages,
255 section,
256 part_sup, /* part/sup of volume */
257 language;
258 DatePtr cprt; /* copy right date (for books) */
259 AffilPtr pub; /* publisher (for books) */
260 Uint1 prepub; /* 0=not set 1=submitted 2=in-press 255=other */
261 CharPtr part_supi; /* part/sup of issue */
262 CitRetractPtr retract;
263 Uint1 pubstatus;
264 PubStatusDatePtr history;
265 } Imprint, PNTR ImprintPtr;
266
267 NLM_EXTERN ImprintPtr LIBCALL ImprintNew PROTO((void));
268 NLM_EXTERN ImprintPtr LIBCALL ImprintFree PROTO((ImprintPtr cap));
269 NLM_EXTERN ImprintPtr LIBCALL ImprintAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
270 NLM_EXTERN Boolean LIBCALL ImprintAsnWrite PROTO((ImprintPtr cap, AsnIoPtr aip, AsnTypePtr atp));
271 NLM_EXTERN Int2 LIBCALL ImprintMatch PROTO((ImprintPtr a, ImprintPtr b, Boolean all));
272
273 /*****************************************************************************
274 *
275 * Cit-jour
276 *
277 *****************************************************************************/
278 typedef struct citjour {
279 ValNodePtr title; /* choice in order of spec, 1=name,2=trans,etc */
280 ImprintPtr imp;
281 } CitJour, PNTR CitJourPtr;
282
283 NLM_EXTERN CitJourPtr LIBCALL CitJourNew PROTO((void));
284 NLM_EXTERN CitJourPtr LIBCALL CitJourFree PROTO((CitJourPtr cjp));
285 NLM_EXTERN CitJourPtr LIBCALL CitJourAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
286 NLM_EXTERN Boolean LIBCALL CitJourAsnWrite PROTO((CitJourPtr cjp, AsnIoPtr aip, AsnTypePtr atp));
287 NLM_EXTERN Int2 LIBCALL CitJourMatch PROTO((CitJourPtr a, CitJourPtr b));
288
289 /*****************************************************************************
290 *
291 * Cit-book
292 *
293 *****************************************************************************/
294 typedef struct citbook {
295 ValNodePtr title, /* choice in order of spec, 1=name, 2=tsub, etc */
296 coll; /* ditto */
297 AuthListPtr authors;
298 ImprintPtr imp;
299 Uint1 othertype, /* 0=Cit-book, 1=Cit-proc, 2=Cit-let */
300 let_type; /* if Cit-let, 1=manuscript,2=letter,3=thesis */
301 Pointer otherdata; /* NULL, ValNodes, CharPtr man-id */
302 } CitBook, PNTR CitBookPtr;
303
304 NLM_EXTERN CitBookPtr LIBCALL CitBookNew PROTO((void));
305 NLM_EXTERN CitBookPtr LIBCALL CitBookFree PROTO((CitBookPtr cbp));
306 NLM_EXTERN CitBookPtr LIBCALL CitBookAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
307 NLM_EXTERN Boolean LIBCALL CitBookAsnWrite PROTO((CitBookPtr cbp, AsnIoPtr aip, AsnTypePtr atp));
308 NLM_EXTERN Int2 LIBCALL CitBookMatch PROTO((CitBookPtr a, CitBookPtr b));
309
310 /*****************************************************************************
311 *
312 * Cit-sub
313 * Direct submission of data
314 *
315 *****************************************************************************/
316 typedef struct citsub {
317 AuthListPtr authors;
318 ImprintPtr imp; /* WARNING: imp will be removed next year */
319 Uint1 medium;
320 DatePtr date; /* this will replace imp */
321 CharPtr descr; /* description of what happened */
322 } CitSub, PNTR CitSubPtr;
323
324 NLM_EXTERN CitSubPtr LIBCALL CitSubNew PROTO((void));
325 NLM_EXTERN CitSubPtr LIBCALL CitSubFree PROTO((CitSubPtr cbp));
326 NLM_EXTERN CitSubPtr LIBCALL CitSubAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
327 NLM_EXTERN Boolean LIBCALL CitSubAsnWrite PROTO((CitSubPtr cbp, AsnIoPtr aip, AsnTypePtr atp));
328 NLM_EXTERN Int2 LIBCALL CitSubMatch PROTO((CitSubPtr a, CitSubPtr b));
329
330
331 /*****************************************************************************
332 *
333 * Cit-proc
334 * uses otherdata in Cit-book
335 * chain of ValNodes
336 * choice ident Pointer type
337 * 1 number CharPtr
338 * 2 date DatePtr
339 * 3 place AffilPtr
340 *
341 *****************************************************************************/
342 NLM_EXTERN CitBookPtr LIBCALL CitProcAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
343 NLM_EXTERN Boolean LIBCALL CitProcAsnWrite PROTO((CitBookPtr cpp, AsnIoPtr aip, AsnTypePtr atp));
344
345 /*****************************************************************************
346 *
347 * Cit-let
348 * uses otherdata in Cit-book as CharPtr for man-id
349 *
350 *****************************************************************************/
351 NLM_EXTERN CitBookPtr LIBCALL CitLetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
352 NLM_EXTERN Boolean LIBCALL CitLetAsnWrite PROTO((CitBookPtr cpp, AsnIoPtr aip, AsnTypePtr atp));
353
354
355
356 /*****************************************************************************
357 *
358 * Cit-pat
359 *
360 *****************************************************************************/
361
362 typedef struct patpriority {
363 CharPtr country,
364 number;
365 DatePtr date;
366 struct patpriority PNTR next;
367 } PatPriority, PNTR PatPriorityPtr;
368
369 typedef struct citpat {
370 CharPtr title;
371 AuthListPtr authors;
372 CharPtr country,
373 doc_type,
374 number;
375 DatePtr date_issue;
376 ValNodePtr _class;
377 CharPtr app_number;
378 DatePtr app_date;
379 AuthListPtr applicants;
380 AuthListPtr assignees;
381 PatPriorityPtr priority;
382 CharPtr abstract;
383 } CitPat, PNTR CitPatPtr;
384
385 NLM_EXTERN CitPatPtr LIBCALL CitPatNew PROTO((void));
386 NLM_EXTERN CitPatPtr LIBCALL CitPatFree PROTO((CitPatPtr cpp));
387 NLM_EXTERN CitPatPtr LIBCALL CitPatAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
388 NLM_EXTERN Boolean LIBCALL CitPatAsnWrite PROTO((CitPatPtr cpp, AsnIoPtr aip, AsnTypePtr atp));
389
390 NLM_EXTERN PatPriorityPtr LIBCALL PatPriorityNew PROTO((void));
391 NLM_EXTERN PatPriorityPtr LIBCALL PatPrioritySetFree PROTO((PatPriorityPtr ppp));
392 NLM_EXTERN PatPriorityPtr LIBCALL PatPrioritySetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
393 NLM_EXTERN Boolean LIBCALL PatPrioritySetAsnWrite PROTO((PatPriorityPtr ppp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
394 /*****************************************************************************
395 *
396 * Id-pat
397 *
398 *****************************************************************************/
399 typedef struct idpat {
400 CharPtr country,
401 number, /** actually CHOICE of number or app_number */
402 app_number;
403 CharPtr doc_type;
404 } IdPat, PNTR IdPatPtr;
405
406 NLM_EXTERN IdPatPtr LIBCALL IdPatNew PROTO((void));
407 NLM_EXTERN IdPatPtr LIBCALL IdPatFree PROTO((IdPatPtr ipp));
408 NLM_EXTERN IdPatPtr LIBCALL IdPatAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
409 NLM_EXTERN Boolean LIBCALL IdPatAsnWrite PROTO((IdPatPtr ipp, AsnIoPtr aip, AsnTypePtr atp));
410 NLM_EXTERN Boolean LIBCALL IdPatMatch PROTO((IdPatPtr a, IdPatPtr b));
411
412 /*****************************************************************************
413 *
414 * Cit-gen
415 *
416 *****************************************************************************/
417 typedef struct cit_gen {
418 CharPtr cit;
419 AuthListPtr authors;
420 Int4 muid; /* medline uid, -1 if not set */
421 ValNodePtr journal; /* journal/book Title */
422 CharPtr volume,
423 issue,
424 pages;
425 DatePtr date;
426 Int2 serial_number; /* for GenBank style references (-1 = not used)*/
427 CharPtr title; /* a specific title (in addition to cit or journal) */
428 Int4 pmid; /* PubMedId */
429 } CitGen, PNTR CitGenPtr;
430
431 NLM_EXTERN CitGenPtr LIBCALL CitGenNew PROTO((void));
432 NLM_EXTERN CitGenPtr LIBCALL CitGenFree PROTO((CitGenPtr cgp));
433 NLM_EXTERN CitGenPtr LIBCALL CitGenAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
434 NLM_EXTERN Boolean LIBCALL CitGenAsnWrite PROTO((CitGenPtr cgp, AsnIoPtr aip, AsnTypePtr atp));
435 NLM_EXTERN Int2 LIBCALL CitGenMatch PROTO((CitGenPtr a, CitGenPtr b, Boolean all));
436
437 /*****************************************************************************
438 *
439 * Title
440 *
441 *****************************************************************************/
442
443 NLM_EXTERN ValNodePtr LIBCALL TitleFree PROTO((ValNodePtr anp));
444 NLM_EXTERN ValNodePtr LIBCALL TitleAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
445 NLM_EXTERN Boolean LIBCALL TitleAsnWrite PROTO((ValNodePtr anp, AsnIoPtr aip, AsnTypePtr atp));
446 NLM_EXTERN Int2 LIBCALL TitleMatch PROTO((ValNodePtr a, ValNodePtr b, Uint1 type));
447
448 #define Cit_title_name ( (Uint1) 1)
449 #define Cit_title_tsub ( (Uint1) 2)
450 #define Cit_title_trans ( (Uint1) 3)
451 #define Cit_title_jta ( (Uint1) 4)
452 #define Cit_title_iso_jta ( (Uint1) 5)
453 #define Cit_title_ml_jta ( (Uint1) 6)
454 #define Cit_title_coden ( (Uint1) 7)
455 #define Cit_title_issn ( (Uint1) 8)
456 #define Cit_title_abr ( (Uint1) 9)
457 #define Cit_title_isbn ( (Uint1) 10)
458
459 #ifdef __cplusplus
460 }
461 #endif
462
463 #undef NLM_EXTERN
464 #ifdef NLM_EXPORT
465 #define NLM_EXTERN NLM_EXPORT
466 #else
467 #define NLM_EXTERN
468 #endif
469
470 #endif
471 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |