]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/js/dojo/MARC/FixedFields.js
lp1110538: DB upgrade; default provider copies
[working/Evergreen.git] / Open-ILS / web / js / dojo / MARC / FixedFields.js
1 /* ---------------------------------------------------------------------------
2  * Copyright (C) 2011  Equinox Software, Inc.
3  * Mike Rylander <miker@esilibrary.com>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  * ---------------------------------------------------------------------------
15  */
16
17 if(!dojo._hasResource["MARC.FixedFields"]) {
18
19     dojo.require('MARC.Record');
20
21     dojo._hasResource["MARC.FixedFields"] = true;
22     dojo.provide("MARC.FixedFields");
23
24     MARC.Record._recType = {
25         BKS : { Type : /[at]{1}/,    BLvl : /[acdm]{1}/ },
26         SER : { Type : /[a]{1}/,    BLvl : /[bsi]{1}/ },
27         VIS : { Type : /[gkro]{1}/,    BLvl : /[abcdmsi]{1}/ },
28         MIX : { Type : /[p]{1}/,    BLvl : /[cdi]{1}/ },
29         MAP : { Type : /[ef]{1}/,    BLvl : /[abcdmsi]{1}/ },
30         SCO : { Type : /[cd]{1}/,    BLvl : /[abcdmsi]{1}/ },
31         REC : { Type : /[ij]{1}/,    BLvl : /[abcdmsi]{1}/ },
32         COM : { Type : /[m]{1}/,    BLvl : /[abcdmsi]{1}/ },
33         AUT : { Type : /[z]{1}/,    BLvl : /.{1}/ },
34         MFHD : { Type : /[uvxy]{1}/,  BLvl : /.{1}/ }
35     };
36
37     MARC.Record._ff_pos = {
38         Ctry : {
39             _8 : {
40                 BKS : {start : 15, len : 3, def : ' ' },
41                 SER : {start : 15, len : 3, def : ' ' },
42                 VIS : {start : 15, len : 3, def : ' ' },
43                 MIX : {start : 15, len : 3, def : ' ' },
44                 MAP : {start : 15, len : 3, def : ' ' },
45                 SCO : {start : 15, len : 3, def : ' ' },
46                 REC : {start : 15, len : 3, def : ' ' },
47                 COM : {start : 15, len : 3, def : ' ' }
48             }
49         },
50         Lang : {
51             _8 : {
52                 BKS : {start : 35, len : 3, def : ' ' },
53                 SER : {start : 35, len : 3, def : ' ' },
54                 VIS : {start : 35, len : 3, def : ' ' },
55                 MIX : {start : 35, len : 3, def : ' ' },
56                 MAP : {start : 35, len : 3, def : ' ' },
57                 SCO : {start : 35, len : 3, def : ' ' },
58                 REC : {start : 35, len : 3, def : ' ' },
59                 COM : {start : 35, len : 3, def : ' ' }
60             }
61         },
62         MRec : {
63             _8 : {
64                 BKS : {start : 38, len : 1, def : ' ' },
65                 SER : {start : 38, len : 1, def : ' ' },
66                 VIS : {start : 38, len : 1, def : ' ' },
67                 MIX : {start : 38, len : 1, def : ' ' },
68                 MAP : {start : 38, len : 1, def : ' ' },
69                 SCO : {start : 38, len : 1, def : ' ' },
70                 REC : {start : 38, len : 1, def : ' ' },
71                 COM : {start : 38, len : 1, def : ' ' }
72             }
73         },
74         DtSt : {
75             _8 : {
76                 BKS : {start : 6, len : 1, def : ' ' },
77                 SER : {start : 6, len : 1, def : 'c' },
78                 VIS : {start : 6, len : 1, def : ' ' },
79                 MIX : {start : 6, len : 1, def : ' ' },
80                 MAP : {start : 6, len : 1, def : ' ' },
81                 SCO : {start : 6, len : 1, def : ' ' },
82                 REC : {start : 6, len : 1, def : ' ' },
83                 COM : {start : 6, len : 1, def : ' ' }
84             }
85         },
86         RecStat : {
87             ldr : {
88                 BKS : {start : 5, len : 1, def : 'n' },
89                 SER : {start : 5, len : 1, def : 'n' },
90                 VIS : {start : 5, len : 1, def : 'n' },
91                 MIX : {start : 5, len : 1, def : 'n' },
92                 MAP : {start : 5, len : 1, def : 'n' },
93                 SCO : {start : 5, len : 1, def : 'n' },
94                 REC : {start : 5, len : 1, def : 'n' },
95                 COM : {start : 5, len : 1, def : 'n' },
96                 MFHD: {start : 5, len : 1, def : 'n' },
97                 AUT : {start : 5, len : 1, def : 'n' }
98             }
99         },
100         Type : {
101             ldr : {
102                 BKS : {start : 6, len : 1, def : 'a' },
103                 SER : {start : 6, len : 1, def : 'a' },
104                 VIS : {start : 6, len : 1, def : 'g' },
105                 MIX : {start : 6, len : 1, def : 'p' },
106                 MAP : {start : 6, len : 1, def : 'e' },
107                 SCO : {start : 6, len : 1, def : 'c' },
108                 REC : {start : 6, len : 1, def : 'i' },
109                 COM : {start : 6, len : 1, def : 'm' },
110                 AUT : {start : 6, len : 1, def : 'z' },
111                 MFHD : {start : 6, len : 1, def : 'y' }
112     
113             }
114         },
115         Ctrl : {
116             ldr : {
117                 BKS : {start : 8, len : 1, def : ' ' },
118                 SER : {start : 8, len : 1, def : ' ' },
119                 VIS : {start : 8, len : 1, def : ' ' },
120                 MIX : {start : 8, len : 1, def : ' ' },
121                 MAP : {start : 8, len : 1, def : ' ' },
122                 SCO : {start : 8, len : 1, def : ' ' },
123                 REC : {start : 8, len : 1, def : ' ' },
124                 COM : {start : 8, len : 1, def : ' ' }
125             }
126         },
127         BLvl : {
128             ldr : {
129                 BKS : {start : 7, len : 1, def : 'm' },
130                 SER : {start : 7, len : 1, def : 's' },
131                 VIS : {start : 7, len : 1, def : 'm' },
132                 MIX : {start : 7, len : 1, def : 'c' },
133                 MAP : {start : 7, len : 1, def : 'm' },
134                 SCO : {start : 7, len : 1, def : 'm' },
135                 REC : {start : 7, len : 1, def : 'm' },
136                 COM : {start : 7, len : 1, def : 'm' }
137             }
138         },
139         Desc : {
140             ldr : {
141                 BKS : {start : 18, len : 1, def : ' ' },
142                 SER : {start : 18, len : 1, def : ' ' },
143                 VIS : {start : 18, len : 1, def : ' ' },
144                 MIX : {start : 18, len : 1, def : ' ' },
145                 MAP : {start : 18, len : 1, def : ' ' },
146                 SCO : {start : 18, len : 1, def : ' ' },
147                 REC : {start : 18, len : 1, def : ' ' },
148                 COM : {start : 18, len : 1, def : ' ' }
149             }
150         },
151         Item : {
152             ldr : {
153                 MFHD : {start : 18, len : 1, def : 'i' }
154             }
155         },
156         ELvl : {
157             ldr : {
158                 BKS : {start : 17, len : 1, def : ' ' },
159                 SER : {start : 17, len : 1, def : ' ' },
160                 VIS : {start : 17, len : 1, def : ' ' },
161                 MIX : {start : 17, len : 1, def : ' ' },
162                 MAP : {start : 17, len : 1, def : ' ' },
163                 SCO : {start : 17, len : 1, def : ' ' },
164                 REC : {start : 17, len : 1, def : ' ' },
165                 COM : {start : 17, len : 1, def : ' ' },
166                 AUT : {start : 17, len : 1, def : 'n' },
167                 MFHD : {start : 17, len : 1, def : 'u' }
168             }
169         },
170         TMat : {
171             _8 : {
172                 VIS : {start : 33, len : 1, def : ' ' }
173             },
174             _6 : {
175                 VIS : {start : 16, len : 1, def : ' ' }
176             }
177         },
178         TrAr : {
179             _8 : {
180                 SCO : {start : 33, len : 1, def : ' ' },
181                 REC : {start : 33, len : 1, def : 'n' }
182             },
183             _6 : {
184                 SCO : {start : 16, len : 1, def : ' ' },
185                 REC : {start : 16, len : 1, def : 'n' }
186             }
187         },
188         Indx : {
189             _8 : {
190                 BKS : {start : 31, len : 1, def : '0' },
191                 MAP : {start : 31, len : 1, def : '0' }
192             },
193             _6 : {
194                 BKS : {start : 14, len : 1, def : '0' },
195                 MAP : {start : 14, len : 1, def : '0' }
196             }
197         },
198         Date1 : {
199             _8 : {
200                 BKS : {start : 7, len : 4, def : ' ' },
201                 SER : {start : 7, len : 4, def : ' ' },
202                 VIS : {start : 7, len : 4, def : ' ' },
203                 MIX : {start : 7, len : 4, def : ' ' },
204                 MAP : {start : 7, len : 4, def : ' ' },
205                 SCO : {start : 7, len : 4, def : ' ' },
206                 REC : {start : 7, len : 4, def : ' ' },
207                 COM : {start : 7, len : 4, def : ' ' }
208             }
209         },
210         Date2 : {
211             _8 : {
212                 BKS : {start : 11, len : 4, def : ' ' },
213                 SER : {start : 11, len : 4, def : '9' },
214                 VIS : {start : 11, len : 4, def : ' ' },
215                 MIX : {start : 11, len : 4, def : ' ' },
216                 MAP : {start : 11, len : 4, def : ' ' },
217                 SCO : {start : 11, len : 4, def : ' ' },
218                 REC : {start : 11, len : 4, def : ' ' },
219                 COM : {start : 11, len : 4, def : ' ' }
220             }
221         },
222         LitF : {
223             _8 : {
224                 BKS : {start : 33, len : 1, def : '0' }
225             },
226             _6 : {
227                 BKS : {start : 16, len : 1, def : '0' }
228             }
229         },
230         Biog : {
231             _8 : {
232                 BKS : {start : 34, len : 1, def : ' ' }
233             },
234             _6 : {
235                 BKS : {start : 17, len : 1, def : ' ' }
236             }
237         },
238         Ills : {
239             _8 : {
240                 BKS : {start : 18, len : 4, def : ' ' }
241             },
242             _6 : {
243                 BKS : {start : 1, len : 4, def : ' ' }
244             }
245         },
246         Fest : {
247             _8 : {
248                 BKS : {start : 30, len : 1, def : '0' }
249             },
250             _6 : {
251                 BKS : {start : 13, len : 1, def : '0' }
252             }
253         },
254         Conf : {
255             _8 : {
256                 BKS : {start : 29, len : 1, def : '0' },
257                 SER : {start : 29, len : 1, def : '0' }
258             },
259             _6 : {
260                 BKS : {start : 11, len : 1, def : '0' },
261                 SER : {start : 11, len : 1, def : '0' }
262             }
263         },
264         Cont : {
265             _8 : {
266                 BKS : {start : 24, len : 4, def : ' ' },
267                 SER : {start : 25, len : 3, def : ' ' }
268             },
269             _6 : {
270                 BKS : {start : 7, len : 4, def : ' ' },
271                 SER : {start : 8, len : 3, def : ' ' }
272             }
273         },
274         GPub : {
275             _8 : {
276                 BKS : {start : 28, len : 1, def : ' ' },
277                 SER : {start : 28, len : 1, def : ' ' },
278                 VIS : {start : 28, len : 1, def : ' ' },
279                 MAP : {start : 28, len : 1, def : ' ' },
280                 COM : {start : 28, len : 1, def : ' ' }
281             },
282             _6 : {
283                 BKS : {start : 11, len : 1, def : ' ' },
284                 SER : {start : 11, len : 1, def : ' ' },
285                 VIS : {start : 11, len : 1, def : ' ' },
286                 MAP : {start : 11, len : 1, def : ' ' },
287                 COM : {start : 11, len : 1, def : ' ' }
288             }
289         },
290         Srce : {
291             _8 : {
292                 BKS : {start : 39, len : 1, def : 'd' },
293                 SER : {start : 39, len : 1, def : 'd' },
294                 VIS : {start : 39, len : 1, def : 'd' },
295                 SCO : {start : 39, len : 1, def : 'd' },
296                 REC : {start : 39, len : 1, def : 'd' },
297                 COM : {start : 39, len : 1, def : 'd' },
298                 MFHD : {start : 39, len : 1, def : 'd' },
299                 "AUT" : {"start" : 39, "len" : 1, "def" : 'd' }
300             }
301         },
302         Audn : {
303             _8 : {
304                 BKS : {start : 22, len : 1, def : ' ' },
305                 SER : {start : 22, len : 1, def : ' ' },
306                 VIS : {start : 22, len : 1, def : ' ' },
307                 SCO : {start : 22, len : 1, def : ' ' },
308                 REC : {start : 22, len : 1, def : ' ' },
309                 COM : {start : 22, len : 1, def : ' ' }
310             },
311             _6 : {
312                 BKS : {start : 5, len : 1, def : ' ' },
313                 SER : {start : 5, len : 1, def : ' ' },
314                 VIS : {start : 5, len : 1, def : ' ' },
315                 SCO : {start : 5, len : 1, def : ' ' },
316                 REC : {start : 5, len : 1, def : ' ' },
317                 COM : {start : 5, len : 1, def : ' ' }
318             }
319         },
320         Form : {
321             _8 : {
322                 BKS : {start : 23, len : 1, def : ' ' },
323                 SER : {start : 23, len : 1, def : ' ' },
324                 VIS : {start : 29, len : 1, def : ' ' },
325                 MIX : {start : 23, len : 1, def : ' ' },
326                 MAP : {start : 29, len : 1, def : ' ' },
327                 SCO : {start : 23, len : 1, def : ' ' },
328                 REC : {start : 23, len : 1, def : ' ' }
329             },
330             _6 : {
331                 BKS : {start : 6, len : 1, def : ' ' },
332                 SER : {start : 6, len : 1, def : ' ' },
333                 VIS : {start : 12, len : 1, def : ' ' },
334                 MIX : {start : 6, len : 1, def : ' ' },
335                 MAP : {start : 12, len : 1, def : ' ' },
336                 SCO : {start : 6, len : 1, def : ' ' },
337                 REC : {start : 6, len : 1, def : ' ' }
338             }
339         },
340         'S/L' : {
341             _8 : {
342                 SER : {start : 34, len : 1, def : '0' }
343             },
344             _6 : {
345                 SER : {start : 17, len : 1, def : '0' }
346             }
347         },
348         'Alph' : {
349             _8 : {
350                 SER : {start : 33, len : 1, def : ' ' }
351             },
352             _6 : {
353                 SER : {start : 16, len : 1, def : ' ' }
354             }
355         },
356         "GeoSubd" : {
357             "_8" : {
358                 "AUT" : {"start" : 6, "len" : 1, "def" : ' ' }
359             }
360         },
361         "Roman" : {
362             "_8" : {
363                 "AUT" : {"start" : 7, "len" : 1, "def" : ' ' }
364             }
365         },
366         "CatLang" : {
367             "_8" : {
368                 "AUT" : {"start" : 8, "len" : 1, "def" : ' ' }
369             }
370         },
371         "Auth/Ref" : {
372             "_8" : {
373                 "AUT" : {"start" : 9, "len" : 1, "def" : ' ' }
374             }
375         },
376         "Rules" : {
377             "_8" : {
378                 "AUT" : {"start" : 10, "len" : 1, "def" : ' ' }
379             }
380         },
381         "Subj" : {
382             "_8" : {
383                 "AUT" : {"start" : 11, "len" : 1, "def" : ' ' }
384             }
385         },
386         "Series" : {
387             "_8" : {
388                 "AUT" : {"start" : 12, "len" : 1, "def" : ' ' }
389             }
390         },
391         "SerNum" : {
392             "_8" : {
393                 "AUT" : {"start" : 13, "len" : 1, "def" : ' ' }
394             }
395         },
396         "NameUse" : {
397             "_8" : {
398                 "AUT" : {"start" : 14, "len" : 1, "def" : ' ' }
399             }
400         },
401         "SubjUse" : {
402             "_8" : {
403                 "AUT" : {"start" : 15, "len" : 1, "def" : ' ' }
404             }
405         },
406         "SerUse" : {
407             "_8" : {
408                 "AUT" : {"start" : 16, "len" : 1, "def" : ' ' }
409             }
410         },
411         "TypeSubd" : {
412             "_8" : {
413                 "AUT" : {"start" : 17, "len" : 1, "def" : ' ' }
414             }
415         },
416         "GovtAgn" : {
417             "_8" : {
418                 "AUT" : {"start" : 28, "len" : 1, "def" : ' ' }
419             }
420         },
421         "RefStatus" : {
422             "_8" : {
423                 "AUT" : {"start" : 29, "len" : 1, "def" : ' ' }
424             }
425         },
426         "UpdStatus" : {
427             "_8" : {
428                 "AUT" : {"start" : 31, "len" : 1, "def" : ' ' }
429             }
430         },
431         "Name" : {
432             "_8" : {
433                 "AUT" : {"start" : 32, "len" : 1, "def" : ' ' }
434             }
435         },
436         "Status" : {
437             "_8" : {
438                 "AUT" : {"start" : 33, "len" : 1, "def" : ' ' }
439             }
440         },
441         "ModRec" : {
442             "_8" : {
443                 "AUT" : {"start" : 38, "len" : 1, "def" : ' ' }
444             }
445         },
446         "Source" : {
447             "_8" : {
448                 "AUT" : {"start" : 39, "len" : 1, "def" : ' ' }
449             }
450         }
451     };
452     
453     MARC.Record._physical_characteristics = {
454         c : {
455                 label     : "Electronic Resource",
456                 subfields : {
457                         b : {   start : 1,
458                                 len   : 1,
459                                 label : "SMD",
460                                 values: {       a : "Tape Cartridge",
461                                                 b : "Chip cartridge",
462                                                 c : "Computer optical disk cartridge",
463                                                 f : "Tape cassette",
464                                                 h : "Tape reel",
465                                                 j : "Magnetic disk",
466                                                 m : "Magneto-optical disk",
467                                                 o : "Optical disk",
468                                                 r : "Remote",
469                                                 u : "Unspecified",
470                                                 z : "Other"
471                                 }
472                         },
473                         d : {   start : 3,
474                                 len   : 1,
475                                 label : "Color",
476                                 values: {       a : "One color",
477                                                 b : "Black-and-white",
478                                                 c : "Multicolored",
479                                                 g : "Gray scale",
480                                                 m : "Mixed",
481                                                 n : "Not applicable",
482                                                 u : "Unknown",
483                                                 z : "Other"
484                                 }
485                         },
486                         e : {   start : 4,
487                                 len   : 1,
488                                 label : "Dimensions",
489                                 values: {       a : "3 1/2 in.",
490                                                 e : "12 in.",
491                                                 g : "4 3/4 in. or 12 cm.",
492                                                 i : "1 1/8 x 2 3/8 in.",
493                                                 j : "3 7/8 x 2 1/2 in.",
494                                                 n : "Not applicable",
495                                                 o : "5 1/4 in.",
496                                                 u : "Unknown",
497                                                 v : "8 in.",
498                                                 z : "Other"
499                                 }
500                         },
501                         f : {   start : 5,
502                                 len   : 1,
503                                 label : "Sound",
504                                 values: {       ' ' : "No sound (Silent)",
505                                                 a   : "Sound",
506                                                 u   : "Unknown"
507                                 }
508                         },
509                         g : {   start : 6,
510                                 len   : 3,
511                                 label : "Image bit depth",
512                                 values: {       mmm   : "Multiple",
513                                                 nnn   : "Not applicable",
514                                                 '---' : "Unknown"
515                                 }
516                         },
517                         h : {   start : 9,
518                                 len   : 1,
519                                 label : "File formats",
520                                 values: {       a : "One file format",
521                                                 m : "Multiple file formats",
522                                                 u : "Unknown"
523                                 }
524                         },
525                         i : {   start : 10,
526                                 len   : 1,
527                                 label : "Quality assurance target(s)",
528                                 values: {       a : "Absent",
529                                                 n : "Not applicable",
530                                                 p : "Present",
531                                                 u : "Unknown"
532                                 }
533                         },
534                         j : {   start : 11,
535                                 len   : 1,
536                                 label : "Antecedent/Source",
537                                 values: {       a : "File reproduced from original",
538                                                 b : "File reproduced from microform",
539                                                 c : "File reproduced from electronic resource",
540                                                 d : "File reproduced from an intermediate (not microform)",
541                                                 m : "Mixed",
542                                                 n : "Not applicable",
543                                                 u : "Unknown"
544                                 }
545                         },
546                         k : {   start : 12,
547                                 len   : 1,
548                                 label : "Level of compression",
549                                 values: {       a : "Uncompressed",
550                                                 b : "Lossless",
551                                                 d : "Lossy",
552                                                 m : "Mixed",
553                                                 u : "Unknown"
554                                 }
555                         },
556                         l : {   start : 13,
557                                 len   : 1,
558                                 label : "Reformatting quality",
559                                 values: {       a : "Access",
560                                                 n : "Not applicable",
561                                                 p : "Preservation",
562                                                 r : "Replacement",
563                                                 u : "Unknown"
564                                 }
565                         }
566                 }
567         },
568         d : {
569                 label     : "Globe",
570                 subfields : {
571                         b : {   start : 1,
572                                 len   : 1,
573                                 label : "SMD",
574                                 values: {       a : "Celestial globe",
575                                                 b : "Planetary or lunar globe",
576                                                 c : "Terrestrial globe",
577                                                 e : "Earth moon globe",
578                                                 u : "Unspecified",
579                                                 z : "Other"
580                                 }
581                         },
582                         d : {   start : 3,
583                                 len   : 1,
584                                 label : "Color",
585                                 values: {       a : "One color",
586                                                 c : "Multicolored"
587                                 }
588                         },
589                         e : {   start : 4,
590                                 len   : 1,
591                                 label : "Physical medium",
592                                 values: {       a : "Paper",
593                                                 b : "Wood",
594                                                 c : "Stone",
595                                                 d : "Metal",
596                                                 e : "Synthetics",
597                                                 f : "Skins",
598                                                 g : "Textile",
599                                                 p : "Plaster",
600                                                 u : "Unknown",
601                                                 z : "Other"
602                                 }
603                         },
604                         f : {   start : 5,
605                                 len   : 1,
606                                 label : "Type of reproduction",
607                                 values: {       f : "Facsimile",
608                                                 n : "Not applicable",
609                                                 u : "Unknown",
610                                                 z : "Other"
611                                 }
612                         }
613                 }
614         },
615         a : {
616                 label     : "Map",
617                 subfields : {
618                         b : {   start : 1,
619                                 len   : 1,
620                                 label : "SMD",
621                                 values: {       d : "Atlas",
622                                                 g : "Diagram",
623                                                 j : "Map",
624                                                 k : "Profile",
625                                                 q : "Model",
626                                                 r : "Remote-sensing image",
627                                                 s : "Section",
628                                                 u : "Unspecified",
629                                                 y : "View",
630                                                 z : "Other"
631                                 }
632                         },
633                         d : {   start : 3,
634                                 len   : 1,
635                                 label : "Color",
636                                 values: {       a : "One color",
637                                                 c : "Multicolored"
638                                 }
639                         },
640                         e : {   start : 4,
641                                 len   : 1,
642                                 label : "Physical medium",
643                                 values: {       a : "Paper",
644                                                 b : "Wood",
645                                                 c : "Stone",
646                                                 d : "Metal",
647                                                 e : "Synthetics",
648                                                 f : "Skins",
649                                                 g : "Textile",
650                                                 p : "Plaster",
651                                                 q : "Flexible base photographic medium, positive",
652                                                 r : "Flexible base photographic medium, negative",
653                                                 s : "Non-flexible base photographic medium, positive",
654                                                 t : "Non-flexible base photographic medium, negative",
655                                                 u : "Unknown",
656                                                 y : "Other photographic medium",
657                                                 z : "Other"
658                                 }
659                         },
660                         f : {   start : 5,
661                                 len   : 1,
662                                 label : "Type of reproduction",
663                                 values: {       f : "Facsimile",
664                                                 n : "Not applicable",
665                                                 u : "Unknown",
666                                                 z : "Other"
667                                 }
668                         },
669                         g : {   start : 6,
670                                 len   : 1,
671                                 label : "Production/reproduction details",
672                                 values: {       a : "Photocopy, blueline print",
673                                                 b : "Photocopy",
674                                                 c : "Pre-production",
675                                                 d : "Film",
676                                                 u : "Unknown",
677                                                 z : "Other"
678                                 }
679                         },
680                         h : {   start : 7,
681                                 len   : 1,
682                                 label : "Positive/negative",
683                                 values: {       a : "Positive",
684                                                 b : "Negative",
685                                                 m : "Mixed",
686                                                 n : "Not applicable"
687                                 }
688                         }
689                 }
690         },
691         h : {
692                 label     : "Microform",
693                 subfields : {
694                         b : {   start : 1,
695                                 len   : 1,
696                                 label : "SMD",
697                                 values: {       a : "Aperture card",
698                                                 b : "Microfilm cartridge",
699                                                 c : "Microfilm cassette",
700                                                 d : "Microfilm reel",
701                                                 e : "Microfiche",
702                                                 f : "Microfiche cassette",
703                                                 g : "Microopaque",
704                                                 u : "Unspecified",
705                                                 z : "Other"
706                                 }
707                         },
708                         d : {   start : 3,
709                                 len   : 1,
710                                 label : "Positive/negative",
711                                 values: {       a : "Positive",
712                                                 b : "Negative",
713                                                 m : "Mixed",
714                                                 u : "Unknown"
715                                 }
716                         },
717                         e : {   start : 4,
718                                 len   : 1,
719                                 label : "Dimensions",
720                                 values: {       a : "8 mm.",
721                                                 e : "16 mm.",
722                                                 f : "35 mm.",
723                                                 g : "70mm.",
724                                                 h : "105 mm.",
725                                                 l : "3 x 5 in. (8 x 13 cm.)",
726                                                 m : "4 x 6 in. (11 x 15 cm.)",
727                                                 o : "6 x 9 in. (16 x 23 cm.)",
728                                                 p : "3 1/4 x 7 3/8 in. (9 x 19 cm.)",
729                                                 u : "Unknown",
730                                                 z : "Other"
731                                 }
732                         },
733                         f : {   start : 5,
734                                 len   : 4,
735                                 label : "Reduction ratio range/Reduction ratio",
736                                 values: {       a : "Low (1-16x)",
737                                                 b : "Normal (16-30x)",
738                                                 c : "High (31-60x)",
739                                                 d : "Very high (61-90x)",
740                                                 e : "Ultra (90x-)",
741                                                 u : "Unknown",
742                                                 v : "Reduction ratio varies"
743                                 }
744                         },
745                         g : {   start : 9,
746                                 len   : 1,
747                                 label : "Color",
748                                 values: {       b : "Black-and-white",
749                                                 c : "Multicolored",
750                                                 m : "Mixed",
751                                                 u : "Unknown",
752                                                 z : "Other"
753                                 }
754                         },
755                         h : {   start : 10,
756                                 len   : 1,
757                                 label : "Emulsion on film",
758                                 values: {       a : "Silver halide",
759                                                 b : "Diazo",
760                                                 c : "Vesicular",
761                                                 m : "Mixed",
762                                                 n : "Not applicable",
763                                                 u : "Unknown",
764                                                 z : "Other"
765                                 }
766                         },
767                         i : {   start : 11,
768                                 len   : 1,
769                                 label : "Quality assurance target(s)",
770                                 values: {       a : "1st gen. master",
771                                                 b : "Printing master",
772                                                 c : "Service copy",
773                                                 m : "Mixed generation",
774                                                 u : "Unknown"
775                                 }
776                         },
777                         j : {   start : 12,
778                                 len   : 1,
779                                 label : "Base of film",
780                                 values: {       a : "Safety base, undetermined",
781                                                 c : "Safety base, acetate undetermined",
782                                                 d : "Safety base, diacetate",
783                                                 l : "Nitrate base",
784                                                 m : "Mixed base",
785                                                 n : "Not applicable",
786                                                 p : "Safety base, polyester",
787                                                 r : "Safety base, mixed",
788                                                 t : "Safety base, triacetate",
789                                                 u : "Unknown",
790                                                 z : "Other"
791                                 }
792                         }
793                 }
794         },
795         m : {
796                 label     : "Motion Picture",
797                 subfields : {
798                         b : {   start : 1,
799                                 len   : 1,
800                                 label : "SMD",
801                                 values: {       a : "Film cartridge",
802                                                 f : "Film cassette",
803                                                 r : "Film reel",
804                                                 u : "Unspecified",
805                                                 z : "Other"
806                                 }
807                         },
808                         d : {   start : 3,
809                                 len   : 1,
810                                 label : "Color",
811                                 values: {       b : "Black-and-white",
812                                                 c : "Multicolored",
813                                                 h : "Hand-colored",
814                                                 m : "Mixed",
815                                                 u : "Unknown",
816                                                 z : "Other"
817                                 }
818                         },
819                         e : {   start : 4,
820                                 len   : 1,
821                                 label : "Motion picture presentation format",
822                                 values: {       a : "Standard sound aperture, reduced frame",
823                                                 b : "Nonanamorphic (wide-screen)",
824                                                 c : "3D",
825                                                 d : "Anamorphic (wide-screen)",
826                                                 e : "Other-wide screen format",
827                                                 f : "Standard. silent aperture, full frame",
828                                                 u : "Unknown",
829                                                 z : "Other"
830                                 }
831                         },
832                         f : {   start : 5,
833                                 len   : 1,
834                                 label : "Sound on medium or separate",
835                                 values: {       a : "Sound on medium",
836                                                 b : "Sound separate from medium",
837                                                 u : "Unknown"
838                                 }
839                         },
840                         g : {   start : 6,
841                                 len   : 1,
842                                 label : "Medium for sound",
843                                 values: {       a : "Optical sound track on motion picture film",
844                                                 b : "Magnetic sound track on motion picture film",
845                                                 c : "Magnetic audio tape in cartridge",
846                                                 d : "Sound disc",
847                                                 e : "Magnetic audio tape on reel",
848                                                 f : "Magnetic audio tape in cassette",
849                                                 g : "Optical and magnetic sound track on film",
850                                                 h : "Videotape",
851                                                 i : "Videodisc",
852                                                 u : "Unknown",
853                                                 z : "Other"
854                                 }
855                         },
856                         h : {   start : 7,
857                                 len   : 1,
858                                 label : "Dimensions",
859                                 values: {       a : "Standard 8 mm.",
860                                                 b : "Super 8 mm./single 8 mm.",
861                                                 c : "9.5 mm.",
862                                                 d : "16 mm.",
863                                                 e : "28 mm.",
864                                                 f : "35 mm.",
865                                                 g : "70 mm.",
866                                                 u : "Unknown",
867                                                 z : "Other"
868                                 }
869                         },
870                         i : {   start : 8,
871                                 len   : 1,
872                                 label : "Configuration of playback channels",
873                                 values: {       k : "Mixed",
874                                                 m : "Monaural",
875                                                 n : "Not applicable",
876                                                 q : "Multichannel, surround or quadraphonic",
877                                                 s : "Stereophonic",
878                                                 u : "Unknown",
879                                                 z : "Other"
880                                 }
881                         },
882                         j : {   start : 9,
883                                 len   : 1,
884                                 label : "Production elements",
885                                 values: {       a : "Work print",
886                                                 b : "Trims",
887                                                 c : "Outtakes",
888                                                 d : "Rushes",
889                                                 e : "Mixing tracks",
890                                                 f : "Title bands/inter-title rolls",
891                                                 g : "Production rolls",
892                                                 n : "Not applicable",
893                                                 z : "Other"
894                                 }
895                         }
896                 }
897         },
898         k : {
899                 label     : "Non-projected Graphic",
900                 subfields : {
901                         b : {   start : 1,
902                                 len   : 1,
903                                 label : "SMD",
904                                 values: {       c : "Collage",
905                                                 d : "Drawing",
906                                                 e : "Painting",
907                                                 f : "Photo-mechanical print",
908                                                 g : "Photonegative",
909                                                 h : "Photoprint",
910                                                 i : "Picture",
911                                                 j : "Print",
912                                                 l : "Technical drawing",
913                                                 n : "Chart",
914                                                 o : "Flash/activity card",
915                                                 u : "Unspecified",
916                                                 z : "Other"
917                                 }
918                         },
919                         d : {   start : 3,
920                                 len   : 1,
921                                 label : "Color",
922                                 values: {       a : "One color",
923                                                 b : "Black-and-white",
924                                                 c : "Multicolored",
925                                                 h : "Hand-colored",
926                                                 m : "Mixed",
927                                                 u : "Unknown",
928                                                 z : "Other"
929                                 }
930                         },
931                         e : {   start : 4,
932                                 len   : 1,
933                                 label : "Primary support material",
934                                 values: {       a : "Canvas",
935                                                 b : "Bristol board",
936                                                 c : "Cardboard/illustration board",
937                                                 d : "Glass",
938                                                 e : "Synthetics",
939                                                 f : "Skins",
940                                                 g : "Textile",
941                                                 h : "Metal",
942                                                 m : "Mixed collection",
943                                                 o : "Paper",
944                                                 p : "Plaster",
945                                                 q : "Hardboard",
946                                                 r : "Porcelain",
947                                                 s : "Stone",
948                                                 t : "Wood",
949                                                 u : "Unknown",
950                                                 z : "Other"
951                                 }
952                         },
953                         f : {   start : 5,
954                                 len   : 1,
955                                 label : "Secondary support material",
956                                 values: {       a : "Canvas",
957                                                 b : "Bristol board",
958                                                 c : "Cardboard/illustration board",
959                                                 d : "Glass",
960                                                 e : "Synthetics",
961                                                 f : "Skins",
962                                                 g : "Textile",
963                                                 h : "Metal",
964                                                 m : "Mixed collection",
965                                                 o : "Paper",
966                                                 p : "Plaster",
967                                                 q : "Hardboard",
968                                                 r : "Porcelain",
969                                                 s : "Stone",
970                                                 t : "Wood",
971                                                 u : "Unknown",
972                                                 z : "Other"
973                                 }
974                         }
975                 }
976         },
977         g : {
978                 label     : "Projected Graphic",
979                 subfields : {
980                         b : {   start : 1,
981                                 len   : 1,
982                                 label : "SMD",
983                                 values: {       c : "Film cartridge",
984                                                 d : "Filmstrip",
985                                                 f : "Film filmstrip type",
986                                                 o : "Filmstrip roll",
987                                                 s : "Slide",
988                                                 t : "Transparency",
989                                                 z : "Other"
990                                 }
991                         },
992                         d : {   start : 3,
993                                 len   : 1,
994                                 label : "Color",
995                                 values: {       b : "Black-and-white",
996                                                 c : "Multicolored",
997                                                 h : "Hand-colored",
998                                                 m : "Mixed",
999                                                 n : "Not applicable",
1000                                                 u : "Unknown",
1001                                                 z : "Other"
1002                                 }
1003                         },
1004                         e : {   start : 4,
1005                                 len   : 1,
1006                                 label : "Base of emulsion",
1007                                 values: {       d : "Glass",
1008                                                 e : "Synthetics",
1009                                                 j : "Safety film",
1010                                                 k : "Film base, other than safety film",
1011                                                 m : "Mixed collection",
1012                                                 o : "Paper",
1013                                                 u : "Unknown",
1014                                                 z : "Other"
1015                                 }
1016                         },
1017                         f : {   start : 5,
1018                                 len   : 1,
1019                                 label : "Sound on medium or separate",
1020                                 values: {       a : "Sound on medium",
1021                                                 b : "Sound separate from medium",
1022                                                 u : "Unknown"
1023                                 }
1024                         },
1025                         g : {   start : 6,
1026                                 len   : 1,
1027                                 label : "Medium for sound",
1028                                 values: {       a : "Optical sound track on motion picture film",
1029                                                 b : "Magnetic sound track on motion picture film",
1030                                                 c : "Magnetic audio tape in cartridge",
1031                                                 d : "Sound disc",
1032                                                 e : "Magnetic audio tape on reel",
1033                                                 f : "Magnetic audio tape in cassette",
1034                                                 g : "Optical and magnetic sound track on film",
1035                                                 h : "Videotape",
1036                                                 i : "Videodisc",
1037                                                 u : "Unknown",
1038                                                 z : "Other"
1039                                 }
1040                         },
1041                         h : {   start : 7,
1042                                 len   : 1,
1043                                 label : "Dimensions",
1044                                 values: {       a : "Standard 8 mm.",
1045                                                 b : "Super 8 mm./single 8 mm.",
1046                                                 c : "9.5 mm.",
1047                                                 d : "16 mm.",
1048                                                 e : "28 mm.",
1049                                                 f : "35 mm.",
1050                                                 g : "70 mm.",
1051                                                 j : "2 x 2 in. (5 x 5 cm.)",
1052                                                 k : "2 1/4 x 2 1/4 in. (6 x 6 cm.)",
1053                                                 s : "4 x 5 in. (10 x 13 cm.)",
1054                                                 t : "5 x 7 in. (13 x 18 cm.)",
1055                                                 v : "8 x 10 in. (21 x 26 cm.)",
1056                                                 w : "9 x 9 in. (23 x 23 cm.)",
1057                                                 x : "10 x 10 in. (26 x 26 cm.)",
1058                                                 y : "7 x 7 in. (18 x 18 cm.)",
1059                                                 u : "Unknown",
1060                                                 z : "Other"
1061                                 }
1062                         },
1063                         i : {   start : 8,
1064                                 len   : 1,
1065                                 label : "Secondary support material",
1066                                 values: {       c : "Cardboard",
1067                                                 d : "Glass",
1068                                                 e : "Synthetics",
1069                                                 h : "metal",
1070                                                 j : "Metal and glass",
1071                                                 k : "Synthetics and glass",
1072                                                 m : "Mixed collection",
1073                                                 u : "Unknown",
1074                                                 z : "Other"
1075                                 }
1076                         }
1077                 }
1078         },
1079         r : {
1080                 label     : "Remote-sensing Image",
1081                 subfields : {
1082                         b : {   start : 1,
1083                                 len   : 1,
1084                                 label : "SMD",
1085                                 values: { u : "Unspecified" }
1086                         },
1087                         d : {   start : 3,
1088                                 len   : 1,
1089                                 label : "Altitude of sensor",
1090                                 values: {       a : "Surface",
1091                                                 b : "Airborne",
1092                                                 c : "Spaceborne",
1093                                                 n : "Not applicable",
1094                                                 u : "Unknown",
1095                                                 z : "Other"
1096                                 }
1097                         },
1098                         e : {   start : 4,
1099                                 len   : 1,
1100                                 label : "Attitude of sensor",
1101                                 values: {       a : "Low oblique",
1102                                                 b : "High oblique",
1103                                                 c : "Vertical",
1104                                                 n : "Not applicable",
1105                                                 u : "Unknown"
1106                                 }
1107                         },
1108                         f : {   start : 5,
1109                                 len   : 1,
1110                                 label : "Cloud cover",
1111                                 values: {       0 : "0-09%",
1112                                                 1 : "10-19%",
1113                                                 2 : "20-29%",
1114                                                 3 : "30-39%",
1115                                                 4 : "40-49%",
1116                                                 5 : "50-59%",
1117                                                 6 : "60-69%",
1118                                                 7 : "70-79%",
1119                                                 8 : "80-89%",
1120                                                 9 : "90-100%",
1121                                                 n : "Not applicable",
1122                                                 u : "Unknown"
1123                                 }
1124                         },
1125                         g : {   start : 6,
1126                                 len   : 1,
1127                                 label : "Platform construction type",
1128                                 values: {       a : "Balloon",
1129                                                 b : "Aircraft-low altitude",
1130                                                 c : "Aircraft-medium altitude",
1131                                                 d : "Aircraft-high altitude",
1132                                                 e : "Manned spacecraft",
1133                                                 f : "Unmanned spacecraft",
1134                                                 g : "Land-based remote-sensing device",
1135                                                 h : "Water surface-based remote-sensing device",
1136                                                 i : "Submersible remote-sensing device",
1137                                                 n : "Not applicable",
1138                                                 u : "Unknown",
1139                                                 z : "Other"
1140                                 }
1141                         },
1142                         h : {   start : 7,
1143                                 len   : 1,
1144                                 label : "Platform use category",
1145                                 values: {       a : "Meteorological",
1146                                                 b : "Surface observing",
1147                                                 c : "Space observing",
1148                                                 m : "Mixed uses",
1149                                                 n : "Not applicable",
1150                                                 u : "Unknown",
1151                                                 z : "Other"
1152                                 }
1153                         },
1154                         i : {   start : 8,
1155                                 len   : 1,
1156                                 label : "Sensor type",
1157                                 values: {       a : "Active",
1158                                                 b : "Passive",
1159                                                 u : "Unknown",
1160                                                 z : "Other"
1161                                 }
1162                         },
1163                         j : {   start : 9,
1164                                 len   : 2,
1165                                 label : "Data type",
1166                                 values: {       nn : "Not applicable",
1167                                                 uu : "Unknown",
1168                                                 zz : "Other",
1169                                                 aa : "Visible light",
1170                                                 da : "Near infrared",
1171                                                 db : "Middle infrared",
1172                                                 dc : "Far infrared",
1173                                                 dd : "Thermal infrared",
1174                                                 de : "Shortwave infrared (SWIR)",
1175                                                 df : "Reflective infrared",
1176                                                 dv : "Combinations",
1177                                                 dz : "Other infrared data",
1178                                                 ga : "Sidelooking airborne radar (SLAR)",
1179                                                 gb : "Synthetic aperture radar (SAR-single frequency)",
1180                                                 gc : "SAR-multi-frequency (multichannel)",
1181                                                 gd : "SAR-like polarization",
1182                                                 ge : "SAR-cross polarization",
1183                                                 gf : "Infometric SAR",
1184                                                 gg : "Polarmetric SAR",
1185                                                 gu : "Passive microwave mapping",
1186                                                 gz : "Other microwave data",
1187                                                 ja : "Far ultraviolet",
1188                                                 jb : "Middle ultraviolet",
1189                                                 jc : "Near ultraviolet",
1190                                                 jv : "Ultraviolet combinations",
1191                                                 jz : "Other ultraviolet data",
1192                                                 ma : "Multi-spectral, multidata",
1193                                                 mb : "Multi-temporal",
1194                                                 mm : "Combination of various data types",
1195                                                 pa : "Sonar-water depth",
1196                                                 pb : "Sonar-bottom topography images, sidescan",
1197                                                 pc : "Sonar-bottom topography, near-surface",
1198                                                 pd : "Sonar-bottom topography, near-bottom",
1199                                                 pe : "Seismic surveys",
1200                                                 pz : "Other acoustical data",
1201                                                 ra : "Gravity anomales (general)",
1202                                                 rb : "Free-air",
1203                                                 rc : "Bouger",
1204                                                 rd : "Isostatic",
1205                                                 sa : "Magnetic field",
1206                                                 ta : "Radiometric surveys"
1207                                 }
1208                         }
1209                 }
1210         },
1211         s : {
1212                 label     : "Sound Recording",
1213                 subfields : {
1214                         b : {   start : 1,
1215                                 len   : 1,
1216                                 label : "SMD",
1217                                 values: {       d : "Sound disc",
1218                                                 e : "Cylinder",
1219                                                 g : "Sound cartridge",
1220                                                 i : "Sound-track film",
1221                                                 q : "Roll",
1222                                                 s : "Sound cassette",
1223                                                 t : "Sound-tape reel",
1224                                                 u : "Unspecified",
1225                                                 w : "Wire recording",
1226                                                 z : "Other"
1227                                 }
1228                         },
1229                         d : {   start : 3,
1230                                 len   : 1,
1231                                 label : "Speed",
1232                                 values: {       a : "16 rpm",
1233                                                 b : "33 1/3 rpm",
1234                                                 c : "45 rpm",
1235                                                 d : "78 rpm",
1236                                                 e : "8 rpm",
1237                                                 f : "1.4 mps",
1238                                                 h : "120 rpm",
1239                                                 i : "160 rpm",
1240                                                 k : "15/16 ips",
1241                                                 l : "1 7/8 ips",
1242                                                 m : "3 3/4 ips",
1243                                                 o : "7 1/2 ips",
1244                                                 p : "15 ips",
1245                                                 r : "30 ips",
1246                                                 u : "Unknown",
1247                                                 z : "Other"
1248                                 }
1249                         },
1250                         e : {   start : 4,
1251                                 len   : 1,
1252                                 label : "Configuration of playback channels",
1253                                 values: {       m : "Monaural",
1254                                                 q : "Quadraphonic",
1255                                                 s : "Stereophonic",
1256                                                 u : "Unknown",
1257                                                 z : "Other"
1258                                 }
1259                         },
1260                         f : {   start : 5,
1261                                 len   : 1,
1262                                 label : "Groove width or pitch",
1263                                 values: {       m : "Microgroove/fine",
1264                                                 n : "Not applicable",
1265                                                 s : "Coarse/standard",
1266                                                 u : "Unknown",
1267                                                 z : "Other"
1268                                 }
1269                         },
1270                         g : {   start : 6,
1271                                 len   : 1,
1272                                 label : "Dimensions",
1273                                 values: {       a : "3 in.",
1274                                                 b : "5 in.",
1275                                                 c : "7 in.",
1276                                                 d : "10 in.",
1277                                                 e : "12 in.",
1278                                                 f : "16 in.",
1279                                                 g : "4 3/4 in. (12 cm.)",
1280                                                 j : "3 7/8 x 2 1/2 in.",
1281                                                 o : "5 1/4 x 3 7/8 in.",
1282                                                 s : "2 3/4 x 4 in.",
1283                                                 n : "Not applicable",
1284                                                 u : "Unknown",
1285                                                 z : "Other"
1286                                 }
1287                         },
1288                         h : {   start : 7,
1289                                 len   : 1,
1290                                 label : "Tape width",
1291                                 values: {       l : "1/8 in.",
1292                                                 m : "1/4in.",
1293                                                 n : "Not applicable",
1294                                                 o : "1/2 in.",
1295                                                 p : "1 in.",
1296                                                 u : "Unknown",
1297                                                 z : "Other"
1298                                 }
1299                         },
1300                         i : {   start : 8,
1301                                 len   : 1,
1302                                 label : "Tape configuration ",
1303                                 values: {       a : "Full (1) track",
1304                                                 b : "Half (2) track",
1305                                                 c : "Quarter (4) track",
1306                                                 d : "8 track",
1307                                                 e : "12 track",
1308                                                 f : "16 track",
1309                                                 n : "Not applicable",
1310                                                 u : "Unknown",
1311                                                 z : "Other"
1312                                 }
1313                         },
1314                         m : {   start : 12,
1315                                 len   : 1,
1316                                 label : "Special playback",
1317                                 values: {       a : "NAB standard",
1318                                                 b : "CCIR standard",
1319                                                 c : "Dolby-B encoded, standard Dolby",
1320                                                 d : "dbx encoded",
1321                                                 e : "Digital recording",
1322                                                 f : "Dolby-A encoded",
1323                                                 g : "Dolby-C encoded",
1324                                                 h : "CX encoded",
1325                                                 n : "Not applicable",
1326                                                 u : "Unknown",
1327                                                 z : "Other"
1328                                 }
1329                         },
1330                         n : {   start : 13,
1331                                 len   : 1,
1332                                 label : "Capture and storage",
1333                                 values: {       a : "Acoustical capture, direct storage",
1334                                                 b : "Direct storage, not acoustical",
1335                                                 d : "Digital storage",
1336                                                 e : "Analog electrical storage",
1337                                                 u : "Unknown",
1338                                                 z : "Other"
1339                                 }
1340                         }
1341                 }
1342         },
1343         f : {
1344                 label     : "Tactile Material",
1345                 subfields : {
1346                         b : {   start : 1,
1347                                 len   : 1,
1348                                 label : "SMD",
1349                                 values: {       a : "Moon",
1350                                                 b : "Braille",
1351                                                 c : "Combination",
1352                                                 d : "Tactile, with no writing system",
1353                                                 u : "Unspecified",
1354                                                 z : "Other"
1355                                 }
1356                         },
1357                         d : {   start : 3,
1358                                 len   : 2,
1359                                 label : "Class of braille writing",
1360                                 values: {       a : "Literary braille",
1361                                                 b : "Format code braille",
1362                                                 c : "Mathematics and scientific braille",
1363                                                 d : "Computer braille",
1364                                                 e : "Music braille",
1365                                                 m : "Multiple braille types",
1366                                                 n : "Not applicable",
1367                                                 u : "Unknown",
1368                                                 z : "Other"
1369                                 }
1370                         },
1371                         e : {   start : 4,
1372                                 len   : 1,
1373                                 label : "Level of contraction",
1374                                 values: {       a : "Uncontracted",
1375                                                 b : "Contracted",
1376                                                 m : "Combination",
1377                                                 n : "Not applicable",
1378                                                 u : "Unknown",
1379                                                 z : "Other"
1380                                 }
1381                         },
1382                         f : {   start : 6,
1383                                 len   : 3,
1384                                 label : "Braille music format",
1385                                 values: {       a : "Bar over bar",
1386                                                 b : "Bar by bar",
1387                                                 c : "Line over line",
1388                                                 d : "Paragraph",
1389                                                 e : "Single line",
1390                                                 f : "Section by section",
1391                                                 g : "Line by line",
1392                                                 h : "Open score",
1393                                                 i : "Spanner short form scoring",
1394                                                 j : "Short form scoring",
1395                                                 k : "Outline",
1396                                                 l : "Vertical score",
1397                                                 n : "Not applicable",
1398                                                 u : "Unknown",
1399                                                 z : "Other"
1400                                 }
1401                         },
1402                         g : {   start : 9,
1403                                 len   : 1,
1404                                 label : "Special physical characteristics",
1405                                 values: {       a : "Print/braille",
1406                                                 b : "Jumbo or enlarged braille",
1407                                                 n : "Not applicable",
1408                                                 u : "Unknown",
1409                                                 z : "Other"
1410                                 }
1411                         }
1412                 }
1413         },
1414         v : {
1415                 label     : "Videorecording",
1416                 subfields : {
1417                         b : {   start : 1,
1418                                 len   : 1,
1419                                 label : "SMD",
1420                                 values: {       c : "Videocartridge",
1421                                                 d : "Videodisc",
1422                                                 f : "Videocassette",
1423                                                 r : "Videoreel",
1424                                                 u : "Unspecified",
1425                                                 z : "Other"
1426                                 }
1427                         },
1428                         d : {   start : 3,
1429                                 len   : 1,
1430                                 label : "Color",
1431                                 values: {       b : "Black-and-white",
1432                                                 c : "Multicolored",
1433                                                 m : "Mixed",
1434                                                 n : "Not applicable",
1435                                                 u : "Unknown",
1436                                                 z : "Other"
1437                                 }
1438                         },
1439                         e : {   start : 4,
1440                                 len   : 1,
1441                                 label : "Videorecording format",
1442                                 values: {       a : "Beta",
1443                                                 b : "VHS",
1444                                                 c : "U-matic",
1445                                                 d : "EIAJ",
1446                                                 e : "Type C",
1447                                                 f : "Quadruplex",
1448                                                 g : "Laserdisc",
1449                                                 h : "CED",
1450                                                 i : "Betacam",
1451                                                 j : "Betacam SP",
1452                                                 k : "Super-VHS",
1453                                                 m : "M-II",
1454                                                 o : "D-2",
1455                                                 p : "8 mm.",
1456                                                 q : "Hi-8 mm.",
1457                                                 u : "Unknown",
1458                                                 v : "DVD",
1459                                                 z : "Other"
1460                                 }
1461                         },
1462                         f : {   start : 5,
1463                                 len   : 1,
1464                                 label : "Sound on medium or separate",
1465                                 values: {       a : "Sound on medium",
1466                                                 b : "Sound separate from medium",
1467                                                 u : "Unknown"
1468                                 }
1469                         },
1470                         g : {   start : 6,
1471                                 len   : 1,
1472                                 label : "Medium for sound",
1473                                 values: {       a : "Optical sound track on motion picture film",
1474                                                 b : "Magnetic sound track on motion picture film",
1475                                                 c : "Magnetic audio tape in cartridge",
1476                                                 d : "Sound disc",
1477                                                 e : "Magnetic audio tape on reel",
1478                                                 f : "Magnetic audio tape in cassette",
1479                                                 g : "Optical and magnetic sound track on motion picture film",
1480                                                 h : "Videotape",
1481                                                 i : "Videodisc",
1482                                                 u : "Unknown",
1483                                                 z : "Other"
1484                                 }
1485                         },
1486                         h : {   start : 7,
1487                                 len   : 1,
1488                                 label : "Dimensions",
1489                                 values: {       a : "8 mm.",
1490                                                 m : "1/4 in.",
1491                                                 o : "1/2 in.",
1492                                                 p : "1 in.",
1493                                                 q : "2 in.",
1494                                                 r : "3/4 in.",
1495                                                 u : "Unknown",
1496                                                 z : "Other"
1497                                 }
1498                         },
1499                         i : {   start : 8,
1500                                 len   : 1,
1501                                 label : "Configuration of playback channel",
1502                                 values: {       k : "Mixed",
1503                                                 m : "Monaural",
1504                                                 n : "Not applicable",
1505                                                 q : "Multichannel, surround or quadraphonic",
1506                                                 s : "Stereophonic",
1507                                                 u : "Unknown",
1508                                                 z : "Other"
1509                                 }
1510                         }
1511                 }
1512         }
1513     };
1514     
1515     MARC.Record.prototype.recordType = function () {
1516     
1517         var _t = this.leader.substr(MARC.Record._ff_pos.Type.ldr.BKS.start, MARC.Record._ff_pos.Type.ldr.BKS.len);
1518         var _b = this.leader.substr(MARC.Record._ff_pos.BLvl.ldr.BKS.start, MARC.Record._ff_pos.BLvl.ldr.BKS.len);
1519     
1520         for (var t in MARC.Record._recType) {
1521                 if (_t.match(MARC.Record._recType[t].Type) && _b.match(MARC.Record._recType[t].BLvl)) {
1522                         return t;
1523                 }
1524         }
1525         return 'BKS'; // default
1526     }
1527     
1528     MARC.Record.prototype.videorecordingFormatName = function () {
1529         var _7 = this.field('007').data;
1530     
1531         if (_7 && _7.match(/^v/)) {
1532                 var _v_e = _7.substr(
1533                         MARC.Record._physical_characteristics.v.subfields.e.start,
1534                         MARC.Record._physical_characteristics.v.subfields.e.len
1535                 );
1536     
1537                 return MARC.Record._physical_characteristics.v.subfields.e.values[ _v_e ];
1538         }
1539     
1540         return null;
1541     }
1542     
1543     MARC.Record.prototype.videorecordingFormatCode = function () {
1544         var _7 = this.field('007').data;
1545     
1546         if (_7 && _7.match(/^v/)) {
1547                 return _7.substr(
1548                         MARC.Record._physical_characteristics.v.subfields.e.start,
1549                         MARC.Record._physical_characteristics.v.subfields.e.len
1550                 );
1551         }
1552     
1553         return null;
1554     }
1555     
1556     MARC.Record.prototype.extractFixedField = function (field, dflt) {
1557         if (!MARC.Record._ff_pos[field]) return null;
1558     
1559         var _l = this.leader;
1560         var _8 = this.field('008').data;
1561         var _6 = this.field('006').data;
1562     
1563         var rtype = this.recordType();
1564     
1565         var val;
1566     
1567         if (MARC.Record._ff_pos[field].ldr && _l) {
1568                 if (MARC.Record._ff_pos[field].ldr[rtype]) {
1569                         val = _l.substr(
1570                                 MARC.Record._ff_pos[field].ldr[rtype].start,
1571                                 MARC.Record._ff_pos[field].ldr[rtype].len
1572                         );
1573                 }
1574         } else if (MARC.Record._ff_pos[field]._8 && _8) {
1575                 if (MARC.Record._ff_pos[field]._8[rtype]) {
1576                         val = _8.substr(
1577                                 MARC.Record._ff_pos[field]._8[rtype].start,
1578                                 MARC.Record._ff_pos[field]._8[rtype].len
1579                         );
1580                 }
1581         }
1582     
1583         if (!val && MARC.Record._ff_pos[field]._6 && _6) {
1584                 if (MARC.Record._ff_pos[field]._6[rtype]) {
1585                         val = _6.substr(
1586                                 MARC.Record._ff_pos[field]._6[rtype].start,
1587                                 MARC.Record._ff_pos[field]._6[rtype].len
1588                         );
1589                 }
1590         }
1591
1592         if (!val && dflt) {
1593             val = '';
1594             var d;
1595             var p;
1596             if (MARC.Record._ff_pos[field].ldr && MARC.Record._ff_pos[field].ldr[rtype]) {
1597                 d = MARC.Record._ff_pos[field].ldr[rtype].def;
1598                 p = 'ldr';
1599             }
1600
1601             if (MARC.Record._ff_pos[field]._8 && MARC.Record._ff_pos[field]._8[rtype]) {
1602                 d = MARC.Record._ff_pos[field]._8[rtype].def;
1603                 p = '_8';
1604             }
1605
1606             if (!val && MARC.Record._ff_pos[field]._6 && MARC.Record._ff_pos[field]._6[rtype]) {
1607                 d = MARC.Record._ff_pos[field]._6[rtype].def;
1608                 p = '_6';
1609             }
1610
1611             if (p) {
1612                 for (var j = 0; j < MARC.Record._ff_pos[field][p][rtype].len; j++) {
1613                     val += d;
1614                 }
1615             } else {
1616                 val = null;
1617             }
1618         }
1619
1620         return val;
1621     }
1622
1623     MARC.Record.prototype.setFixedField = function (field, value) {
1624         if (!MARC.Record._ff_pos[field]) return null;
1625     
1626         var _l = this.leader;
1627         var _8 = this.field('008').data;
1628         var _6 = this.field('006').data;
1629     
1630         var rtype = this.recordType();
1631     
1632         var val;
1633     
1634         if (MARC.Record._ff_pos[field].ldr && _l) {
1635                 if (MARC.Record._ff_pos[field].ldr[rtype]) { // It's in the leader
1636                 val = value.substr(0, MARC.Record._ff_pos[field].ldr[rtype].len);
1637                 this.leader =
1638                     _l.substring(0, MARC.Record._ff_pos[field].ldr[rtype].start) +
1639                     val +
1640                     _l.substring(
1641                         MARC.Record._ff_pos[field].ldr[rtype].start
1642                         + MARC.Record._ff_pos[field].ldr[rtype].len
1643                     );
1644                 }
1645         } else if (MARC.Record._ff_pos[field]._8 && _8) {
1646                 if (MARC.Record._ff_pos[field]._8[rtype]) { // Nope, it's in the 008
1647                 val = value.substr(0, MARC.Record._ff_pos[field]._8[rtype].len);
1648                 this.field('008').update(
1649                     _8.substring(0, MARC.Record._ff_pos[field]._8[rtype].start) +
1650                     val +
1651                     _8.substring(
1652                         MARC.Record._ff_pos[field]._8[rtype].start
1653                         + MARC.Record._ff_pos[field]._8[rtype].len
1654                     )
1655                 );
1656                 }
1657         }
1658     
1659         if (!val && MARC.Record._ff_pos[field]._6 && _6) {
1660                 if (MARC.Record._ff_pos[field]._6[rtype]) { // ok, maybe the 006?
1661                 val = value.substr(0, MARC.Record._ff_pos[field]._6[rtype].len);
1662                 this.field('006').update(
1663                     _6.substring(0, MARC.Record._ff_pos[field]._6[rtype].start) +
1664                     val +
1665                     _6.substring(
1666                         MARC.Record._ff_pos[field]._6[rtype].start
1667                         + MARC.Record._ff_pos[field]._6[rtype].len
1668                     )
1669                 );
1670                 }
1671         }
1672
1673         return val;
1674     }
1675