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