[179] | 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 |
|
---|
| 12 | GSDL-APDU DEFINITIONS ::=
|
---|
| 13 | BEGIN
|
---|
| 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 |
|
---|
| 25 | PDU ::= 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 |
|
---|
| 35 | StandardHeader ::= SEQUENCE {
|
---|
| 36 | protocolVersion [0] IMPLICIT INTEGER,
|
---|
| 37 | idAuthentication [1] IMPLICIT IdAuthentication OPTIONAL
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 | IdAuthentication ::= 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 |
|
---|
| 52 | Message ::= CHOICE {
|
---|
| 53 | -- General
|
---|
| 54 | error [0] IMPLICIT Error,
|
---|
| 55 | pingRequest [1] IMPLICIT PingRequest,
|
---|
| 56 | pingResponse [2] IMPLICIT PingResponse,
|
---|
| 57 |
|
---|
| 58 | -- Authority
|
---|
[183] | 59 | -- authListRequest [12] IMPLICIT AuthListRequest,
|
---|
| 60 | -- authListResponse [13] IMPLICIT AuthListResponse,
|
---|
| 61 | -- editAuthListRequest [14] IMPLICIT EditAuthListRequest,
|
---|
| 62 | -- editAuthListResponse [15] IMPLICIT EditAuthListResponse,
|
---|
[179] | 63 |
|
---|
| 64 | -- an authority mirror is a mirror of THIS authority
|
---|
[183] | 65 | -- authMirListRequest [16] IMPLICIT AuthMirListRequest,
|
---|
| 66 | -- authMirListResponse [17] IMPLICIT AuthMirListResponse,
|
---|
| 67 | -- editAuthMirListRequest [18] IMPLICIT EditAuthMirListRequest,
|
---|
| 68 | -- editAuthMirListResponse [19] IMPLICIT EditAuthMirListResponse,
|
---|
[179] | 69 |
|
---|
| 70 | colListRequest [20] IMPLICIT ColListRequest,
|
---|
| 71 | colListResponse [21] IMPLICIT ColListResponse,
|
---|
[183] | 72 | -- editColListRequest [22] IMPLICIT EditColListRequest,
|
---|
| 73 | -- editColListResponse [23] IMPLICIT EditColListResponse,
|
---|
[179] | 74 |
|
---|
[183] | 75 | -- colMirListRequest [24] IMPLICIT ColMirListRequest,
|
---|
| 76 | -- colMirListResponse [25] IMPLICIT ColMirListResponse,
|
---|
| 77 | -- editColMirListRequest [26] IMPLICIT EditColMirListRequest,
|
---|
| 78 | -- editColMirListResponse [27] IMPLICIT EditColMirListResponse,
|
---|
[179] | 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 |
|
---|
[220] | 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
|
---|
[179] | 95 | }
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | -- ------------------------------
|
---|
| 100 | -- GENERAL
|
---|
| 101 | -- ------------------------------
|
---|
| 102 |
|
---|
| 103 |
|
---|
| 104 | -- The error list is not complete yet ...
|
---|
| 105 |
|
---|
| 106 | Error ::= ENUMERATED {
|
---|
| 107 | authenticationFailure(0), protocolError(1), systemProblem(2)
|
---|
| 108 | }
|
---|
| 109 |
|
---|
| 110 |
|
---|
| 111 | PingRequest ::= SEQUENCE {
|
---|
| 112 | }
|
---|
| 113 |
|
---|
| 114 | PingResponse ::= 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 |
|
---|
[183] | 128 | -- AuthListRequest ::= SEQUENCE {
|
---|
| 129 | -- }
|
---|
[179] | 130 |
|
---|
[183] | 131 | -- AuthListResponse ::= SEQUENCE {
|
---|
| 132 | -- authList [1] IMPLICIT StringSet
|
---|
| 133 | -- }
|
---|
[179] | 134 |
|
---|
| 135 |
|
---|
[183] | 136 | -- EditAuthListRequest ::= SEQUENCE {
|
---|
| 137 | -- editAction EditAction,
|
---|
| 138 | -- authority GeneralString
|
---|
| 139 | -- }
|
---|
[179] | 140 |
|
---|
[183] | 141 | -- EditAuthListResponse ::= SEQUENCE {
|
---|
| 142 | -- }
|
---|
[179] | 143 |
|
---|
| 144 |
|
---|
[183] | 145 | -- AuthMirListRequest ::= SEQUENCE {
|
---|
| 146 | -- limitNumber [1] IMPLICIT INTEGER OPTIONAL,
|
---|
| 147 | -- limitDomain [2] IMPLICIT GeneralString OPTIONAL
|
---|
| 148 | -- }
|
---|
[179] | 149 |
|
---|
[183] | 150 | -- AuthMirListResponse ::= SEQUENCE {
|
---|
| 151 | -- authMirList [1] IMPLICIT HostPortSet
|
---|
| 152 | -- }
|
---|
[179] | 153 |
|
---|
| 154 |
|
---|
[183] | 155 | -- EditAuthMirListRequest ::= SEQUENCE {
|
---|
| 156 | -- editAction EditAction,
|
---|
| 157 | -- authMir HostPort
|
---|
| 158 | -- }
|
---|
[179] | 159 |
|
---|
[183] | 160 | -- EditAuthMirListResponse ::= SEQUENCE {
|
---|
| 161 | -- }
|
---|
[179] | 162 |
|
---|
| 163 |
|
---|
| 164 | ColListRequest ::= SEQUENCE {
|
---|
| 165 | }
|
---|
| 166 |
|
---|
| 167 | ColListResponse ::= SEQUENCE {
|
---|
| 168 | colList [1] IMPLICIT ShortColInfoSet
|
---|
| 169 | }
|
---|
| 170 |
|
---|
| 171 |
|
---|
[183] | 172 | -- EditColListRequest ::= SEQUENCE {
|
---|
| 173 | -- editAction EditAction,
|
---|
| 174 | -- colInfo ShortColInfo
|
---|
| 175 | -- }
|
---|
[179] | 176 |
|
---|
[183] | 177 | -- EditColListResponse ::= SEQUENCE {
|
---|
| 178 | -- }
|
---|
[179] | 179 |
|
---|
| 180 |
|
---|
[183] | 181 | -- ColMirListRequest ::= SEQUENCE {
|
---|
| 182 | -- limitNumber [1] IMPLICIT INTEGER OPTIONAL,
|
---|
| 183 | -- limitDomain [2] IMPLICIT GeneralString OPTIONAL
|
---|
| 184 | -- }
|
---|
[179] | 185 |
|
---|
[183] | 186 | -- ColMirListResponse ::= SEQUENCE {
|
---|
| 187 | -- colMirList [1] IMPLICIT ShortColInfoSet
|
---|
| 188 | -- }
|
---|
[179] | 189 |
|
---|
| 190 |
|
---|
[183] | 191 | -- EditColMirListRequest ::= SEQUENCE {
|
---|
| 192 | -- editAction EditAction,
|
---|
| 193 | -- colMirInfo ShortColInfo
|
---|
| 194 | -- }
|
---|
[179] | 195 |
|
---|
[183] | 196 | -- EditColMirListResponse ::= SEQUENCE {
|
---|
| 197 | -- }
|
---|
[179] | 198 |
|
---|
| 199 |
|
---|
| 200 |
|
---|
| 201 |
|
---|
| 202 | -- ------------------------------
|
---|
| 203 | -- COLLECTION
|
---|
| 204 | -- ------------------------------
|
---|
| 205 |
|
---|
| 206 |
|
---|
| 207 | ColInfoRequest ::= SEQUENCE {
|
---|
| 208 | }
|
---|
| 209 |
|
---|
| 210 | ColInfoResponse ::= SEQUENCE {
|
---|
| 211 | shortInfo [0] IMPLICIT ShortCollectionInfo,
|
---|
[183] | 212 | isPublic [2] IMPLICIT BOOLEAN, -- whether has anonymous access
|
---|
| 213 | isBeta [3] IMPLICIT BOOLEAN, -- beta if still under development
|
---|
[179] | 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 |
|
---|
| 229 | DocumentRequest ::= SEQUENCE {
|
---|
[184] | 230 | OID GeneralString,
|
---|
[179] | 231 | docType GeneralString,
|
---|
| 232 | docFormat GeneralString
|
---|
| 233 | }
|
---|
| 234 |
|
---|
| 235 | DocumentResponse ::= SEQUENCE {
|
---|
| 236 | doc OCTET STRING
|
---|
| 237 | }
|
---|
| 238 |
|
---|
| 239 |
|
---|
| 240 | -- ------------------------------
|
---|
| 241 | -- ACCESS (SEARCH AND BROWSE)
|
---|
| 242 | -- ------------------------------
|
---|
| 243 |
|
---|
| 244 |
|
---|
[184] | 245 | -- filter options which might be supported for the QueryFilter
|
---|
[179] | 246 | --
|
---|
[183] | 247 | -- onePerQuery StartResults integer
|
---|
| 248 | -- onePerQuery EndResults integer
|
---|
[184] | 249 | -- onePerQuery QueryType enumerated (boolean, ranked)
|
---|
[183] | 250 | -- onePerTerm Term string ???
|
---|
| 251 | -- onePerTerm Casefold boolean
|
---|
| 252 | -- onePerTerm Stem boolean
|
---|
| 253 | -- onePerTerm Index enumerated
|
---|
| 254 | -- onePerTerm Subcollection enumerated
|
---|
[184] | 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)
|
---|
[220] | 261 | --
|
---|
| 262 | -- The NullFilter always returns the set it was given, it doesn't have
|
---|
| 263 | -- any options
|
---|
[179] | 264 |
|
---|
[220] | 265 | InfoFiltersRequest ::= SEQUENCE {
|
---|
| 266 | }
|
---|
| 267 |
|
---|
| 268 | InfoFiltersResponse ::= SEQUENCE {
|
---|
| 269 | filterNames StringSet
|
---|
| 270 | }
|
---|
| 271 |
|
---|
[179] | 272 | InfoFilterOptionsRequest ::= SEQUENCE {
|
---|
[220] | 273 | filterName GeneralString
|
---|
[179] | 274 | }
|
---|
| 275 |
|
---|
| 276 | InfoFilterOptionsResponse ::= SEQUENCE {
|
---|
[183] | 277 | filterOptions SET OF FilterOption
|
---|
| 278 | }
|
---|
| 279 |
|
---|
[179] | 280 | FilterOption ::= SEQUENCE {
|
---|
[184] | 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,
|
---|
[183] | 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
|
---|
[184] | 290 | validValues StringSequence
|
---|
[179] | 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 |
|
---|
| 299 | FilterRequest ::= SEQUENCE {
|
---|
[183] | 300 | filterName [0] GeneralString,
|
---|
| 301 | filterOptions [1] IMPLICIT SEQUENCE OF OptionValue,
|
---|
[220] | 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)}
|
---|
[179] | 306 |
|
---|
[220] | 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
|
---|
[179] | 313 | }
|
---|
| 314 |
|
---|
| 315 | OptionValue ::= SEQUENCE {
|
---|
| 316 | name GeneralString,
|
---|
| 317 | value GeneralString
|
---|
| 318 | }
|
---|
| 319 |
|
---|
[220] | 320 | FilterResponse ::= 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 |
|
---|
[179] | 327 | TermInfo ::= SEQUENCE {
|
---|
| 328 | term [0] GeneralString,
|
---|
[220] | 329 | freq [1] IMPLICIT INTEGER, -- 0 if not requested
|
---|
| 330 | matchTerms [2] IMPLICIT StringSequence -- empty if not requested
|
---|
[179] | 331 | }
|
---|
| 332 |
|
---|
| 333 | ResultDocInfo ::= SEQUENCE {
|
---|
[184] | 334 | OID [0] IMPLICIT GeneralString,
|
---|
[220] | 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
|
---|
[179] | 338 | }
|
---|
| 339 |
|
---|
| 340 |
|
---|
[220] | 341 | MetadataInfo ::= SEQUENCE {
|
---|
| 342 | params [0] IMPLICIT GeneralString,
|
---|
| 343 | isRef [1] IMPLICIT BOOLEAN,
|
---|
| 344 | field [3] IMPLICIT GeneralString,
|
---|
| 345 | value [4] IMPLICIT GeneralString
|
---|
| 346 | }
|
---|
| 347 |
|
---|
| 348 |
|
---|
[179] | 349 | -- ------------------------------
|
---|
| 350 | -- Useful Types
|
---|
| 351 | -- ------------------------------
|
---|
| 352 |
|
---|
[220] | 353 | -- HostPortSet ::= SET OF HostPort
|
---|
[179] | 354 |
|
---|
[220] | 355 | -- HostPort ::= SEQUENCE {
|
---|
| 356 | -- host [0] IMPLICIT GeneralString,
|
---|
| 357 | -- port [1] IMPLICIT INTEGER
|
---|
| 358 | -- }
|
---|
[179] | 359 |
|
---|
| 360 | ShortColInfoSet ::= SET OF ShortColInfo
|
---|
| 361 |
|
---|
| 362 | ShortColInfo ::= SEQUENCE {
|
---|
| 363 | name GeneralString,
|
---|
| 364 | host GeneralString,
|
---|
| 365 | port INTEGER
|
---|
| 366 | }
|
---|
| 367 |
|
---|
[220] | 368 | -- EditAction ::= ENUMERATED {
|
---|
| 369 | -- update(0), delete(1)
|
---|
| 370 | -- }
|
---|
[179] | 371 |
|
---|
| 372 | StringSequence ::= SEQUENCE OF GeneralString
|
---|
| 373 | StringSet ::= SET OF GeneralString
|
---|
| 374 |
|
---|
| 375 |
|
---|
| 376 | END
|
---|