~ubuntu-branches/ubuntu/natty/ncbi-tools6/natty

« back to all changes in this revision

Viewing changes to network/entrez/client/netentr.h

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2002-04-04 22:13:09 UTC
  • Revision ID: james.westby@ubuntu.com-20020404221309-vfze028rfnlrldct
Tags: upstream-6.1.20011220a
ImportĀ upstreamĀ versionĀ 6.1.20011220a

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*   netentr.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:  netentr.h
 
27
*
 
28
* Author:  Ostell, Kans, Epstein
 
29
*
 
30
* Version Creation Date:   10/15/91
 
31
*
 
32
* $Revision: 6.2 $
 
33
*
 
34
* File Description: 
 
35
*       entrez index access library for Entrez network version
 
36
*
 
37
* Modifications:  
 
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.
 
43
*
 
44
* 11-20-94 Brylawski   Modified NetEntDoNeighborText to pass user preferences.
 
45
*
 
46
* ==========================================================================
 
47
* $Log: netentr.h,v $
 
48
* Revision 6.2  2000/07/08 20:44:03  vakatov
 
49
* Get all "#include" out of the 'extern "C" { }' scope;  other cleanup...
 
50
*
 
51
* Revision 6.1  1998/02/21 22:34:38  kans
 
52
* NetEntHierarchyGet passes type and field
 
53
*
 
54
* Revision 6.0  1997/08/25 18:34:57  madden
 
55
* Revision changed to 6.0
 
56
*
 
57
* Revision 5.2  1997/07/29 21:24:13  vakatov
 
58
* [WIN32,DLL]  DLL'zation of "netentr.lib"
 
59
*
 
60
* Revision 5.1  1996/08/14 19:47:49  epstein
 
61
* add annot get by feat ids, and also add date filtering support
 
62
*
 
63
 * Revision 5.0  1996/05/28  14:10:21  ostell
 
64
 * Set to revision 5.0
 
65
 *
 
66
 * Revision 4.5  1996/03/30  15:10:43  ostell
 
67
 * changed LIBCALL to CDECL in NetEntrezBiostructAnnotSetGet
 
68
 *
 
69
 * Revision 4.4  1996/03/29  18:55:49  epstein
 
70
 * add support for structure alignments
 
71
 *
 
72
 * Revision 4.3  1995/10/02  15:29:05  epstein
 
73
 * support range-checking
 
74
 *
 
75
 * Revision 4.2  1995/08/22  19:35:27  epstein
 
76
 * add clustering support
 
77
 *
 
78
 * Revision 4.1  1995/08/11  20:28:03  epstein
 
79
 * add max-models support for biostrucs
 
80
 *
 
81
 * Revision 4.0  1995/07/26  13:54:59  ostell
 
82
 * force revision to 4.0
 
83
 *
 
84
 * Revision 1.18  1995/06/29  16:36:46  epstein
 
85
 * add biostruc-complexity
 
86
*/
 
87
 
 
88
#ifndef _NETENTREZ_
 
89
#define _NETENTREZ_
 
90
 
 
91
#ifndef _ENTREZ_
 
92
#include <accentr.h>
 
93
#endif
 
94
 
 
95
#undef NLM_EXTERN
 
96
#ifdef NLM_IMPORT
 
97
#define NLM_EXTERN NLM_IMPORT
 
98
#else
 
99
#define NLM_EXTERN extern
 
100
#endif
 
101
 
 
102
#ifdef __cplusplus
 
103
extern "C" {
 
104
#endif
 
105
 
 
106
#define TERM_MAX 80
 
107
 
 
108
struct termresp {
 
109
    CharPtr term;
 
110
    Int4    special_count;
 
111
    Int4    total_count;
 
112
};
 
113
 
 
114
typedef struct {
 
115
    Int4    num_terms;
 
116
    Int4    first_page;
 
117
    Int4    num_pages_read;
 
118
    struct termresp PNTR termresp;
 
119
} TermResp, PNTR TermRespPtr;
 
120
 
 
121
typedef struct {
 
122
    DocType   type;
 
123
    DocField  field;
 
124
    CharPtr   term;
 
125
    CharPtr   highRange;
 
126
} TermData, PNTR TermDataPtr;
 
127
 
 
128
 
 
129
/**** Initialize and close session *********************/
 
130
 
 
131
NLM_EXTERN Boolean CDECL NetEntrezInit PROTO((CharPtr appl_id, Boolean no_warnings));
 
132
 
 
133
NLM_EXTERN void CDECL NetEntrezFini PROTO((void));
 
134
 
 
135
NLM_EXTERN EntrezInfoPtr NetEntrezGetInfo PROTO((void));
 
136
NLM_EXTERN CharPtr NetEntrezDetailedInfo PROTO((void));
 
137
 
 
138
/**** Get Types and Terms ******************************/
 
139
/**** prototypes are in netlib.h *********************/
 
140
 
 
141
/**** Get Links and Neighbors **************************/
 
142
 
 
143
NLM_EXTERN Int4 NetEntGetMaxLinks PROTO((void));
 
144
 
 
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));
 
148
 
 
149
/**** Get Summaries ************************************/
 
150
 
 
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));
 
153
 
 
154
/**** Get Term List ************************************/
 
155
 
 
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));
 
158
 
 
159
NLM_EXTERN Boolean CDECL NetEntrezFindTerm PROTO((DocType type, DocField field, CharPtr term, Int4Ptr spcl, Int4Ptr totl));
 
160
 
 
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));
 
164
 
 
165
 
 
166
/**** Look up terms with Boolean operations ************/
 
167
 
 
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));
 
174
 
 
175
/**** Get the Data **************************************/
 
176
 
 
177
NLM_EXTERN Int2 CDECL NetEntMedlineEntryListGet PROTO((MedlineEntryPtr PNTR result, Int2 numuid, DocUidPtr uids, Boolean mark_missing));
 
178
 
 
179
NLM_EXTERN Int2 CDECL NetEntSeqEntryListGet PROTO((SeqEntryPtr PNTR result, Int2 numuid,
 
180
        DocUidPtr uids, Int2 retcode, Boolean mark_missing));
 
181
 
 
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));
 
186
 
 
187
 
 
188
 
 
189
/**** Get a SeqId for a GI ***************************/
 
190
 
 
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));
 
195
 
 
196
/**** Neighbor some text on-the-fly ! ************/
 
197
NLM_EXTERN LinkSetPtr CDECL NetEntDoNeighborText PROTO((EntrezNeighborTextPtr entp));
 
198
NLM_EXTERN Boolean CDECL NetEntCanNeighborText PROTO((void));
 
199
 
 
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));
 
203
 
 
204
 
 
205
 
 
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));
 
208
 
 
209
#ifdef __cplusplus
 
210
}
 
211
#endif
 
212
 
 
213
#undef NLM_EXTERN
 
214
#ifdef NLM_EXPORT
 
215
#define NLM_EXTERN NLM_EXPORT
 
216
#else
 
217
#define NLM_EXTERN
 
218
#endif
 
219
 
 
220
 
 
221
/* # of retries to get a server */
 
222
#define ENT_SERV_RETRIES 2
 
223
 
 
224
 
 
225
#ifndef _NETROMLIB_
 
226
#include <netlib.h>
 
227
#endif
 
228
 
 
229
#endif
 
230
 
 
231
 
 
232
 
 
233
 
 
234