source: main/trunk/greenstone2/runtime-src/src/recpt/comproto.asn@ 28762

Last change on this file since 28762 was 17863, checked in by anna, 15 years ago

change the name tidy_html switch in HTMLPlug into use_realistic_book in HTMLPlugin

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 10.2 KB
Line 
1-- The protocol data unit (PDU) is the
2-- message that is transmitted between receptionists and
3-- collectionservers (colservers?).
4--
5-- Comments in ASN.1 start with two dashes and continue to the end
6-- of a line (or to the next two dashes, whichever is first).
7--
8-- Z39.50 has inspired much of this but I have tried to keep
9-- it simple. Its hard to tell if I have succeeded ;-)
10
11
12GSDL-APDU DEFINITIONS ::=
13BEGIN
14
15
16-- PDU is the basic message type. Note: in ASN.1 the
17-- field name comes first and the field type second (opposite
18-- to C). Ignore the numbers in the square brackets (e.g. [0]),
19-- they're just tags to disambiguate certain circumstances and to
20-- make the protocol easier to extend. The keyword 'IMPLICIT' just
21-- makes the tags a little more efficient.
22--
23-- A SEQUENCE is a list of fields where the order is important
24
25PDU ::= SEQUENCE {
26 header StandardHeader,
27 message Message
28}
29
30
31-- ????? Is there anything else we want in the header ?????
32--
33-- Anonymous transactions should leave out the idAuthentication field
34
35StandardHeader ::= SEQUENCE {
36 protocolVersion [0] IMPLICIT INTEGER,
37 idAuthentication [1] IMPLICIT IdAuthentication OPTIONAL
38}
39
40IdAuthentication ::= SEQUENCE {
41 userId GeneralString,
42 groupId GeneralString,
43 password GeneralString
44}
45
46
47-- A CHOICE is like a union in C.
48--
49-- Short forms: Auth (Authority), Mir (Mirror), Col (Collection),
50-- Doc (Document), Info (Information)
51
52Message ::= CHOICE {
53 -- General
54 error [0] IMPLICIT Error,
55 pingRequest [1] IMPLICIT PingRequest,
56 pingResponse [2] IMPLICIT PingResponse,
57
58 -- Authority
59-- authListRequest [12] IMPLICIT AuthListRequest,
60-- authListResponse [13] IMPLICIT AuthListResponse,
61-- editAuthListRequest [14] IMPLICIT EditAuthListRequest,
62-- editAuthListResponse [15] IMPLICIT EditAuthListResponse,
63
64 -- an authority mirror is a mirror of THIS authority
65-- authMirListRequest [16] IMPLICIT AuthMirListRequest,
66-- authMirListResponse [17] IMPLICIT AuthMirListResponse,
67-- editAuthMirListRequest [18] IMPLICIT EditAuthMirListRequest,
68-- editAuthMirListResponse [19] IMPLICIT EditAuthMirListResponse,
69
70 colListRequest [20] IMPLICIT ColListRequest,
71 colListResponse [21] IMPLICIT ColListResponse,
72-- editColListRequest [22] IMPLICIT EditColListRequest,
73-- editColListResponse [23] IMPLICIT EditColListResponse,
74
75-- colMirListRequest [24] IMPLICIT ColMirListRequest,
76-- colMirListResponse [25] IMPLICIT ColMirListResponse,
77-- editColMirListRequest [26] IMPLICIT EditColMirListRequest,
78-- editColMirListResponse [27] IMPLICIT EditColMirListResponse,
79
80 -- Collection
81 colInfoRequest [40] IMPLICIT ColInfoRequest,
82 colInfoResponse [41] IMPLICIT ColInfoResponse,
83
84 -- Document
85 documentRequest [52] IMPLICIT DocumentRequest,
86 documentResponse [53] IMPLICIT DocumentResponse,
87
88 -- Access (searching, browsing, and metadata information)
89 infoFiltersRequest [60] IMPLICIT InfoFiltersRequest,
90 infoFiltersResponse [61] IMPLICIT InfoFiltersResponse,
91 infoFilterOptionsRequest [62] IMPLICIT InfoFilterOptionsRequest,
92 infoFilterOptionsResponse [63] IMPLICIT InfoFilterOptionsResponse,
93 filterRequest [64] IMPLICIT FilterRequest,
94 filterResponse [65] IMPLICIT FilterResponse
95}
96
97
98
99-- ------------------------------
100-- GENERAL
101-- ------------------------------
102
103
104-- The error list is not complete yet ...
105
106Error ::= ENUMERATED {
107 authenticationFailure(0), protocolError(1), systemProblem(2)
108}
109
110
111PingRequest ::= SEQUENCE {
112}
113
114PingResponse ::= SEQUENCE {
115}
116
117
118
119-- ------------------------------
120-- AUTHORITY
121-- ------------------------------
122
123
124-- Support for subscription is optional for both the clients and
125-- the servers. It is recomended that it is not implemented yet
126-- for simplicity.
127
128-- AuthListRequest ::= SEQUENCE {
129-- }
130
131-- AuthListResponse ::= SEQUENCE {
132-- authList [1] IMPLICIT StringSet
133-- }
134
135
136-- EditAuthListRequest ::= SEQUENCE {
137-- editAction EditAction,
138-- authority GeneralString
139-- }
140
141-- EditAuthListResponse ::= SEQUENCE {
142-- }
143
144
145-- AuthMirListRequest ::= SEQUENCE {
146-- limitNumber [1] IMPLICIT INTEGER OPTIONAL,
147-- limitDomain [2] IMPLICIT GeneralString OPTIONAL
148-- }
149
150-- AuthMirListResponse ::= SEQUENCE {
151-- authMirList [1] IMPLICIT HostPortSet
152-- }
153
154
155-- EditAuthMirListRequest ::= SEQUENCE {
156-- editAction EditAction,
157-- authMir HostPort
158-- }
159
160-- EditAuthMirListResponse ::= SEQUENCE {
161-- }
162
163
164ColListRequest ::= SEQUENCE {
165}
166
167ColListResponse ::= SEQUENCE {
168 colList [1] IMPLICIT ShortColInfoSet
169}
170
171
172-- EditColListRequest ::= SEQUENCE {
173-- editAction EditAction,
174-- colInfo ShortColInfo
175-- }
176
177-- EditColListResponse ::= SEQUENCE {
178-- }
179
180
181-- ColMirListRequest ::= SEQUENCE {
182-- limitNumber [1] IMPLICIT INTEGER OPTIONAL,
183-- limitDomain [2] IMPLICIT GeneralString OPTIONAL
184-- }
185
186-- ColMirListResponse ::= SEQUENCE {
187-- colMirList [1] IMPLICIT ShortColInfoSet
188-- }
189
190
191-- EditColMirListRequest ::= SEQUENCE {
192-- editAction EditAction,
193-- colMirInfo ShortColInfo
194-- }
195
196-- EditColMirListResponse ::= SEQUENCE {
197-- }
198
199
200
201
202-- ------------------------------
203-- COLLECTION
204-- ------------------------------
205
206
207ColInfoRequest ::= SEQUENCE {
208}
209
210ColInfoResponse ::= SEQUENCE {
211 shortInfo [0] IMPLICIT ShortCollectionInfo,
212 isPublic [2] IMPLICIT BOOLEAN, -- whether has anonymous access
213 isBeta [3] IMPLICIT BOOLEAN, -- beta if still under development
214 builddate [4] IMPLICIT GeneralizedTime,
215 languages [5] IMPLICIT StringSet, -- languages in the collection
216 numDocs [6] IMPLICIT INTEGER,
217 numWords [7] IMPLICIT INTEGER OPTIONAL,
218 numBytes [8] IMPLICIT INTEGER OPTIONAL,
219 useBook [9] IMPLICIT BOOLEAN -- whether to use book mode
220}
221
222
223
224-- ------------------------------
225-- DOCUMENT
226-- ------------------------------
227
228
229
230DocumentRequest ::= SEQUENCE {
231 OID GeneralString,
232 docType GeneralString,
233 docFormat GeneralString
234}
235
236DocumentResponse ::= SEQUENCE {
237 doc OCTET STRING
238}
239
240
241-- ------------------------------
242-- ACCESS (SEARCH AND BROWSE)
243-- ------------------------------
244
245
246-- filter options which might be supported for the QueryFilter
247--
248-- onePerQuery StartResults integer
249-- onePerQuery EndResults integer
250-- onePerQuery QueryType enumerated (boolean, ranked)
251-- onePerTerm Term string ???
252-- onePerTerm Casefold boolean
253-- onePerTerm Stem boolean
254-- onePerTerm Index enumerated
255-- onePerTerm Subcollection enumerated
256--
257-- filter options which might be supported for the BrowseFilter
258--
259-- onePerQuery StartResults integer
260-- onePerQuery EndResults integer
261-- onePerQuery ParentNode string ("" will return the browsing available)
262--
263-- The NullFilter always returns the set it was given, it doesn't have
264-- any options
265
266InfoFiltersRequest ::= SEQUENCE {
267}
268
269InfoFiltersResponse ::= SEQUENCE {
270 filterNames StringSet
271}
272
273InfoFilterOptionsRequest ::= SEQUENCE {
274 filterName GeneralString
275}
276
277InfoFilterOptionsResponse ::= SEQUENCE {
278 filterOptions SET OF FilterOption
279}
280
281FilterOption ::= SEQUENCE {
282 name GeneralString,
283 type ENUMERATED {booleant(0), integert(1), enumeratedt(2), stringt(3)},
284 repeatable ENUMERATED {onePerQuery(0), onePerTerm(1), nPerTerm(2)},
285 defaultValue GeneralString,
286 -- the interpretation of the validValues depends on the type
287 -- for boolean: the first value is the false value, the second is true value
288 -- for integer: the first value is the minimum, the second the maximum
289 -- for enumerated: all values a listed
290 -- for string: this value is ignored
291 validValues StringSequence
292}
293
294
295-- Terms are presented in the same order that they are requested,
296-- any information relating to the terms is in reference to the
297-- index specified for that term.
298-- Metadata is presented in the same order that it is requested.
299
300FilterRequest ::= SEQUENCE {
301 filterName [0] GeneralString,
302 filterOptions [1] IMPLICIT SEQUENCE OF OptionValue,
303 docSet [2] IMPLICIT StringSequence, -- the OID "" represents everything
304 filterResultOptions [3] IMPLICIT BIT STRING {termFreq(0), matchTerms(1), OID(2),
305 subCol(3), ranking(4), docFreq(5),
306 metadata(6)}
307
308 -- the next set of options are for the metadata request,
309 -- they can be left blank if metadata is not wanted
310 requestParams [4] IMPLICIT GeneralString, -- used to negotiate the metadata content
311 refParams [5] IMPLICIT GeneralString, -- used to decide whether to return a
312 -- reference to the data or the actual data
313 fields [6] IMPLICIT StringSequence
314}
315
316OptionValue ::= SEQUENCE {
317 name GeneralString,
318 value GeneralString
319}
320
321FilterResponse ::= SEQUENCE {
322 numDocs [0] IMPLICIT INTEGER,
323 isApprox [1] IMPLICIT BOOLEAN, -- whether numDocs is approximate
324 termInfo [2] IMPLICIT SEQUENCE OF TermInfo, -- empty if not required
325 docInfo [3] IMPLICIT SEQUENCE OF ResultDocInfo -- empty if not required
326}
327
328TermInfo ::= SEQUENCE {
329 term [0] GeneralString,
330 freq [1] IMPLICIT INTEGER, -- 0 if not requested
331 matchTerms [2] IMPLICIT StringSequence -- empty if not requested
332}
333
334ResultDocInfo ::= SEQUENCE {
335 OID [0] IMPLICIT GeneralString,
336 ranking [1] IMPLICIT INTEGER, -- 0 if not requested, range 0-10000
337 docFreq [2] IMPLICIT SEQUENCE OF INTEGER, -- empty if not requested
338 metadata [3] IMPLICIT SEQUENCE OF MetadataInfo
339}
340
341
342MetadataInfo ::= SEQUENCE {
343 params [0] IMPLICIT GeneralString,
344 isRef [1] IMPLICIT BOOLEAN,
345 field [3] IMPLICIT GeneralString,
346 value [4] IMPLICIT GeneralString
347}
348
349
350-- ------------------------------
351-- Useful Types
352-- ------------------------------
353
354-- HostPortSet ::= SET OF HostPort
355
356-- HostPort ::= SEQUENCE {
357-- host [0] IMPLICIT GeneralString,
358-- port [1] IMPLICIT INTEGER
359-- }
360
361ShortColInfoSet ::= SET OF ShortColInfo
362
363ShortColInfo ::= SEQUENCE {
364 name GeneralString,
365 host GeneralString,
366 port INTEGER
367}
368
369-- EditAction ::= ENUMERATED {
370-- update(0), delete(1)
371-- }
372
373StringSequence ::= SEQUENCE OF GeneralString
374StringSet ::= SET OF GeneralString
375
376
377END
Note: See TracBrowser for help on using the repository browser.