2
* ===========================================================================
5
* National Center for Biotechnology Information
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.
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
22
* Please cite the author in any work or product based on this material.
24
* ===========================================================================
26
* File Name: netentr.h
28
* Author: Ostell, Kans, Epstein
30
* Version Creation Date: 10/15/91
35
* entrez index access library for Entrez network version
38
* --------------------------------------------------------------------------
39
* Date Name Description of modification
40
* ------- ---------- -----------------------------------------------------
41
* 8-16-94 Brylawski Added declarations for on-the-fly neighboring,
42
* medline explosion, and mesh tree browsing.
44
* 11-20-94 Brylawski Modified NetEntDoNeighborText to pass user preferences.
46
* ==========================================================================
48
* Revision 6.2 2000/07/08 20:44:03 vakatov
49
* Get all "#include" out of the 'extern "C" { }' scope; other cleanup...
51
* Revision 6.1 1998/02/21 22:34:38 kans
52
* NetEntHierarchyGet passes type and field
54
* Revision 6.0 1997/08/25 18:34:57 madden
55
* Revision changed to 6.0
57
* Revision 5.2 1997/07/29 21:24:13 vakatov
58
* [WIN32,DLL] DLL'zation of "netentr.lib"
60
* Revision 5.1 1996/08/14 19:47:49 epstein
61
* add annot get by feat ids, and also add date filtering support
63
* Revision 5.0 1996/05/28 14:10:21 ostell
66
* Revision 4.5 1996/03/30 15:10:43 ostell
67
* changed LIBCALL to CDECL in NetEntrezBiostructAnnotSetGet
69
* Revision 4.4 1996/03/29 18:55:49 epstein
70
* add support for structure alignments
72
* Revision 4.3 1995/10/02 15:29:05 epstein
73
* support range-checking
75
* Revision 4.2 1995/08/22 19:35:27 epstein
76
* add clustering support
78
* Revision 4.1 1995/08/11 20:28:03 epstein
79
* add max-models support for biostrucs
81
* Revision 4.0 1995/07/26 13:54:59 ostell
82
* force revision to 4.0
84
* Revision 1.18 1995/06/29 16:36:46 epstein
85
* add biostruc-complexity
97
#define NLM_EXTERN NLM_IMPORT
99
#define NLM_EXTERN extern
118
struct termresp PNTR termresp;
119
} TermResp, PNTR TermRespPtr;
126
} TermData, PNTR TermDataPtr;
129
/**** Initialize and close session *********************/
131
NLM_EXTERN Boolean CDECL NetEntrezInit PROTO((CharPtr appl_id, Boolean no_warnings));
133
NLM_EXTERN void CDECL NetEntrezFini PROTO((void));
135
NLM_EXTERN EntrezInfoPtr NetEntrezGetInfo PROTO((void));
136
NLM_EXTERN CharPtr NetEntrezDetailedInfo PROTO((void));
138
/**** Get Types and Terms ******************************/
139
/**** prototypes are in netlib.h *********************/
141
/**** Get Links and Neighbors **************************/
143
NLM_EXTERN Int4 NetEntGetMaxLinks PROTO((void));
145
NLM_EXTERN LinkSetPtr CDECL NetUidLinks PROTO((DocType type, DocUid uid, DocType link_to_type));
146
NLM_EXTERN Int2 CDECL NetLinkUidList PROTO((LinkSetPtr PNTR result, DocType type,
147
DocType link_to_type, Int2 numuid, DocUidPtr uids, Boolean mark_missing));
149
/**** Get Summaries ************************************/
151
NLM_EXTERN Int2 CDECL NetDocSumListGet PROTO((DocSumPtr PNTR result, Int2 numuid, DocType type, DocUidPtr uids, Int2 defer_count));
152
NLM_EXTERN DocSumPtr CDECL NetDocSum PROTO((DocType type, DocUid uid));
154
/**** Get Term List ************************************/
156
NLM_EXTERN Int2 CDECL NetTermListByPage PROTO((DocType type, DocField field, Int2 page, Int2 numpage, TermListProc proc));
157
NLM_EXTERN Int2 CDECL NetTermListByTerm PROTO((DocType type, DocField field, CharPtr term, Int2 numterms, TermListProc proc, Int2Ptr first_page));
159
NLM_EXTERN Boolean CDECL NetEntrezFindTerm PROTO((DocType type, DocField field, CharPtr term, Int4Ptr spcl, Int4Ptr totl));
161
/**** Creates a term node from the uid parameter ********/
162
NLM_EXTERN void CDECL NetEntrezCreateNamedUidList PROTO((CharPtr term, DocType type, DocField field, Int4 num, DocUidPtr uids));
163
NLM_EXTERN void CDECL NetEntrezCreateNamedUidListX PROTO((CharPtr term, DocType type, DocField field, ByteStorePtr bsp));
166
/**** Look up terms with Boolean operations ************/
168
NLM_EXTERN ValNodePtr CDECL NetEntTLNew PROTO((DocType type));
169
NLM_EXTERN ValNodePtr CDECL NetEntTLAddTerm PROTO((ValNodePtr elst, CharPtr term, DocType type, DocField field, Boolean special, CharPtr highRange));
170
NLM_EXTERN ValNodePtr CDECL NetEntTLFree PROTO((ValNodePtr elst));
171
NLM_EXTERN LinkSetPtr CDECL NetEntTLEval PROTO((ValNodePtr elst));
172
NLM_EXTERN ByteStorePtr CDECL NetEntTLEvalX PROTO((ValNodePtr elst));
173
NLM_EXTERN Int4 CDECL NetEntTLEvalCount PROTO((ValNodePtr elst));
175
/**** Get the Data **************************************/
177
NLM_EXTERN Int2 CDECL NetEntMedlineEntryListGet PROTO((MedlineEntryPtr PNTR result, Int2 numuid, DocUidPtr uids, Boolean mark_missing));
179
NLM_EXTERN Int2 CDECL NetEntSeqEntryListGet PROTO((SeqEntryPtr PNTR result, Int2 numuid,
180
DocUidPtr uids, Int2 retcode, Boolean mark_missing));
182
NLM_EXTERN Int2 CDECL NetEntrezBiostrucListGet PROTO((BiostrucPtr PNTR result, Int4 mdlLvl, Int4 maxModels, Int2 numuid, DocUidPtr uids, Boolean mark_missing));
183
NLM_EXTERN BiostrucAnnotSetPtr CDECL NetEntrezBiostrucAnnotSetGet PROTO((DocUid uid));
184
NLM_EXTERN LinkSetPtr CDECL NetEntrezBiostrucFeatIds PROTO((DocUid mmdbid, Int2 feature_type, Int4 feature_set_id));
185
NLM_EXTERN BiostrucAnnotSetPtr CDECL NetEntrezBiostrucAnnotSetGetByFid PROTO((DocUid mmdbid, Int4 feature_id, Int4 feature_set_id));
189
/**** Get a SeqId for a GI ***************************/
191
NLM_EXTERN SeqIdPtr NetSeqIdForGI PROTO((Int4 gi));
192
NLM_EXTERN Int4 NetEntrezFindSeqId PROTO((SeqIdPtr sip));
193
NLM_EXTERN EntrezHierarchyPtr NetEntMeshHierarchyGet PROTO((CharPtr term));
194
NLM_EXTERN EntrezHierarchyPtr NetEntHierarchyGet PROTO((CharPtr term, DocType type, DocField field));
196
/**** Neighbor some text on-the-fly ! ************/
197
NLM_EXTERN LinkSetPtr CDECL NetEntDoNeighborText PROTO((EntrezNeighborTextPtr entp));
198
NLM_EXTERN Boolean CDECL NetEntCanNeighborText PROTO((void));
200
/**** BLAST a sequence on-the-fly ! ************/
201
NLM_EXTERN Boolean CDECL NetEntCanBlast PROTO((void));
202
NLM_EXTERN LinkSetPtr LIBCALL NetEntBlastBioseq PROTO((BioseqPtr bsp, DocType db, CharPtr program, CharPtr database, CharPtr options, Boolean usemonitor));
206
NLM_EXTERN Boolean CDECL NetEntExpandedMedlineFeatures PROTO((void));
207
NLM_EXTERN Int4 LIBCALL NetEntClusterAnalysis PROTO((DocUidPtr uids, Int4 numuids, DocField fld, Int4 minCluster, Int4 maxCluster, Int4 maxTerms, CharPtr *terms, Int4Ptr termTotals));
215
#define NLM_EXTERN NLM_EXPORT
221
/* # of retries to get a server */
222
#define ENT_SERV_RETRIES 2