|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/access/entrez2.asn |
source navigation diff markup identifier search freetext search file search |
1 --$Revision: 1.12 $********************************************
2 --
3 -- entrez2.asn
4 -- Version 1
5 --
6 -- API to Entrez Engine (1999)
7 -- Retrieval of sequence done through ID1 module
8 -- Also, SeqId queries
9 -- Retrieval of PubMed records through PubMed module
10 -- Retrieval of Structures through PubStruct module
11 -- Retrieval of Genomes through Genomes module
12 --
13 --***************************************************************
14
15 NCBI-Entrez2 DEFINITIONS ::=
16 BEGIN
17
18 --**************************************
19 -- Entrez2 common elements
20 --**************************************
21
22 Entrez2-dt ::= INTEGER -- a date/time stamp
23 Entrez2-db-id ::= VisibleString -- database name
24 Entrez2-field-id ::= VisibleString -- field name
25 Entrez2-link-id ::= VisibleString -- link name
26
27 Entrez2-id-list ::= SEQUENCE { -- list of record UIDs
28 db Entrez2-db-id , -- the database
29 num INTEGER , -- number of uids
30 uids OCTET STRING OPTIONAL } -- coded uids
31
32 --****************************************
33 -- The structured form of the boolean is the same in a request or
34 -- return so that it easy to modify a query. This means some
35 -- fields are only considered in a return value, like counts
36 -- by term. They are ignored in a request.
37 -- The structured boolean supports specific boolean components,
38 -- an unparsed string in query syntax, and UID lists as
39 -- elements of a boolean. This makes it possible to submit
40 -- a single string, a fully structured query, or a mixture.
41 -- The UID list feature means one can also perform refinements
42 -- on UID lists from links, neighbors, or other operations.
43 -- UID list query now returns a history key for subsequent use.
44 --*****************************************
45
46 Entrez2-boolean-exp ::= SEQUENCE {
47 db Entrez2-db-id , -- database for this query
48 exp SEQUENCE OF Entrez2-boolean-element , -- the Boolean
49 limits Entrez2-limits OPTIONAL } -- date bounds
50
51 Entrez2-boolean-element ::= CHOICE {
52 str VisibleString , -- unparsed query string
53 op Entrez2-operator , -- logical operator
54 term Entrez2-boolean-term , -- fielded term
55 ids Entrez2-id-list , -- list of UIDs - returns history key in reply
56 key VisibleString } -- history key for uploaded UID list or other query
57
58 --*****************************************
59 -- the term is both sent and received as parts of
60 -- queries and replies. The attributes can be filled in
61 -- by either, but may be ignored by one or the other. Flags are
62 -- shown if a real value is only of use in the query (Q), only
63 -- in the reply (R), or used in both (B)
64 -- do-not-explode and do-not-translate are only active set by
65 -- by the query. However, they retain those settings in the
66 -- return value so they can be resent with a new query
67 --******************************************
68
69 Entrez2-boolean-term ::= SEQUENCE {
70 field Entrez2-field-id , -- B
71 term VisibleString , -- B
72 term-count INTEGER OPTIONAL, -- R count of records with term
73 do-not-explode BOOLEAN DEFAULT FALSE, -- Q do not explode term
74 do-not-translate BOOLEAN DEFAULT FALSE} -- Q do not use synonyms
75
76 Entrez2-operator ::= INTEGER {
77 and (1) ,
78 or (2) ,
79 butnot (3) ,
80 range (4) ,
81 left-paren (5) ,
82 right-paren (6) }
83
84 --***************************************
85 -- Entrez2 Request types
86 --***************************************
87 --****************************************
88 -- The basic request wrapper leaves space for a version which
89 -- allow the server to support older clients
90 -- The tool parameter allows us to log the client types for
91 -- debugging and tuning
92 -- The cookie is a session ID returned by the first Entrez2-reply
93 --****************************************
94
95 Entrez2-request ::= SEQUENCE { -- a standard request
96 request E2Request , -- the actual request
97 version INTEGER , -- ASN1 spec version
98 tool VisibleString OPTIONAL , -- tool making request
99 cookie VisibleString OPTIONAL , -- history session cookie
100 use-history BOOLEAN DEFAULT FALSE } -- request should use history
101
102 E2Request ::= CHOICE { -- request types
103 get-info NULL , -- ask for info block
104 eval-boolean Entrez2-eval-boolean , -- Boolean lookup
105 get-docsum Entrez2-id-list , -- get the DocSums
106 get-term-pos Entrez2-term-query, -- get position in term list
107 get-term-list Entrez2-term-pos , -- get Term list by position
108 get-term-hierarchy Entrez2-hier-query, -- get a hierarchy from a term
109 get-links Entrez2-get-links , -- get specific links from a UID list
110 get-linked Entrez2-get-links , -- get subset of UID list which has links
111 get-link-counts Entrez2-id } -- get all links from one UID
112
113 --****************************************
114 -- When evaluating a boolean query the counts of hits is always
115 -- returned.
116 -- In addition, you can request the UIDs of the hits or the
117 -- the parsed query in structured form (with counts by term),
118 -- or both.
119 --****************************************
120
121 Entrez2-eval-boolean ::= SEQUENCE { -- evaluate Boolean query
122 return-UIDs BOOLEAN DEFAULT FALSE, -- return UID list?
123 return-parse BOOLEAN DEFAULT FALSE, -- return parsed query?
124 query Entrez2-boolean-exp } -- the actual query
125
126 Entrez2-dt-filter ::= SEQUENCE {
127 begin-date Entrez2-dt,
128 end-date Entrez2-dt,
129 type-date Entrez2-field-id }
130
131 Entrez2-limits ::= SEQUENCE { -- date limits
132 filter-date Entrez2-dt-filter OPTIONAL,
133 max-UIDs INTEGER OPTIONAL, -- max UIDs to return in list
134 offset-UIDs INTEGER OPTIONAL} -- start partway into UID list
135
136
137 Entrez2-id ::= SEQUENCE { -- a single UID
138 db Entrez2-db-id ,
139 uid INTEGER }
140
141 Entrez2-term-query ::= SEQUENCE {
142 db Entrez2-db-id ,
143 field Entrez2-field-id ,
144 term VisibleString }
145
146 Entrez2-hier-query ::= SEQUENCE {
147 db Entrez2-db-id ,
148 field Entrez2-field-id ,
149 term VisibleString OPTIONAL , -- query with either term
150 txid INTEGER OPTIONAL } -- or Taxonomy ID
151
152 Entrez2-term-pos ::= SEQUENCE { -- request portions of term list
153 db Entrez2-db-id ,
154 field Entrez2-field-id ,
155 first-term-pos INTEGER ,
156 number-of-terms INTEGER OPTIONAL } -- optional for hierarchy only
157
158 Entrez2-get-links ::= SEQUENCE { -- request links of one type
159 uids Entrez2-id-list , -- docs to link from
160 linktype Entrez2-link-id , -- type of link
161 max-UIDS INTEGER OPTIONAL , -- maximum number of links to return
162 count-only BOOLEAN OPTIONAL , -- return only the counts
163 parents-persist BOOLEAN OPTIONAL } -- allow original uids in list
164
165 --**********************************************************
166 -- Replies from the Entrez server
167 -- all replies contain the date/time stamp when they were executed
168 -- to do reqular date bounded searches use this value+1 to search
169 -- again later instead of recording the date/time on the client machine
170 -- the cookie allows a simple key string to represent UID lists in the history
171 --**********************************************************
172
173 Entrez2-reply ::= SEQUENCE {
174 reply E2Reply , -- the actual reply
175 dt Entrez2-dt , -- date/time stamp from server
176 server VisibleString , -- server version info
177 msg VisibleString OPTIONAL , -- possibly a message to the user
178 key VisibleString OPTIONAL , -- history key for query
179 cookie VisibleString OPTIONAL } -- history session cookie
180
181 E2Reply ::= CHOICE {
182 error VisibleString , -- if nothing can be returned
183 get-info Entrez2-info , -- the database info
184 eval-boolean Entrez2-boolean-reply, -- result of boolean query
185 get-docsum Entrez2-docsum-list,
186 get-term-pos INTEGER, -- position of the term
187 get-term-list Entrez2-term-list,
188 get-term-hierarchy Entrez2-hier-node,
189 get-links Entrez2-link-set,
190 get-linked Entrez2-id-list,
191 get-link-counts Entrez2-link-count-list }
192
193
194
195 Entrez2-info ::= SEQUENCE { -- describes all the databases
196 db-count INTEGER , -- number of databases
197 build-date Entrez2-dt , -- build date of databases
198 db-info SEQUENCE OF Entrez2-db-info } -- info by database
199
200 Entrez2-db-info ::= SEQUENCE { -- info for one database
201 db-name Entrez2-db-id , -- internal name
202 db-menu VisibleString , -- short name for menu
203 db-descr VisibleString , -- longer explanatory name
204 doc-count INTEGER , -- total number of records
205 field-count INTEGER , -- number of field types
206 fields SEQUENCE OF Entrez2-field-info,
207 link-count INTEGER , -- number of link types
208 links SEQUENCE OF Entrez2-link-info,
209 docsum-field-count INTEGER,
210 docsum-fields SEQUENCE OF Entrez2-docsum-field-info }
211
212 Entrez2-field-info ::= SEQUENCE { -- info about one field
213 field-name Entrez2-field-id , -- the internal name
214 field-menu VisibleString , -- short string suitable for menu
215 field-descr VisibleString , -- longer, explanatory name
216 term-count INTEGER , -- number of terms in field
217 is-date BOOLEAN OPTIONAL ,
218 is-numerical BOOLEAN OPTIONAL ,
219 single-token BOOLEAN OPTIONAL ,
220 hierarchy-avail BOOLEAN OPTIONAL ,
221 is-rangable BOOLEAN OPTIONAL ,
222 is-truncatable BOOLEAN OPTIONAL }
223
224 Entrez2-link-info ::= SEQUENCE { -- info about one link
225 link-name Entrez2-link-id ,
226 link-menu VisibleString ,
227 link-descr VisibleString ,
228 db-to Entrez2-db-id , -- database it links to
229 data-size INTEGER OPTIONAL } -- size of link data element
230
231 Entrez2-docsum-field-type ::= INTEGER {
232 string (1) ,
233 int (2) ,
234 float (3) ,
235 date-pubmed (4) }
236
237 Entrez2-docsum-field-info ::= SEQUENCE {
238 field-name VisibleString,
239 field-description VisibleString,
240 field-type Entrez2-docsum-field-type }
241
242 Entrez2-boolean-reply ::= SEQUENCE {
243 count INTEGER , -- records hit
244 uids Entrez2-id-list OPTIONAL, -- if uids requested
245 query Entrez2-boolean-exp OPTIONAL } -- if parsed query requested
246
247 Entrez2-docsum-list ::= SEQUENCE {
248 count INTEGER , -- number of docsums
249 list SEQUENCE OF Entrez2-docsum }
250
251 Entrez2-docsum ::= SEQUENCE {
252 uid INTEGER , -- primary uid (gi, pubmedid)
253 docsum-data SEQUENCE OF Entrez2-docsum-data }
254
255 Entrez2-docsum-data::= SEQUENCE {
256 field-name VisibleString,
257 field-value VisibleString }
258
259 Entrez2-term-list ::= SEQUENCE {
260 pos INTEGER, -- position of first term in list
261 num INTEGER, -- number of terms in list
262 list SEQUENCE OF Entrez2-term }
263
264 Entrez2-term ::= SEQUENCE {
265 term VisibleString ,
266 txid INTEGER OPTIONAL,
267 count INTEGER , -- count of records with this term
268 is-leaf-node BOOLEAN OPTIONAL } -- used for hierarchy only
269
270 Entrez2-hier-node ::= SEQUENCE { -- for hierarchical index
271 cannonical-form VisibleString , -- the official name
272 lineage-count INTEGER , -- number of strings in lineage
273 lineage SEQUENCE OF Entrez2-term OPTIONAL , -- strings up the lineage
274 child-count INTEGER , -- number of children of this node
275 children SEQUENCE OF Entrez2-term , -- the children
276 is-ambiguous BOOLEAN OPTIONAL } -- used for hierarchy only
277
278
279
280
281 --*******************************************
282 -- Links are returned in sets also using OCTET STRINGS
283 --*******************************************
284
285 Entrez2-link-set ::= SEQUENCE { -- set of links
286 ids Entrez2-id-list ,
287 data-size INTEGER OPTIONAL , -- size of data elements
288 data OCTET STRING OPTIONAL } -- coded scores
289
290 Entrez2-link-count-list ::= SEQUENCE { -- all links from 1 uid
291 link-type-count INTEGER , -- number of types of links
292 links SEQUENCE OF Entrez2-link-count }
293
294 Entrez2-link-count ::= SEQUENCE { -- link count of one type
295 link-type Entrez2-link-id ,
296 link-count INTEGER }
297
298 END
299
300
|
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |