source: trunk/gsdl/src/recpt/comproto.asn@ 1861

Last change on this file since 1861 was 220, checked in by rjmcnab, 25 years ago

Altered the protocol so that the metadata is part of the filter.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 10.1 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}
220
221
222
223-- ------------------------------
224-- DOCUMENT
225-- ------------------------------
226
227
228
229DocumentRequest ::= SEQUENCE {
230 OID GeneralString,
231 docType GeneralString,
232 docFormat GeneralString
233}
234
235DocumentResponse ::= SEQUENCE {
236 doc OCTET STRING
237}
238
239
240-- ------------------------------
241-- ACCESS (SEARCH AND BROWSE)
242-- ------------------------------
243
244
245-- filter options which might be supported for the QueryFilter
246--
247-- onePerQuery StartResults integer
248-- onePerQuery EndResults integer
249-- onePerQuery QueryType enumerated (boolean, ranked)
250-- onePerTerm Term string ???
251-- onePerTerm Casefold boolean
252-- onePerTerm Stem boolean
253-- onePerTerm Index enumerated
254-- onePerTerm Subcollection enumerated
255--
256-- filter options which might be supported for the BrowseFilter
257--
258-- onePerQuery StartResults integer
259-- onePerQuery EndResults integer
260-- onePerQuery ParentNode string ("" will return the browsing available)
261--
262-- The NullFilter always returns the set it was given, it doesn't have
263-- any options
264
265InfoFiltersRequest ::= SEQUENCE {
266}
267
268InfoFiltersResponse ::= SEQUENCE {
269 filterNames StringSet
270}
271
272InfoFilterOptionsRequest ::= SEQUENCE {
273 filterName GeneralString
274}
275
276InfoFilterOptionsResponse ::= SEQUENCE {
277 filterOptions SET OF FilterOption
278}
279
280FilterOption ::= SEQUENCE {
281 name GeneralString,
282 type ENUMERATED {booleant(0), integert(1), enumeratedt(2), stringt(3)},
283 repeatable ENUMERATED {onePerQuery(0), onePerTerm(1), nPerTerm(2)},
284 defaultValue GeneralString,
285 -- the interpretation of the validValues depends on the type
286 -- for boolean: the first value is the false value, the second is true value
287 -- for integer: the first value is the minimum, the second the maximum
288 -- for enumerated: all values a listed
289 -- for string: this value is ignored
290 validValues StringSequence
291}
292
293
294-- Terms are presented in the same order that they are requested,
295-- any information relating to the terms is in reference to the
296-- index specified for that term.
297-- Metadata is presented in the same order that it is requested.
298
299FilterRequest ::= SEQUENCE {
300 filterName [0] GeneralString,
301 filterOptions [1] IMPLICIT SEQUENCE OF OptionValue,
302 docSet [2] IMPLICIT StringSequence, -- the OID "" represents everything
303 filterResultOptions [3] IMPLICIT BIT STRING {termFreq(0), matchTerms(1), OID(2),
304 subCol(3), ranking(4), docFreq(5),
305 metadata(6)}
306
307 -- the next set of options are for the metadata request,
308 -- they can be left blank if metadata is not wanted
309 requestParams [4] IMPLICIT GeneralString, -- used to negotiate the metadata content
310 refParams [5] IMPLICIT GeneralString, -- used to decide whether to return a
311 -- reference to the data or the actual data
312 fields [6] IMPLICIT StringSequence
313}
314
315OptionValue ::= SEQUENCE {
316 name GeneralString,
317 value GeneralString
318}
319
320FilterResponse ::= SEQUENCE {
321 numDocs [0] IMPLICIT INTEGER,
322 isApprox [1] IMPLICIT BOOLEAN, -- whether numDocs is approximate
323 termInfo [2] IMPLICIT SEQUENCE OF TermInfo, -- empty if not required
324 docInfo [3] IMPLICIT SEQUENCE OF ResultDocInfo -- empty if not required
325}
326
327TermInfo ::= SEQUENCE {
328 term [0] GeneralString,
329 freq [1] IMPLICIT INTEGER, -- 0 if not requested
330 matchTerms [2] IMPLICIT StringSequence -- empty if not requested
331}
332
333ResultDocInfo ::= SEQUENCE {
334 OID [0] IMPLICIT GeneralString,
335 ranking [1] IMPLICIT INTEGER, -- 0 if not requested, range 0-10000
336 docFreq [2] IMPLICIT SEQUENCE OF INTEGER, -- empty if not requested
337 metadata [3] IMPLICIT SEQUENCE OF MetadataInfo
338}
339
340
341MetadataInfo ::= SEQUENCE {
342 params [0] IMPLICIT GeneralString,
343 isRef [1] IMPLICIT BOOLEAN,
344 field [3] IMPLICIT GeneralString,
345 value [4] IMPLICIT GeneralString
346}
347
348
349-- ------------------------------
350-- Useful Types
351-- ------------------------------
352
353-- HostPortSet ::= SET OF HostPort
354
355-- HostPort ::= SEQUENCE {
356-- host [0] IMPLICIT GeneralString,
357-- port [1] IMPLICIT INTEGER
358-- }
359
360ShortColInfoSet ::= SET OF ShortColInfo
361
362ShortColInfo ::= SEQUENCE {
363 name GeneralString,
364 host GeneralString,
365 port INTEGER
366}
367
368-- EditAction ::= ENUMERATED {
369-- update(0), delete(1)
370-- }
371
372StringSequence ::= SEQUENCE OF GeneralString
373StringSet ::= SET OF GeneralString
374
375
376END
Note: See TracBrowser for help on using the repository browser.