]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/js/ui/default/staff/marcrecord.js
LP#1402797 Initial MARC editor -- load, edit content, save, see the Breaker version
[working/Evergreen.git] / Open-ILS / web / js / ui / default / staff / marcrecord.js
1 /* ---------------------------------------------------------------------------
2  * Copyright (C) 2009-2015  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 // !!! Head's up !!!
18 // This module requires a /real/ jQuery be used with your
19 // angularjs, so as to avoid using hand-rolled AJAX.
20
21 var MARC = {
22
23     Record : function(kwargs) {
24         if (!kwargs) kwargs = {};
25
26         this.title = function () { return this.subfield('245','a')[1] }
27
28         this.field = function (spec) {
29             var list = this.fields.filter(function (f) {
30                 if (f.tag.match(spec)) return true;
31                 return false;
32             });
33
34             if (list.length == 1) return list[0];
35             return list;
36         }
37
38         this.subfield = function (spec, code) {
39             var f = this.field(spec);
40             if (Array.isArray(f)) {
41                 if (!f.length) return f;
42                 f = f[0];
43             }
44             return f.subfield(code)
45         }
46
47         this.appendFields = function () {
48             var me = this;
49             Array.prototype.slice.call(arguments).forEach( function (f) { me.fields.push( f ) } );
50         }
51
52         this.deleteField = function (f) { return this.deleteFields(f) },
53
54         this.insertOrderedFields = function () {
55             var me = this;
56             for (var i = 0; i < arguments.length; i++) {
57                 var f = arguments[i];
58                 var done = false;
59                 for (var j = 0; j < this.fields.length; j++) {
60                     if (f.tag < this.fields[j].tag) {
61                         this.insertFieldsBefore(this.fields[j], f);
62                         done = true;
63                         break;
64                     }
65                 }
66                 if (!done) this.appendFields(f);
67             }
68         }
69
70         this.insertFieldsBefore = function (target) {
71             var args = Array.prototype.slice.call(arguments);
72             args.splice(0,1);
73             var me = this;
74             for (var j = 0; j < this.fields.length; j++) {
75                 if (target === this.fields[j]) {
76                     j--;
77                     args.forEach( function (f) {
78                         me.fields.splice(j++,0,f);
79                     });
80                     break;
81                 }
82             }
83         }
84
85         this.insertFieldsAfter = function (target) {
86             var args = Array.prototype.slice.call(arguments);
87             args.splice(0,1);
88             var me = this;
89             for (var j = 0; j < this.fields.length; j++) {
90                 if (target === this.fields[j]) {
91                     args.forEach( function (f) {
92                         me.fields.splice(j++,0,f);
93                     });
94                     break;
95                 }
96             }
97         }
98
99         this.deleteFields = function () {
100             var me = this;
101             var counter = 0;
102             for ( var i in arguments ) {
103                 var f = arguments[i];
104                 for (var j = 0; j < me.fields.length; j++) {
105                     if (f === me.fields[j]) {
106                         me.fields[j].record = null;
107                         me.fields.splice(j,0);
108                         counter++
109                         break;
110                     }
111                 }
112             }
113             return counter;
114         }
115
116         // this.clone = function () { return dojo.clone(this) } // maybe implement later...
117
118         this.fromXmlURL = function (url) {
119             this.ready   = false;
120             var me = this;
121             return $.get( // This is a Promise
122                 url,
123                 function (mxml) {
124                     me.fromXmlDocument($('record', mxml)[0]);
125                     me.ready = true;
126                     if (me.onLoad) me.onLoad();
127             });
128         },
129
130         this.fromXmlString = function (mxml) {
131                 this.fromXmlDocument( $( $.parseXML( mxml ) ).find('record')[0] );
132         },
133
134         this.fromXmlDocument = function (mxml) {
135             var me = this;
136             me.leader = $($('leader',mxml)[0]).text() || '00000cam a2200205Ka 4500';
137
138             $('controlfield', mxml).each(function () {
139                 var cf=$(this);
140                 me.fields.push(
141                     new MARC.Field({
142                           record : me,
143                           tag    : cf.attr('tag'),
144                           data   : cf.text()
145                     })
146                 )
147             });
148
149             $('datafield', mxml).each(function () {
150                 var df=$(this);
151                 me.fields.push(
152                     new MARC.Field({
153                         record    : me,
154                         tag       : df.attr('tag'),
155                         ind1      : df.attr('ind1'),
156                         ind2      : df.attr('ind2'),
157                         subfields : $('subfield', df).map(
158                             function (i, sf) {
159                                 return [[ $(sf).attr('code'), $(sf).text() ]];
160                             }
161                         ).get()
162                     })
163                 )
164             });
165
166         },
167
168         this.toXmlDocument = function () {
169
170             var doc = $.parseXML('<record xmlns="http://www.loc.gov/MARC21/slim"/>');
171             var rec_node = $('record', doc)[0];
172
173             var ldr = doc.createElementNS('http://www.loc.gov/MARC21/slim', 'leader');
174             ldr.textContent = this.leader;
175             rec_node.appendChild( ldr );
176
177             this.fields.forEach(function (f) {
178                 var element = f.isControlfield() ? 'controlfield' : 'datafield';
179                 var f_node = doc.createElementNS( 'http://www.loc.gov/MARC21/slim', element );
180                 f_node.setAttribute('tag', f.tag);
181                 
182                 if (f.isControlfield()) {
183                     if (f.data) f_node.textContent = f.data;
184                 } else {
185                     f_node.setAttribute('ind1', f.indicator(1));
186                     f_node.setAttribute('ind2', f.indicator(2));
187                     f.subfields.forEach( function (sf) {
188                         var sf_node = doc.createElementNS('http://www.loc.gov/MARC21/slim', 'subfield');
189                         sf_node.setAttribute('code', sf[0]);
190                         sf_node.textContent = sf[1];
191                         f_node.appendChild(sf_node);
192                     });
193                 }
194
195                 rec_node.appendChild(f_node);
196             });
197
198             return doc;
199         },
200
201         this.toXmlString = function () {
202             return (new XMLSerializer()).serializeToString( this.toXmlDocument() );
203         },
204
205         this.fromBreaker = function (marctxt) {
206             var me = this;
207
208             function cf_line_data (l) { return l.substring(4) || '' };
209             function df_line_data (l) { return l.substring(6) || '' };
210             function line_tag (l) { return l.substring(0,3) };
211             function df_ind1 (l) { return l.substring(4,5).replace('\\',' ') };
212             function df_ind2 (l) { return l.substring(5,6).replace('\\',' ') };
213             function isControlField (l) {
214                 var x = line_tag(l);
215                 return (x == 'LDR' || x < '010') ? true : false;
216             }
217             
218             var lines = marctxt.replace(/^=/gm,'').split('\n');
219             lines.forEach(function (current_line) {
220
221                 if (current_line.match(/^#/)) {
222                     // skip comment lines
223                 } else if (isControlField(current_line)) {
224                     if (line_tag(current_line) == 'LDR') {
225                         me.leader = cf_line_data(current_line) || '00000cam a2200205Ka 4500';
226                     } else {
227                         me.fields.push(
228                             new MARC.Field({
229                                 record : me,
230                                 tag    : line_tag(current_line),
231                                 data   : cf_line_data(current_line).replace('\\',' ','g')
232                             })
233                         );
234                     }
235                 } else {
236                     if (current_line.substring(4,5) == me.delimiter) // add delimiters if they were left out
237                         current_line = current_line.substring(0,3) + ' \\\\' + current_line.substring(4);
238
239                     var data = df_line_data(current_line);
240                     if (!(data.substring(0,1) == me.delimiter)) data = me.delimiter + 'a' + data;
241
242                     var sf_list = data.split(me.delimiter);
243                     sf_list.shift();
244
245                     me.fields.push(
246                         new MARC.Field({
247                                 record    : me,
248                                 tag       : line_tag(current_line),
249                                 ind1      : df_ind1(current_line),
250                                 ind2      : df_ind2(current_line),
251                                 subfields : sf_list.map( function (sf) {
252                                                 var sf_data = sf.substring(1);
253                                                 if (me.delimiter == '$') sf_data = sf_data.replace(/\{dollar\}/g, '$');
254                                                 return [ sf.substring(0,1), sf_data ];
255                                             })
256                         })
257                     );
258                 }
259             });
260
261             return this;
262         },
263
264         this.toBreaker = function () {
265
266             var me = this;
267             var mtxt = '=LDR ' + this.leader + '\n';
268
269             mtxt += this.fields.map( function (f) {
270                 if (f.isControlfield()) {
271                     if (f.data) return '=' + f.tag + ' ' + f.data.replace(' ','\\','g');
272                     return '=' + f.tag;
273                 } else {
274                     return '=' + f.tag + ' ' +
275                         f.indicator(1).replace(' ','\\') + 
276                         f.indicator(2).replace(' ','\\') + 
277                         f.subfields.map( function (sf) {
278                             var sf_data = sf[1];
279                             if (me.delimiter == '$') sf_data = sf_data.replace(/\$/g, '{dollar}');
280                             return me.delimiter + sf[0] + sf_data;
281                         }).join('');
282                 }
283             }).join('\n');
284
285             return mtxt;
286         }
287
288         this.recordType = function () {
289         
290             var _t = this.leader.substr(MARC.Record._ff_pos.Type.ldr.BKS.start, MARC.Record._ff_pos.Type.ldr.BKS.len);
291             var _b = this.leader.substr(MARC.Record._ff_pos.BLvl.ldr.BKS.start, MARC.Record._ff_pos.BLvl.ldr.BKS.len);
292         
293             for (var t in MARC.Record._recType) {
294                 if (_t.match(MARC.Record._recType[t].Type) && _b.match(MARC.Record._recType[t].BLvl)) {
295                     return t;
296                 }
297             }
298             return 'BKS'; // default
299         }
300         
301         this.videorecordingFormatName = function () {
302             var _7 = this.field('007').data;
303         
304             if (_7 && _7.match(/^v/)) {
305                 var _v_e = _7.substr(
306                     MARC.Record._physical_characteristics.v.subfields.e.start,
307                     MARC.Record._physical_characteristics.v.subfields.e.len
308                 );
309         
310                 return MARC.Record._physical_characteristics.v.subfields.e.values[ _v_e ];
311             }
312         
313             return null;
314         }
315         
316         this.videorecordingFormatCode = function () {
317             var _7 = this.field('007').data;
318         
319             if (_7 && _7.match(/^v/)) {
320                 return _7.substr(
321                     MARC.Record._physical_characteristics.v.subfields.e.start,
322                     MARC.Record._physical_characteristics.v.subfields.e.len
323                 );
324             }
325         
326             return null;
327         }
328         
329         this.extractFixedField = function (field, dflt) {
330         if (!MARC.Record._ff_pos[field]) return null;
331         
332             var _l = this.leader;
333             var _8 = this.field('008').data;
334             var _6 = this.field('006').data;
335         
336             var rtype = this.recordType();
337         
338             var val;
339         
340             if (MARC.Record._ff_pos[field].ldr && _l) {
341                 if (MARC.Record._ff_pos[field].ldr[rtype]) {
342                     val = _l.substr(
343                         MARC.Record._ff_pos[field].ldr[rtype].start,
344                         MARC.Record._ff_pos[field].ldr[rtype].len
345                     );
346                 }
347             } else if (MARC.Record._ff_pos[field]._8 && _8) {
348                 if (MARC.Record._ff_pos[field]._8[rtype]) {
349                     val = _8.substr(
350                         MARC.Record._ff_pos[field]._8[rtype].start,
351                         MARC.Record._ff_pos[field]._8[rtype].len
352                     );
353                 }
354             }
355         
356             if (!val && MARC.Record._ff_pos[field]._6 && _6) {
357                 if (MARC.Record._ff_pos[field]._6[rtype]) {
358                     val = _6.substr(
359                         MARC.Record._ff_pos[field]._6[rtype].start,
360                         MARC.Record._ff_pos[field]._6[rtype].len
361                     );
362                 }
363             }
364     
365             if (!val && dflt) {
366                 val = '';
367                 var d;
368                 var p;
369                 if (MARC.Record._ff_pos[field].ldr && MARC.Record._ff_pos[field].ldr[rtype]) {
370                     d = MARC.Record._ff_pos[field].ldr[rtype].def;
371                     p = 'ldr';
372                 }
373     
374                 if (MARC.Record._ff_pos[field]._8 && MARC.Record._ff_pos[field]._8[rtype]) {
375                     d = MARC.Record._ff_pos[field]._8[rtype].def;
376                     p = '_8';
377                 }
378     
379                 if (!val && MARC.Record._ff_pos[field]._6 && MARC.Record._ff_pos[field]._6[rtype]) {
380                     d = MARC.Record._ff_pos[field]._6[rtype].def;
381                     p = '_6';
382                 }
383     
384                 if (p) {
385                     for (var j = 0; j < MARC.Record._ff_pos[field][p][rtype].len; j++) {
386                         val += d;
387                     }
388                 } else {
389                     val = null;
390                 }
391             }
392     
393             return val;
394         }
395     
396         this.setFixedField = function (field, value) {
397             if (!MARC.Record._ff_pos[field]) return null;
398         
399             var _l = this.leader;
400             var _8 = this.field('008').data;
401             var _6 = this.field('006').data;
402         
403             var rtype = this.recordType();
404         
405             var val;
406         
407             if (MARC.Record._ff_pos[field].ldr && _l) {
408                 if (MARC.Record._ff_pos[field].ldr[rtype]) { // It's in the leader
409                     val = value.substr(0, MARC.Record._ff_pos[field].ldr[rtype].len);
410                     this.leader =
411                         _l.substring(0, MARC.Record._ff_pos[field].ldr[rtype].start) +
412                         val +
413                         _l.substring(
414                             MARC.Record._ff_pos[field].ldr[rtype].start
415                             + MARC.Record._ff_pos[field].ldr[rtype].len
416                         );
417                 }
418             } else if (MARC.Record._ff_pos[field]._8 && _8) {
419                 if (MARC.Record._ff_pos[field]._8[rtype]) { // Nope, it's in the 008
420                     val = value.substr(0, MARC.Record._ff_pos[field]._8[rtype].len);
421                     this.field('008').update(
422                         _8.substring(0, MARC.Record._ff_pos[field]._8[rtype].start) +
423                         val +
424                         _8.substring(
425                             MARC.Record._ff_pos[field]._8[rtype].start
426                             + MARC.Record._ff_pos[field]._8[rtype].len
427                         )
428                     );
429                 }
430             }
431         
432             if (!val && MARC.Record._ff_pos[field]._6 && _6) {
433                 if (MARC.Record._ff_pos[field]._6[rtype]) { // ok, maybe the 006?
434                     val = value.substr(0, MARC.Record._ff_pos[field]._6[rtype].len);
435                     this.field('006').update(
436                         _6.substring(0, MARC.Record._ff_pos[field]._6[rtype].start) +
437                         val +
438                         _6.substring(
439                             MARC.Record._ff_pos[field]._6[rtype].start
440                             + MARC.Record._ff_pos[field]._6[rtype].len
441                         )
442                     );
443                 }
444             }
445     
446             return val;
447         }
448
449         this.fields = [];
450         this.delimiter = '\u2021';
451         this.leader = '00000cam a2200205Ka 4500';
452
453         if (kwargs.delimiter) this.delimiter = kwargs.delimiter;
454         if (kwargs.onLoad) this.onLoad = kwargs.onLoad;
455
456         if (kwargs.url) {
457             this.fromXmlURL(kwargs.url);
458         } else if (kwargs.marcxml) {
459             this.fromXmlString(kwargs.marcxml);
460             if (this.onLoad) this.onLoad();
461         } else if (kwargs.xml) {
462             this.fromXmlDocument(kwargs.xml);
463             if (this.onLoad) this.onLoad();
464         } else if (kwargs.marcbreaker) {
465             this.fromBreaker(kwargs.marcbreaker);
466             if (this.onLoad) this.onLoad();
467         }
468
469         if (kwargs.rtype == 'AUT') {
470             this.setFixedField('Type','z');
471         }
472
473     },
474
475     Field : function (kwargs) {
476         if (!kwargs) kwargs = {};
477
478         this.subfield = function (code) {
479             var list = this.subfields.filter( function (s) {
480                 if (s[0] == code) return true; return false;
481             });
482             if (list.length == 1) return list[0];
483             return list;
484         }
485
486         this.addSubfields = function () {
487             for (var i = 0; i < arguments.length; i++) {
488                 var code = arguments[i];
489                 var value = arguments[++i];
490                 this.subfields.push( [ code, value ] );
491             }
492         }
493
494         this.deleteSubfields = function (c) {
495             return this.deleteSubfield( { code : c } );
496         }
497
498         this.deleteSubfield = function (args) {
499             var me = this;
500             if (!Array.isArray( args.code )) {
501                 args.code = [ args.code ];
502             }
503
504             if (args.pos && !Array.isArray( args.pos )) {
505                 args.pos = [ args.pos ];
506             }
507
508             for (var i = 0; i < args.code.length; i++) {
509                 var sub_pos = {};
510                 for (var j = 0; j < me.subfields; j++) {
511                     if (me.subfields[j][0] == args.code[i]) {
512
513                         if (!sub_pos[args.code[i]]) sub_pos[args.code[j]] = 0;
514                         else sub_pos[args.code[i]]++;
515
516                         if (args.pos) {
517                             for (var k = 0; k < args.pos.length; k++) {
518                                 if (sub_pos[args.code[i]] == args.pos[k]) me.subfields.splice(j,1);
519                             }
520                         } else if (args.match && me.subfields[j][1].match( args.match )) {
521                             me.subfields.splice(j,1);
522                         } else {
523                             me.subfields.splice(j,1);
524                         }
525                     }
526                 }
527             }
528         }
529
530         this.update = function ( args ) {
531             if (this.isControlfield()) {
532                 this.data = args;
533             } else {
534                 if (args.ind1) this.ind1 = args.ind1;
535                 if (args.ind2) this.ind2 = args.ind2;
536                 if (args.tag) this.tag = args.tag;
537
538                 for (var i in args) {
539                     if (i == 'tag' || i == 'ind1' || i == 'ind2') continue;
540                     var done = 0;
541                     this.subfields.forEach( function (f) {
542                         if (!done && f[0] == i) {
543                             f[1] = args[i];
544                             done = 1;
545                         }
546                     });
547                 }
548             }
549         }
550
551         this.isControlfield = function () {
552             return this.tag < '010' ? true : false;
553         }
554
555         this.indicator = function (num, value) {
556             if (value !== undefined) {
557                 if (num == 1) this.ind1 = value;
558                 else if (num == 2) this.ind2 = value;
559                 else { this.error = true; return null; }
560             }
561             if (num == 1) return this.ind1;
562             else if (num == 2) return this.ind2;
563             else { this.error = true; return null; }
564         }
565
566         this.error = false; 
567         this.record = null; // MARC record pointer
568         this.tag = ''; // MARC tag
569         this.ind1 = ' '; // MARC indicator 1
570         this.ind2 = ' '; // MARC indicator 2
571         this.data = ''; // MARC data for a controlfield element
572         this.subfields = []; // list of MARC subfields for a datafield element
573
574         this.record = kwargs.record;
575         this.tag = kwargs.tag;
576         this.ind1 = kwargs.ind1 || ' ';
577         this.ind2 = kwargs.ind2 || ' ';
578         this.data = kwargs.data;
579
580         if (kwargs.subfields) this.subfields = kwargs.subfields;
581         else this.subfields = [];
582
583     },
584
585     Batch : function(kwargs) {
586
587         this.parse = function () {
588             if (this.source instanceof Object ) { // assume an xml collection document
589                 this.source = $('record', this.source);
590                 this.type = 'xml';
591             } else if (this.source.match(/^\s*</)) { // this is xml text
592                 this.source = $.parseXML( mxml ).find('record');
593                 this.type = 'xml';
594             } else { // must be a marcbreaker doc. split on blank lines
595                 this.source = this.source.split(/^$/);
596                 this.type = 'marcbreaker';
597             }
598         }
599
600         this.fetchURL = function (u) {
601             var me = this;
602             $.get( u, function (mrc) {
603                 me.source = mrc;
604                 me.ready = true;
605             });
606         }
607
608         this.next = function () {
609             var chunk = this.source[this.current_record++];
610
611             if (chunk) {
612                 var args = {};
613                 args[this.type] = chunk;
614                 if (this.delimiter) args.delimiter = this.delimiter;
615                 return new MARC.Record(args);
616             }
617
618             return null;
619         }
620
621         this.ready = false;
622         this.records = [];
623         this.source = kwargs.source;
624         this.delimiter = kwargs.delimiter
625         this.current_record = 0;
626
627         if (this.source) this.ready = true;
628         if (!this.ready && kwargs.url) this.fetchURL( kwargs.url );
629
630         if (this.ready) this.parse();
631
632     }
633 };
634
635 MARC.Record._recType = {
636     BKS : { Type : /[at]{1}/,    BLvl : /[acdm]{1}/ },
637     SER : { Type : /[a]{1}/,    BLvl : /[bsi]{1}/ },
638     VIS : { Type : /[gkro]{1}/,    BLvl : /[abcdmsi]{1}/ },
639     MIX : { Type : /[p]{1}/,    BLvl : /[cdi]{1}/ },
640     MAP : { Type : /[ef]{1}/,    BLvl : /[abcdmsi]{1}/ },
641     SCO : { Type : /[cd]{1}/,    BLvl : /[abcdmsi]{1}/ },
642     REC : { Type : /[ij]{1}/,    BLvl : /[abcdmsi]{1}/ },
643     COM : { Type : /[m]{1}/,    BLvl : /[abcdmsi]{1}/ },
644     AUT : { Type : /[z]{1}/,    BLvl : /.{1}/ },
645     MFHD : { Type : /[uvxy]{1}/,  BLvl : /.{1}/ }
646 };
647
648 MARC.Record._ff_pos = {
649     AccM : {
650         _8 : {
651             SCO : {start: 24, len : 6, def : ' ' },
652             REC : {start: 24, len : 6, def : ' ' }
653         },
654         _6 : {
655             SCO : {start: 7, len : 6, def : ' ' },
656             REC : {start: 7, len : 6, def : ' ' }
657         }
658     },
659     Alph : {
660         _8 : {
661             SER : {start : 33, len : 1, def : ' ' }
662         },
663         _6 : {
664             SER : {start : 16, len : 1, def : ' ' }
665         }
666     },
667     Audn : {
668         _8 : {
669             BKS : {start : 22, len : 1, def : ' ' },
670             SER : {start : 22, len : 1, def : ' ' },
671             VIS : {start : 22, len : 1, def : ' ' },
672             SCO : {start : 22, len : 1, def : ' ' },
673             REC : {start : 22, len : 1, def : ' ' },
674             COM : {start : 22, len : 1, def : ' ' }
675         },
676         _6 : {
677             BKS : {start : 5, len : 1, def : ' ' },
678             SER : {start : 5, len : 1, def : ' ' },
679             VIS : {start : 5, len : 1, def : ' ' },
680             SCO : {start : 5, len : 1, def : ' ' },
681             REC : {start : 5, len : 1, def : ' ' },
682             COM : {start : 5, len : 1, def : ' ' }
683         }
684     },
685     Biog : {
686         _8 : {
687             BKS : {start : 34, len : 1, def : ' ' }
688         },
689         _6 : {
690             BKS : {start : 17, len : 1, def : ' ' }
691         }
692     },
693     BLvl : {
694         ldr : {
695             BKS : {start : 7, len : 1, def : 'm' },
696             SER : {start : 7, len : 1, def : 's' },
697             VIS : {start : 7, len : 1, def : 'm' },
698             MIX : {start : 7, len : 1, def : 'c' },
699             MAP : {start : 7, len : 1, def : 'm' },
700             SCO : {start : 7, len : 1, def : 'm' },
701             REC : {start : 7, len : 1, def : 'm' },
702             COM : {start : 7, len : 1, def : 'm' }
703         }
704     },
705     Comp : {
706         _8 : {
707             SCO : {start : 18, len : 2, def : 'uu'},
708             REC : {start : 18, len : 2, def : 'uu'}
709         },
710         _6 : {
711             SCO : {start : 1, len : 2, def : 'uu'},
712             REC : {start : 1, len : 2, def : 'uu'}
713         },
714     },
715     Conf : {
716         _8 : {
717             BKS : {start : 29, len : 1, def : '0' },
718             SER : {start : 29, len : 1, def : '0' }
719         },
720         _6 : {
721             BKS : {start : 11, len : 1, def : '0' },
722             SER : {start : 11, len : 1, def : '0' }
723         }
724     },
725     Cont : {
726         _8 : {
727             BKS : {start : 24, len : 4, def : ' ' },
728             SER : {start : 25, len : 3, def : ' ' }
729         },
730         _6 : {
731             BKS : {start : 7, len : 4, def : ' ' },
732             SER : {start : 8, len : 3, def : ' ' }
733         }
734     },
735     CrTp : {
736         _8 : {
737             MAP : {start: 25, len : 1, def : 'a' }
738         },
739         _6 : { 
740             MAP : {start : 8, len : 1, def : 'a' }
741         }
742     },
743     Ctrl : {
744         ldr : {
745             BKS : {start : 8, len : 1, def : ' ' },
746             SER : {start : 8, len : 1, def : ' ' },
747             VIS : {start : 8, len : 1, def : ' ' },
748             MIX : {start : 8, len : 1, def : ' ' },
749             MAP : {start : 8, len : 1, def : ' ' },
750             SCO : {start : 8, len : 1, def : ' ' },
751             REC : {start : 8, len : 1, def : ' ' },
752             COM : {start : 8, len : 1, def : ' ' }
753         }
754     },
755     Ctry : {
756             _8 : {
757                 BKS : {start : 15, len : 3, def : ' ' },
758                 SER : {start : 15, len : 3, def : ' ' },
759                 VIS : {start : 15, len : 3, def : ' ' },
760                 MIX : {start : 15, len : 3, def : ' ' },
761                 MAP : {start : 15, len : 3, def : ' ' },
762                 SCO : {start : 15, len : 3, def : ' ' },
763                 REC : {start : 15, len : 3, def : ' ' },
764                 COM : {start : 15, len : 3, def : ' ' }
765             }
766         },
767     Date1 : {
768         _8 : {
769             BKS : {start : 7, len : 4, def : ' ' },
770             SER : {start : 7, len : 4, def : ' ' },
771             VIS : {start : 7, len : 4, def : ' ' },
772             MIX : {start : 7, len : 4, def : ' ' },
773             MAP : {start : 7, len : 4, def : ' ' },
774             SCO : {start : 7, len : 4, def : ' ' },
775             REC : {start : 7, len : 4, def : ' ' },
776             COM : {start : 7, len : 4, def : ' ' }
777         }
778     },
779     Date2 : {
780         _8 : {
781             BKS : {start : 11, len : 4, def : ' ' },
782             SER : {start : 11, len : 4, def : '9' },
783             VIS : {start : 11, len : 4, def : ' ' },
784             MIX : {start : 11, len : 4, def : ' ' },
785             MAP : {start : 11, len : 4, def : ' ' },
786             SCO : {start : 11, len : 4, def : ' ' },
787             REC : {start : 11, len : 4, def : ' ' },
788             COM : {start : 11, len : 4, def : ' ' }
789         }
790     },
791     Desc : {
792         ldr : {
793             BKS : {start : 18, len : 1, def : ' ' },
794             SER : {start : 18, len : 1, def : ' ' },
795             VIS : {start : 18, len : 1, def : ' ' },
796             MIX : {start : 18, len : 1, def : ' ' },
797             MAP : {start : 18, len : 1, def : ' ' },
798             SCO : {start : 18, len : 1, def : ' ' },
799             REC : {start : 18, len : 1, def : ' ' },
800             COM : {start : 18, len : 1, def : ' ' }
801         }
802     },
803     DtSt : {
804         _8 : {
805             BKS : {start : 6, len : 1, def : ' ' },
806             SER : {start : 6, len : 1, def : 'c' },
807             VIS : {start : 6, len : 1, def : ' ' },
808             MIX : {start : 6, len : 1, def : ' ' },
809             MAP : {start : 6, len : 1, def : ' ' },
810             SCO : {start : 6, len : 1, def : ' ' },
811             REC : {start : 6, len : 1, def : ' ' },
812             COM : {start : 6, len : 1, def : ' ' }
813         }
814     },
815     ELvl : {
816         ldr : {
817             BKS : {start : 17, len : 1, def : ' ' },
818             SER : {start : 17, len : 1, def : ' ' },
819             VIS : {start : 17, len : 1, def : ' ' },
820             MIX : {start : 17, len : 1, def : ' ' },
821             MAP : {start : 17, len : 1, def : ' ' },
822             SCO : {start : 17, len : 1, def : ' ' },
823             REC : {start : 17, len : 1, def : ' ' },
824             COM : {start : 17, len : 1, def : ' ' },
825             AUT : {start : 17, len : 1, def : 'n' },
826             MFHD : {start : 17, len : 1, def : 'u' }
827         }
828     },
829     EntW : {
830         _8 : {
831             SER : {start : 24, len : 1, def : ' '}
832         },
833         _6 : {
834             SER : {start : 7, len : 1, def : ' '}
835         }
836     },
837     Fest : {
838         _8 : {
839             BKS : {start : 30, len : 1, def : '0' }
840         },
841         _6 : {
842             BKS : {start : 13, len : 1, def : '0' }
843         }
844     },
845     File : {
846         _8 : {
847             COM : {start: 26, len : 1, def : 'u' }
848         },
849         _6 : {
850             COM : {start: 9, len : 1, def : 'u' }
851         }
852     },
853     FMus : {
854         _8 : {
855             SCO : {start : 20, len : 1, def : 'u'},
856             REC : {start : 20, len : 1, def : 'n'}
857         },
858         _6 : {
859             SCO : {start : 3, len : 1, def : 'u'},
860             REC : {start : 3, len : 1, def : 'n'}
861         },
862     },
863     Form : {
864         _8 : {
865             BKS : {start : 23, len : 1, def : ' ' },
866             SER : {start : 23, len : 1, def : ' ' },
867             VIS : {start : 29, len : 1, def : ' ' },
868             MIX : {start : 23, len : 1, def : ' ' },
869             MAP : {start : 29, len : 1, def : ' ' },
870             SCO : {start : 23, len : 1, def : ' ' },
871             REC : {start : 23, len : 1, def : ' ' }
872         },
873         _6 : {
874             BKS : {start : 6, len : 1, def : ' ' },
875             SER : {start : 6, len : 1, def : ' ' },
876             VIS : {start : 12, len : 1, def : ' ' },
877             MIX : {start : 6, len : 1, def : ' ' },
878             MAP : {start : 12, len : 1, def : ' ' },
879             SCO : {start : 6, len : 1, def : ' ' },
880             REC : {start : 6, len : 1, def : ' ' }
881         }
882     },
883     Freq : {
884         _8 : {
885             SER : {start : 18, len : 1, def : ' '}
886         },
887         _6 : {
888             SER : {start : 1, len : 1, def : ' '}
889         }
890     },
891     GPub : {
892         _8 : {
893             BKS : {start : 28, len : 1, def : ' ' },
894             SER : {start : 28, len : 1, def : ' ' },
895             VIS : {start : 28, len : 1, def : ' ' },
896             MAP : {start : 28, len : 1, def : ' ' },
897             COM : {start : 28, len : 1, def : ' ' }
898         },
899         _6 : {
900             BKS : {start : 11, len : 1, def : ' ' },
901             SER : {start : 11, len : 1, def : ' ' },
902             VIS : {start : 11, len : 1, def : ' ' },
903             MAP : {start : 11, len : 1, def : ' ' },
904             COM : {start : 11, len : 1, def : ' ' }
905         }
906     },
907     Ills : {
908         _8 : {
909             BKS : {start : 18, len : 4, def : ' ' }
910         },
911         _6 : {
912             BKS : {start : 1, len : 4, def : ' ' }
913         }
914     },
915     Indx : {
916         _8 : {
917             BKS : {start : 31, len : 1, def : '0' },
918             MAP : {start : 31, len : 1, def : '0' }
919         },
920         _6 : {
921             BKS : {start : 14, len : 1, def : '0' },
922             MAP : {start : 14, len : 1, def : '0' }
923         }
924     },
925     Item : {
926         ldr : {
927             MFHD : {start : 18, len : 1, def : 'i' }
928         }
929     },
930     Lang : {
931         _8 : {
932             BKS : {start : 35, len : 3, def : ' ' },
933             SER : {start : 35, len : 3, def : ' ' },
934             VIS : {start : 35, len : 3, def : ' ' },
935             MIX : {start : 35, len : 3, def : ' ' },
936             MAP : {start : 35, len : 3, def : ' ' },
937             SCO : {start : 35, len : 3, def : ' ' },
938             REC : {start : 35, len : 3, def : ' ' },
939             COM : {start : 35, len : 3, def : ' ' }
940         }
941     },
942     LitF : {
943         _8 : {
944             BKS : {start : 33, len : 1, def : '0' }
945         },
946         _6 : {
947             BKS : {start : 16, len : 1, def : '0' }
948         }
949     },
950     LTxt : {
951         _8 : {
952             SCO : {start : 30, len : 2, def : 'n'},
953             REC : {start : 30, len : 2, def : ' '}
954         },
955         _6 : {
956             SCO : {start : 13, len : 2, def : 'n'},
957             REC : {start : 13, len : 2, def : ' '}
958         },
959     },
960     MRec : {
961         _8 : {
962             BKS : {start : 38, len : 1, def : ' ' },
963             SER : {start : 38, len : 1, def : ' ' },
964             VIS : {start : 38, len : 1, def : ' ' },
965             MIX : {start : 38, len : 1, def : ' ' },
966             MAP : {start : 38, len : 1, def : ' ' },
967             SCO : {start : 38, len : 1, def : ' ' },
968             REC : {start : 38, len : 1, def : ' ' },
969             COM : {start : 38, len : 1, def : ' ' }
970         }
971     },
972     Orig : {
973         _8 : {
974             SER : {start : 22, len : 1, def : ' '}
975         },
976         _6 : {
977             SER : {start: 5, len : 1, def: ' '}
978         }
979     },
980     Part : {
981         _8 : {
982             SCO : {start : 21, len : 1, def : ' '},
983             REC : {start : 21, len : 1, def : 'n'}
984         },
985         _6 : {
986             SCO : {start : 4, len : 1, def : ' '},
987             REC : {start : 4, len : 1, def : 'n'}
988         },
989     },
990     Proj : {
991         _8 : {
992             MAP : {start : 22, len : 2, def : ' ' }
993         },
994         _6 : {
995             MAP: {start : 5, len : 2, def : ' ' }
996         }
997     },
998     RecStat : {
999         ldr : {
1000             BKS : {start : 5, len : 1, def : 'n' },
1001             SER : {start : 5, len : 1, def : 'n' },
1002             VIS : {start : 5, len : 1, def : 'n' },
1003             MIX : {start : 5, len : 1, def : 'n' },
1004             MAP : {start : 5, len : 1, def : 'n' },
1005             SCO : {start : 5, len : 1, def : 'n' },
1006             REC : {start : 5, len : 1, def : 'n' },
1007             COM : {start : 5, len : 1, def : 'n' },
1008             MFHD: {start : 5, len : 1, def : 'n' },
1009             AUT : {start : 5, len : 1, def : 'n' }
1010         }
1011     },
1012     Regl : {
1013         _8 : {
1014             SER : {start : 19, len : 1, def : ' '}
1015         },
1016         _6 : {
1017             SER : {start : 2, len : 1, def : ' '}
1018         }
1019     },
1020     Relf : {
1021         _8 : {
1022             MAP : {start: 18, len : 4, def : ' '}
1023         },
1024         _6 : {
1025             MAP : {start: 1, len : 4, def : ' '}
1026         }
1027     },
1028     'S/L' : {
1029         _8 : {
1030             SER : {start : 34, len : 1, def : '0' }
1031         },
1032         _6 : {
1033             SER : {start : 17, len : 1, def : '0' }
1034         }
1035     },
1036     SpFM : {
1037         _8 : {
1038             MAP : {start: 33, len : 2, def : ' ' }
1039         },
1040         _6 : {
1041             MAP : {start: 16, len : 2, def : ' '}
1042         }
1043     },
1044     Srce : {
1045         _8 : {
1046             BKS : {start : 39, len : 1, def : 'd' },
1047             SER : {start : 39, len : 1, def : 'd' },
1048             VIS : {start : 39, len : 1, def : 'd' },
1049             SCO : {start : 39, len : 1, def : 'd' },
1050             REC : {start : 39, len : 1, def : 'd' },
1051             COM : {start : 39, len : 1, def : 'd' },
1052             MFHD : {start : 39, len : 1, def : 'd' },
1053             "AUT" : {"start" : 39, "len" : 1, "def" : 'd' }
1054         }
1055     },
1056     SrTp : {
1057         _8 : {
1058             SER : {start : 21, len : 1, def : ' '}
1059         },
1060         _6 : {
1061             SER : {start : 4, len : 1, def : ' '}
1062         }
1063     },
1064     Tech : {
1065         _8 : {
1066             VIS : {start : 34, len : 1, def : ' '}
1067         },
1068         _6 : {
1069             VIS : {start : 17, len : 1, def : ' '}
1070         }
1071     },
1072     Time : {
1073         _8 : {
1074             VIS : {start : 18, len : 3, def : ' '}
1075         },
1076         _6 : {
1077             VIS : {start : 1, len : 3, def : ' '}
1078         }
1079     },
1080     TMat : {
1081         _8 : {
1082             VIS : {start : 33, len : 1, def : ' ' }
1083         },
1084         _6 : {
1085             VIS : {start : 16, len : 1, def : ' ' }
1086         }
1087     },
1088     TrAr : {
1089         _8 : {
1090             SCO : {start : 33, len : 1, def : ' ' },
1091             REC : {start : 33, len : 1, def : 'n' }
1092         },
1093         _6 : {
1094             SCO : {start : 16, len : 1, def : ' ' },
1095             REC : {start : 16, len : 1, def : 'n' }
1096         }
1097     },
1098     Type : {
1099         ldr : {
1100             BKS : {start : 6, len : 1, def : 'a' },
1101             SER : {start : 6, len : 1, def : 'a' },
1102             VIS : {start : 6, len : 1, def : 'g' },
1103             MIX : {start : 6, len : 1, def : 'p' },
1104             MAP : {start : 6, len : 1, def : 'e' },
1105             SCO : {start : 6, len : 1, def : 'c' },
1106             REC : {start : 6, len : 1, def : 'i' },
1107             COM : {start : 6, len : 1, def : 'm' },
1108             AUT : {start : 6, len : 1, def : 'z' },
1109             MFHD : {start : 6, len : 1, def : 'y' }
1110         }
1111     },
1112     "GeoDiv" : {
1113          "_8" : {
1114              "AUT" : {"start" : 6, "len" : 1, "def" : ' ' }
1115          }
1116      },
1117      "Roman" : {
1118          "_8" : {
1119              "AUT" : {"start" : 7, "len" : 1, "def" : ' ' }
1120          }
1121      },
1122      "CatLang" : {
1123          "_8" : {
1124              "AUT" : {"start" : 8, "len" : 1, "def" : ' ' }
1125          }
1126      },
1127      "Kind" : {
1128          "_8" : {
1129              "AUT" : {"start" : 9, "len" : 1, "def" : ' ' }
1130          }
1131      },
1132      "Rules" : {
1133          "_8" : {
1134              "AUT" : {"start" : 10, "len" : 1, "def" : ' ' }
1135          }
1136      },
1137      "Subj" : {
1138          "_8" : {
1139              "AUT" : {"start" : 11, "len" : 1, "def" : ' ' }
1140          }
1141      },
1142      "Series" : {
1143          "_8" : {
1144              "AUT" : {"start" : 12, "len" : 1, "def" : ' ' }
1145          }
1146      },
1147      "SerNum" : {
1148          "_8" : {
1149              "AUT" : {"start" : 13, "len" : 1, "def" : ' ' }
1150          }
1151      },
1152      "NameUse" : {
1153          "_8" : {
1154              "AUT" : {"start" : 14, "len" : 1, "def" : ' ' }
1155          }
1156      },
1157      "SubjUse" : {
1158          "_8" : {
1159              "AUT" : {"start" : 15, "len" : 1, "def" : ' ' }
1160          }
1161      },
1162      "SerUse" : {
1163          "_8" : {
1164              "AUT" : {"start" : 16, "len" : 1, "def" : ' ' }
1165          }
1166      },
1167      "TypeSubd" : {
1168          "_8" : {
1169              "AUT" : {"start" : 17, "len" : 1, "def" : ' ' }
1170          }
1171      },
1172      "GovtAgn" : {
1173          "_8" : {
1174              "AUT" : {"start" : 28, "len" : 1, "def" : ' ' }
1175          }
1176      },
1177      "RefStatus" : {
1178          "_8" : {
1179              "AUT" : {"start" : 29, "len" : 1, "def" : ' ' }
1180          }
1181      },
1182      "UpdStatus" : {
1183          "_8" : {
1184              "AUT" : {"start" : 31, "len" : 1, "def" : ' ' }
1185          }
1186      },
1187      "Name" : {
1188          "_8" : {
1189              "AUT" : {"start" : 32, "len" : 1, "def" : ' ' }
1190          }
1191      },
1192      "Status" : {
1193          "_8" : {
1194              "AUT" : {"start" : 33, "len" : 1, "def" : ' ' }
1195          }
1196      },
1197      "ModRec" : {
1198          "_8" : {
1199              "AUT" : {"start" : 38, "len" : 1, "def" : ' ' }
1200          }
1201      },
1202      "Source" : {
1203          "_8" : {
1204              "AUT" : {"start" : 39, "len" : 1, "def" : ' ' }
1205          }
1206      }
1207 };
1208
1209 MARC.Record._physical_characteristics = {
1210     c : {
1211         label     : "Electronic Resource",
1212         subfields : {
1213             b : {    start : 1,
1214                 len   : 1,
1215                 label : "SMD",
1216                 values: {    a : "Tape Cartridge",
1217                         b : "Chip cartridge",
1218                         c : "Computer optical disk cartridge",
1219                         f : "Tape cassette",
1220                         h : "Tape reel",
1221                         j : "Magnetic disk",
1222                         m : "Magneto-optical disk",
1223                         o : "Optical disk",
1224                         r : "Remote",
1225                         u : "Unspecified",
1226                         z : "Other"
1227                 }
1228             },
1229             d : {    start : 3,
1230                 len   : 1,
1231                 label : "Color",
1232                 values: {    a : "One color",
1233                         b : "Black-and-white",
1234                         c : "Multicolored",
1235                         g : "Gray scale",
1236                         m : "Mixed",
1237                         n : "Not applicable",
1238                         u : "Unknown",
1239                         z : "Other"
1240                 }
1241             },
1242             e : {    start : 4,
1243                 len   : 1,
1244                 label : "Dimensions",
1245                 values: {    a : "3 1/2 in.",
1246                         e : "12 in.",
1247                         g : "4 3/4 in. or 12 cm.",
1248                         i : "1 1/8 x 2 3/8 in.",
1249                         j : "3 7/8 x 2 1/2 in.",
1250                         n : "Not applicable",
1251                         o : "5 1/4 in.",
1252                         u : "Unknown",
1253                         v : "8 in.",
1254                         z : "Other"
1255                 }
1256             },
1257             f : {    start : 5,
1258                 len   : 1,
1259                 label : "Sound",
1260                 values: {    ' ' : "No sound (Silent)",
1261                         a   : "Sound",
1262                         u   : "Unknown"
1263                 }
1264             },
1265             g : {    start : 6,
1266                 len   : 3,
1267                 label : "Image bit depth",
1268                 values: {    mmm   : "Multiple",
1269                         nnn   : "Not applicable",
1270                         '---' : "Unknown"
1271                 }
1272             },
1273             h : {    start : 9,
1274                 len   : 1,
1275                 label : "File formats",
1276                 values: {    a : "One file format",
1277                         m : "Multiple file formats",
1278                         u : "Unknown"
1279                 }
1280             },
1281             i : {    start : 10,
1282                 len   : 1,
1283                 label : "Quality assurance target(s)",
1284                 values: {    a : "Absent",
1285                         n : "Not applicable",
1286                         p : "Present",
1287                         u : "Unknown"
1288                 }
1289             },
1290             j : {    start : 11,
1291                 len   : 1,
1292                 label : "Antecedent/Source",
1293                 values: {    a : "File reproduced from original",
1294                         b : "File reproduced from microform",
1295                         c : "File reproduced from electronic resource",
1296                         d : "File reproduced from an intermediate (not microform)",
1297                         m : "Mixed",
1298                         n : "Not applicable",
1299                         u : "Unknown"
1300                 }
1301             },
1302             k : {    start : 12,
1303                 len   : 1,
1304                 label : "Level of compression",
1305                 values: {    a : "Uncompressed",
1306                         b : "Lossless",
1307                         d : "Lossy",
1308                         m : "Mixed",
1309                         u : "Unknown"
1310                 }
1311             },
1312             l : {    start : 13,
1313                 len   : 1,
1314                 label : "Reformatting quality",
1315                 values: {    a : "Access",
1316                         n : "Not applicable",
1317                         p : "Preservation",
1318                         r : "Replacement",
1319                         u : "Unknown"
1320                 }
1321             }
1322         }
1323     },
1324     d : {
1325         label     : "Globe",
1326         subfields : {
1327             b : {    start : 1,
1328                 len   : 1,
1329                 label : "SMD",
1330                 values: {    a : "Celestial globe",
1331                         b : "Planetary or lunar globe",
1332                         c : "Terrestrial globe",
1333                         e : "Earth moon globe",
1334                         u : "Unspecified",
1335                         z : "Other"
1336                 }
1337             },
1338             d : {    start : 3,
1339                 len   : 1,
1340                 label : "Color",
1341                 values: {    a : "One color",
1342                         c : "Multicolored"
1343                 }
1344             },
1345             e : {    start : 4,
1346                 len   : 1,
1347                 label : "Physical medium",
1348                 values: {    a : "Paper",
1349                         b : "Wood",
1350                         c : "Stone",
1351                         d : "Metal",
1352                         e : "Synthetics",
1353                         f : "Skins",
1354                         g : "Textile",
1355                         p : "Plaster",
1356                         u : "Unknown",
1357                         z : "Other"
1358                 }
1359             },
1360             f : {    start : 5,
1361                 len   : 1,
1362                 label : "Type of reproduction",
1363                 values: {    f : "Facsimile",
1364                         n : "Not applicable",
1365                         u : "Unknown",
1366                         z : "Other"
1367                 }
1368             }
1369         }
1370     },
1371     a : {
1372         label     : "Map",
1373         subfields : {
1374             b : {    start : 1,
1375                 len   : 1,
1376                 label : "SMD",
1377                 values: {    d : "Atlas",
1378                         g : "Diagram",
1379                         j : "Map",
1380                         k : "Profile",
1381                         q : "Model",
1382                         r : "Remote-sensing image",
1383                         s : "Section",
1384                         u : "Unspecified",
1385                         y : "View",
1386                         z : "Other"
1387                 }
1388             },
1389             d : {    start : 3,
1390                 len   : 1,
1391                 label : "Color",
1392                 values: {    a : "One color",
1393                         c : "Multicolored"
1394                 }
1395             },
1396             e : {    start : 4,
1397                 len   : 1,
1398                 label : "Physical medium",
1399                 values: {    a : "Paper",
1400                         b : "Wood",
1401                         c : "Stone",
1402                         d : "Metal",
1403                         e : "Synthetics",
1404                         f : "Skins",
1405                         g : "Textile",
1406                         p : "Plaster",
1407                         q : "Flexible base photographic medium, positive",
1408                         r : "Flexible base photographic medium, negative",
1409                         s : "Non-flexible base photographic medium, positive",
1410                         t : "Non-flexible base photographic medium, negative",
1411                         u : "Unknown",
1412                         y : "Other photographic medium",
1413                         z : "Other"
1414                 }
1415             },
1416             f : {    start : 5,
1417                 len   : 1,
1418                 label : "Type of reproduction",
1419                 values: {    f : "Facsimile",
1420                         n : "Not applicable",
1421                         u : "Unknown",
1422                         z : "Other"
1423                 }
1424             },
1425             g : {    start : 6,
1426                 len   : 1,
1427                 label : "Production/reproduction details",
1428                 values: {    a : "Photocopy, blueline print",
1429                         b : "Photocopy",
1430                         c : "Pre-production",
1431                         d : "Film",
1432                         u : "Unknown",
1433                         z : "Other"
1434                 }
1435             },
1436             h : {    start : 7,
1437                 len   : 1,
1438                 label : "Positive/negative",
1439                 values: {    a : "Positive",
1440                         b : "Negative",
1441                         m : "Mixed",
1442                         n : "Not applicable"
1443                 }
1444             }
1445         }
1446     },
1447     h : {
1448         label     : "Microform",
1449         subfields : {
1450             b : {    start : 1,
1451                 len   : 1,
1452                 label : "SMD",
1453                 values: {    a : "Aperture card",
1454                         b : "Microfilm cartridge",
1455                         c : "Microfilm cassette",
1456                         d : "Microfilm reel",
1457                         e : "Microfiche",
1458                         f : "Microfiche cassette",
1459                         g : "Microopaque",
1460                         u : "Unspecified",
1461                         z : "Other"
1462                 }
1463             },
1464             d : {    start : 3,
1465                 len   : 1,
1466                 label : "Positive/negative",
1467                 values: {    a : "Positive",
1468                         b : "Negative",
1469                         m : "Mixed",
1470                         u : "Unknown"
1471                 }
1472             },
1473             e : {    start : 4,
1474                 len   : 1,
1475                 label : "Dimensions",
1476                 values: {    a : "8 mm.",
1477                         e : "16 mm.",
1478                         f : "35 mm.",
1479                         g : "70mm.",
1480                         h : "105 mm.",
1481                         l : "3 x 5 in. (8 x 13 cm.)",
1482                         m : "4 x 6 in. (11 x 15 cm.)",
1483                         o : "6 x 9 in. (16 x 23 cm.)",
1484                         p : "3 1/4 x 7 3/8 in. (9 x 19 cm.)",
1485                         u : "Unknown",
1486                         z : "Other"
1487                 }
1488             },
1489             f : {    start : 5,
1490                 len   : 4,
1491                 label : "Reduction ratio range/Reduction ratio",
1492                 values: {    a : "Low (1-16x)",
1493                         b : "Normal (16-30x)",
1494                         c : "High (31-60x)",
1495                         d : "Very high (61-90x)",
1496                         e : "Ultra (90x-)",
1497                         u : "Unknown",
1498                         v : "Reduction ratio varies"
1499                 }
1500             },
1501             g : {    start : 9,
1502                 len   : 1,
1503                 label : "Color",
1504                 values: {    b : "Black-and-white",
1505                         c : "Multicolored",
1506                         m : "Mixed",
1507                         u : "Unknown",
1508                         z : "Other"
1509                 }
1510             },
1511             h : {    start : 10,
1512                 len   : 1,
1513                 label : "Emulsion on film",
1514                 values: {    a : "Silver halide",
1515                         b : "Diazo",
1516                         c : "Vesicular",
1517                         m : "Mixed",
1518                         n : "Not applicable",
1519                         u : "Unknown",
1520                         z : "Other"
1521                 }
1522             },
1523             i : {    start : 11,
1524                 len   : 1,
1525                 label : "Quality assurance target(s)",
1526                 values: {    a : "1st gen. master",
1527                         b : "Printing master",
1528                         c : "Service copy",
1529                         m : "Mixed generation",
1530                         u : "Unknown"
1531                 }
1532             },
1533             j : {    start : 12,
1534                 len   : 1,
1535                 label : "Base of film",
1536                 values: {    a : "Safety base, undetermined",
1537                         c : "Safety base, acetate undetermined",
1538                         d : "Safety base, diacetate",
1539                         l : "Nitrate base",
1540                         m : "Mixed base",
1541                         n : "Not applicable",
1542                         p : "Safety base, polyester",
1543                         r : "Safety base, mixed",
1544                         t : "Safety base, triacetate",
1545                         u : "Unknown",
1546                         z : "Other"
1547                 }
1548             }
1549         }
1550     },
1551     m : {
1552         label     : "Motion Picture",
1553         subfields : {
1554             b : {    start : 1,
1555                 len   : 1,
1556                 label : "SMD",
1557                 values: {    a : "Film cartridge",
1558                         f : "Film cassette",
1559                         r : "Film reel",
1560                         u : "Unspecified",
1561                         z : "Other"
1562                 }
1563             },
1564             d : {    start : 3,
1565                 len   : 1,
1566                 label : "Color",
1567                 values: {    b : "Black-and-white",
1568                         c : "Multicolored",
1569                         h : "Hand-colored",
1570                         m : "Mixed",
1571                         u : "Unknown",
1572                         z : "Other"
1573                 }
1574             },
1575             e : {    start : 4,
1576                 len   : 1,
1577                 label : "Motion picture presentation format",
1578                 values: {    a : "Standard sound aperture, reduced frame",
1579                         b : "Nonanamorphic (wide-screen)",
1580                         c : "3D",
1581                         d : "Anamorphic (wide-screen)",
1582                         e : "Other-wide screen format",
1583                         f : "Standard. silent aperture, full frame",
1584                         u : "Unknown",
1585                         z : "Other"
1586                 }
1587             },
1588             f : {    start : 5,
1589                 len   : 1,
1590                 label : "Sound on medium or separate",
1591                 values: {    a : "Sound on medium",
1592                         b : "Sound separate from medium",
1593                         u : "Unknown"
1594                 }
1595             },
1596             g : {    start : 6,
1597                 len   : 1,
1598                 label : "Medium for sound",
1599                 values: {    a : "Optical sound track on motion picture film",
1600                         b : "Magnetic sound track on motion picture film",
1601                         c : "Magnetic audio tape in cartridge",
1602                         d : "Sound disc",
1603                         e : "Magnetic audio tape on reel",
1604                         f : "Magnetic audio tape in cassette",
1605                         g : "Optical and magnetic sound track on film",
1606                         h : "Videotape",
1607                         i : "Videodisc",
1608                         u : "Unknown",
1609                         z : "Other"
1610                 }
1611             },
1612             h : {    start : 7,
1613                 len   : 1,
1614                 label : "Dimensions",
1615                 values: {    a : "Standard 8 mm.",
1616                         b : "Super 8 mm./single 8 mm.",
1617                         c : "9.5 mm.",
1618                         d : "16 mm.",
1619                         e : "28 mm.",
1620                         f : "35 mm.",
1621                         g : "70 mm.",
1622                         u : "Unknown",
1623                         z : "Other"
1624                 }
1625             },
1626             i : {    start : 8,
1627                 len   : 1,
1628                 label : "Configuration of playback channels",
1629                 values: {    k : "Mixed",
1630                         m : "Monaural",
1631                         n : "Not applicable",
1632                         q : "Multichannel, surround or quadraphonic",
1633                         s : "Stereophonic",
1634                         u : "Unknown",
1635                         z : "Other"
1636                 }
1637             },
1638             j : {    start : 9,
1639                 len   : 1,
1640                 label : "Production elements",
1641                 values: {    a : "Work print",
1642                         b : "Trims",
1643                         c : "Outtakes",
1644                         d : "Rushes",
1645                         e : "Mixing tracks",
1646                         f : "Title bands/inter-title rolls",
1647                         g : "Production rolls",
1648                         n : "Not applicable",
1649                         z : "Other"
1650                 }
1651             }
1652         }
1653     },
1654     k : {
1655         label     : "Non-projected Graphic",
1656         subfields : {
1657             b : {    start : 1,
1658                 len   : 1,
1659                 label : "SMD",
1660                 values: {    c : "Collage",
1661                         d : "Drawing",
1662                         e : "Painting",
1663                         f : "Photo-mechanical print",
1664                         g : "Photonegative",
1665                         h : "Photoprint",
1666                         i : "Picture",
1667                         j : "Print",
1668                         l : "Technical drawing",
1669                         n : "Chart",
1670                         o : "Flash/activity card",
1671                         u : "Unspecified",
1672                         z : "Other"
1673                 }
1674             },
1675             d : {    start : 3,
1676                 len   : 1,
1677                 label : "Color",
1678                 values: {    a : "One color",
1679                         b : "Black-and-white",
1680                         c : "Multicolored",
1681                         h : "Hand-colored",
1682                         m : "Mixed",
1683                         u : "Unknown",
1684                         z : "Other"
1685                 }
1686             },
1687             e : {    start : 4,
1688                 len   : 1,
1689                 label : "Primary support material",
1690                 values: {    a : "Canvas",
1691                         b : "Bristol board",
1692                         c : "Cardboard/illustration board",
1693                         d : "Glass",
1694                         e : "Synthetics",
1695                         f : "Skins",
1696                         g : "Textile",
1697                         h : "Metal",
1698                         m : "Mixed collection",
1699                         o : "Paper",
1700                         p : "Plaster",
1701                         q : "Hardboard",
1702                         r : "Porcelain",
1703                         s : "Stone",
1704                         t : "Wood",
1705                         u : "Unknown",
1706                         z : "Other"
1707                 }
1708             },
1709             f : {    start : 5,
1710                 len   : 1,
1711                 label : "Secondary support material",
1712                 values: {    a : "Canvas",
1713                         b : "Bristol board",
1714                         c : "Cardboard/illustration board",
1715                         d : "Glass",
1716                         e : "Synthetics",
1717                         f : "Skins",
1718                         g : "Textile",
1719                         h : "Metal",
1720                         m : "Mixed collection",
1721                         o : "Paper",
1722                         p : "Plaster",
1723                         q : "Hardboard",
1724                         r : "Porcelain",
1725                         s : "Stone",
1726                         t : "Wood",
1727                         u : "Unknown",
1728                         z : "Other"
1729                 }
1730             }
1731         }
1732     },
1733     g : {
1734         label     : "Projected Graphic",
1735         subfields : {
1736             b : {    start : 1,
1737                 len   : 1,
1738                 label : "SMD",
1739                 values: {    c : "Film cartridge",
1740                         d : "Filmstrip",
1741                         f : "Film filmstrip type",
1742                         o : "Filmstrip roll",
1743                         s : "Slide",
1744                         t : "Transparency",
1745                         z : "Other"
1746                 }
1747             },
1748             d : {    start : 3,
1749                 len   : 1,
1750                 label : "Color",
1751                 values: {    b : "Black-and-white",
1752                         c : "Multicolored",
1753                         h : "Hand-colored",
1754                         m : "Mixed",
1755                         n : "Not applicable",
1756                         u : "Unknown",
1757                         z : "Other"
1758                 }
1759             },
1760             e : {    start : 4,
1761                 len   : 1,
1762                 label : "Base of emulsion",
1763                 values: {    d : "Glass",
1764                         e : "Synthetics",
1765                         j : "Safety film",
1766                         k : "Film base, other than safety film",
1767                         m : "Mixed collection",
1768                         o : "Paper",
1769                         u : "Unknown",
1770                         z : "Other"
1771                 }
1772             },
1773             f : {    start : 5,
1774                 len   : 1,
1775                 label : "Sound on medium or separate",
1776                 values: {    a : "Sound on medium",
1777                         b : "Sound separate from medium",
1778                         u : "Unknown"
1779                 }
1780             },
1781             g : {    start : 6,
1782                 len   : 1,
1783                 label : "Medium for sound",
1784                 values: {    a : "Optical sound track on motion picture film",
1785                         b : "Magnetic sound track on motion picture film",
1786                         c : "Magnetic audio tape in cartridge",
1787                         d : "Sound disc",
1788                         e : "Magnetic audio tape on reel",
1789                         f : "Magnetic audio tape in cassette",
1790                         g : "Optical and magnetic sound track on film",
1791                         h : "Videotape",
1792                         i : "Videodisc",
1793                         u : "Unknown",
1794                         z : "Other"
1795                 }
1796             },
1797             h : {    start : 7,
1798                 len   : 1,
1799                 label : "Dimensions",
1800                 values: {    a : "Standard 8 mm.",
1801                         b : "Super 8 mm./single 8 mm.",
1802                         c : "9.5 mm.",
1803                         d : "16 mm.",
1804                         e : "28 mm.",
1805                         f : "35 mm.",
1806                         g : "70 mm.",
1807                         j : "2 x 2 in. (5 x 5 cm.)",
1808                         k : "2 1/4 x 2 1/4 in. (6 x 6 cm.)",
1809                         s : "4 x 5 in. (10 x 13 cm.)",
1810                         t : "5 x 7 in. (13 x 18 cm.)",
1811                         v : "8 x 10 in. (21 x 26 cm.)",
1812                         w : "9 x 9 in. (23 x 23 cm.)",
1813                         x : "10 x 10 in. (26 x 26 cm.)",
1814                         y : "7 x 7 in. (18 x 18 cm.)",
1815                         u : "Unknown",
1816                         z : "Other"
1817                 }
1818             },
1819             i : {    start : 8,
1820                 len   : 1,
1821                 label : "Secondary support material",
1822                 values: {    c : "Cardboard",
1823                         d : "Glass",
1824                         e : "Synthetics",
1825                         h : "metal",
1826                         j : "Metal and glass",
1827                         k : "Synthetics and glass",
1828                         m : "Mixed collection",
1829                         u : "Unknown",
1830                         z : "Other"
1831                 }
1832             }
1833         }
1834     },
1835     r : {
1836         label     : "Remote-sensing Image",
1837         subfields : {
1838             b : {    start : 1,
1839                 len   : 1,
1840                 label : "SMD",
1841                 values: { u : "Unspecified" }
1842             },
1843             d : {    start : 3,
1844                 len   : 1,
1845                 label : "Altitude of sensor",
1846                 values: {    a : "Surface",
1847                         b : "Airborne",
1848                         c : "Spaceborne",
1849                         n : "Not applicable",
1850                         u : "Unknown",
1851                         z : "Other"
1852                 }
1853             },
1854             e : {    start : 4,
1855                 len   : 1,
1856                 label : "Attitude of sensor",
1857                 values: {    a : "Low oblique",
1858                         b : "High oblique",
1859                         c : "Vertical",
1860                         n : "Not applicable",
1861                         u : "Unknown"
1862                 }
1863             },
1864             f : {    start : 5,
1865                 len   : 1,
1866                 label : "Cloud cover",
1867                 values: {    0 : "0-09%",
1868                         1 : "10-19%",
1869                         2 : "20-29%",
1870                         3 : "30-39%",
1871                         4 : "40-49%",
1872                         5 : "50-59%",
1873                         6 : "60-69%",
1874                         7 : "70-79%",
1875                         8 : "80-89%",
1876                         9 : "90-100%",
1877                         n : "Not applicable",
1878                         u : "Unknown"
1879                 }
1880             },
1881             g : {    start : 6,
1882                 len   : 1,
1883                 label : "Platform construction type",
1884                 values: {    a : "Balloon",
1885                         b : "Aircraft-low altitude",
1886                         c : "Aircraft-medium altitude",
1887                         d : "Aircraft-high altitude",
1888                         e : "Manned spacecraft",
1889                         f : "Unmanned spacecraft",
1890                         g : "Land-based remote-sensing device",
1891                         h : "Water surface-based remote-sensing device",
1892                         i : "Submersible remote-sensing device",
1893                         n : "Not applicable",
1894                         u : "Unknown",
1895                         z : "Other"
1896                 }
1897             },
1898             h : {    start : 7,
1899                 len   : 1,
1900                 label : "Platform use category",
1901                 values: {    a : "Meteorological",
1902                         b : "Surface observing",
1903                         c : "Space observing",
1904                         m : "Mixed uses",
1905                         n : "Not applicable",
1906                         u : "Unknown",
1907                         z : "Other"
1908                 }
1909             },
1910             i : {    start : 8,
1911                 len   : 1,
1912                 label : "Sensor type",
1913                 values: {    a : "Active",
1914                         b : "Passive",
1915                         u : "Unknown",
1916                         z : "Other"
1917                 }
1918             },
1919             j : {    start : 9,
1920                 len   : 2,
1921                 label : "Data type",
1922                 values: {    nn : "Not applicable",
1923                         uu : "Unknown",
1924                         zz : "Other",
1925                         aa : "Visible light",
1926                         da : "Near infrared",
1927                         db : "Middle infrared",
1928                         dc : "Far infrared",
1929                         dd : "Thermal infrared",
1930                         de : "Shortwave infrared (SWIR)",
1931                         df : "Reflective infrared",
1932                         dv : "Combinations",
1933                         dz : "Other infrared data",
1934                         ga : "Sidelooking airborne radar (SLAR)",
1935                         gb : "Synthetic aperture radar (SAR-single frequency)",
1936                         gc : "SAR-multi-frequency (multichannel)",
1937                         gd : "SAR-like polarization",
1938                         ge : "SAR-cross polarization",
1939                         gf : "Infometric SAR",
1940                         gg : "Polarmetric SAR",
1941                         gu : "Passive microwave mapping",
1942                         gz : "Other microwave data",
1943                         ja : "Far ultraviolet",
1944                         jb : "Middle ultraviolet",
1945                         jc : "Near ultraviolet",
1946                         jv : "Ultraviolet combinations",
1947                         jz : "Other ultraviolet data",
1948                         ma : "Multi-spectral, multidata",
1949                         mb : "Multi-temporal",
1950                         mm : "Combination of various data types",
1951                         pa : "Sonar-water depth",
1952                         pb : "Sonar-bottom topography images, sidescan",
1953                         pc : "Sonar-bottom topography, near-surface",
1954                         pd : "Sonar-bottom topography, near-bottom",
1955                         pe : "Seismic surveys",
1956                         pz : "Other acoustical data",
1957                         ra : "Gravity anomales (general)",
1958                         rb : "Free-air",
1959                         rc : "Bouger",
1960                         rd : "Isostatic",
1961                         sa : "Magnetic field",
1962                         ta : "Radiometric surveys"
1963                 }
1964             }
1965         }
1966     },
1967     s : {
1968         label     : "Sound Recording",
1969         subfields : {
1970             b : {    start : 1,
1971                 len   : 1,
1972                 label : "SMD",
1973                 values: {    d : "Sound disc",
1974                         e : "Cylinder",
1975                         g : "Sound cartridge",
1976                         i : "Sound-track film",
1977                         q : "Roll",
1978                         s : "Sound cassette",
1979                         t : "Sound-tape reel",
1980                         u : "Unspecified",
1981                         w : "Wire recording",
1982                         z : "Other"
1983                 }
1984             },
1985             d : {    start : 3,
1986                 len   : 1,
1987                 label : "Speed",
1988                 values: {    a : "16 rpm",
1989                         b : "33 1/3 rpm",
1990                         c : "45 rpm",
1991                         d : "78 rpm",
1992                         e : "8 rpm",
1993                         f : "1.4 mps",
1994                         h : "120 rpm",
1995                         i : "160 rpm",
1996                         k : "15/16 ips",
1997                         l : "1 7/8 ips",
1998                         m : "3 3/4 ips",
1999                         o : "7 1/2 ips",
2000                         p : "15 ips",
2001                         r : "30 ips",
2002                         u : "Unknown",
2003                         z : "Other"
2004                 }
2005             },
2006             e : {    start : 4,
2007                 len   : 1,
2008                 label : "Configuration of playback channels",
2009                 values: {    m : "Monaural",
2010                         q : "Quadraphonic",
2011                         s : "Stereophonic",
2012                         u : "Unknown",
2013                         z : "Other"
2014                 }
2015             },
2016             f : {    start : 5,
2017                 len   : 1,
2018                 label : "Groove width or pitch",
2019                 values: {    m : "Microgroove/fine",
2020                         n : "Not applicable",
2021                         s : "Coarse/standard",
2022                         u : "Unknown",
2023                         z : "Other"
2024                 }
2025             },
2026             g : {    start : 6,
2027                 len   : 1,
2028                 label : "Dimensions",
2029                 values: {    a : "3 in.",
2030                         b : "5 in.",
2031                         c : "7 in.",
2032                         d : "10 in.",
2033                         e : "12 in.",
2034                         f : "16 in.",
2035                         g : "4 3/4 in. (12 cm.)",
2036                         j : "3 7/8 x 2 1/2 in.",
2037                         o : "5 1/4 x 3 7/8 in.",
2038                         s : "2 3/4 x 4 in.",
2039                         n : "Not applicable",
2040                         u : "Unknown",
2041                         z : "Other"
2042                 }
2043             },
2044             h : {    start : 7,
2045                 len   : 1,
2046                 label : "Tape width",
2047                 values: {    l : "1/8 in.",
2048                         m : "1/4in.",
2049                         n : "Not applicable",
2050                         o : "1/2 in.",
2051                         p : "1 in.",
2052                         u : "Unknown",
2053                         z : "Other"
2054                 }
2055             },
2056             i : {    start : 8,
2057                 len   : 1,
2058                 label : "Tape configuration ",
2059                 values: {    a : "Full (1) track",
2060                         b : "Half (2) track",
2061                         c : "Quarter (4) track",
2062                         d : "8 track",
2063                         e : "12 track",
2064                         f : "16 track",
2065                         n : "Not applicable",
2066                         u : "Unknown",
2067                         z : "Other"
2068                 }
2069             },
2070             m : {    start : 12,
2071                 len   : 1,
2072                 label : "Special playback",
2073                 values: {    a : "NAB standard",
2074                         b : "CCIR standard",
2075                         c : "Dolby-B encoded, standard Dolby",
2076                         d : "dbx encoded",
2077                         e : "Digital recording",
2078                         f : "Dolby-A encoded",
2079                         g : "Dolby-C encoded",
2080                         h : "CX encoded",
2081                         n : "Not applicable",
2082                         u : "Unknown",
2083                         z : "Other"
2084                 }
2085             },
2086             n : {    start : 13,
2087                 len   : 1,
2088                 label : "Capture and storage",
2089                 values: {    a : "Acoustical capture, direct storage",
2090                         b : "Direct storage, not acoustical",
2091                         d : "Digital storage",
2092                         e : "Analog electrical storage",
2093                         u : "Unknown",
2094                         z : "Other"
2095                 }
2096             }
2097         }
2098     },
2099     f : {
2100         label     : "Tactile Material",
2101         subfields : {
2102             b : {    start : 1,
2103                 len   : 1,
2104                 label : "SMD",
2105                 values: {    a : "Moon",
2106                         b : "Braille",
2107                         c : "Combination",
2108                         d : "Tactile, with no writing system",
2109                         u : "Unspecified",
2110                         z : "Other"
2111                 }
2112             },
2113             d : {    start : 3,
2114                 len   : 2,
2115                 label : "Class of braille writing",
2116                 values: {    a : "Literary braille",
2117                         b : "Format code braille",
2118                         c : "Mathematics and scientific braille",
2119                         d : "Computer braille",
2120                         e : "Music braille",
2121                         m : "Multiple braille types",
2122                         n : "Not applicable",
2123                         u : "Unknown",
2124                         z : "Other"
2125                 }
2126             },
2127             e : {    start : 4,
2128                 len   : 1,
2129                 label : "Level of contraction",
2130                 values: {    a : "Uncontracted",
2131                         b : "Contracted",
2132                         m : "Combination",
2133                         n : "Not applicable",
2134                         u : "Unknown",
2135                         z : "Other"
2136                 }
2137             },
2138             f : {    start : 6,
2139                 len   : 3,
2140                 label : "Braille music format",
2141                 values: {    a : "Bar over bar",
2142                         b : "Bar by bar",
2143                         c : "Line over line",
2144                         d : "Paragraph",
2145                         e : "Single line",
2146                         f : "Section by section",
2147                         g : "Line by line",
2148                         h : "Open score",
2149                         i : "Spanner short form scoring",
2150                         j : "Short form scoring",
2151                         k : "Outline",
2152                         l : "Vertical score",
2153                         n : "Not applicable",
2154                         u : "Unknown",
2155                         z : "Other"
2156                 }
2157             },
2158             g : {    start : 9,
2159                 len   : 1,
2160                 label : "Special physical characteristics",
2161                 values: {    a : "Print/braille",
2162                         b : "Jumbo or enlarged braille",
2163                         n : "Not applicable",
2164                         u : "Unknown",
2165                         z : "Other"
2166                 }
2167             }
2168         }
2169     },
2170     v : {
2171         label     : "Videorecording",
2172         subfields : {
2173             b : {    start : 1,
2174                 len   : 1,
2175                 label : "SMD",
2176                 values: {     c : "Videocartridge",
2177                         d : "Videodisc",
2178                         f : "Videocassette",
2179                         r : "Videoreel",
2180                         u : "Unspecified",
2181                         z : "Other"
2182                 }
2183             },
2184             d : {    start : 3,
2185                 len   : 1,
2186                 label : "Color",
2187                 values: {    b : "Black-and-white",
2188                         c : "Multicolored",
2189                         m : "Mixed",
2190                         n : "Not applicable",
2191                         u : "Unknown",
2192                         z : "Other"
2193                 }
2194             },
2195             e : {    start : 4,
2196                 len   : 1,
2197                 label : "Videorecording format",
2198                 values: {    a : "Beta",
2199                         b : "VHS",
2200                         c : "U-matic",
2201                         d : "EIAJ",
2202                         e : "Type C",
2203                         f : "Quadruplex",
2204                         g : "Laserdisc",
2205                         h : "CED",
2206                         i : "Betacam",
2207                         j : "Betacam SP",
2208                         k : "Super-VHS",
2209                         m : "M-II",
2210                         o : "D-2",
2211                         p : "8 mm.",
2212                         q : "Hi-8 mm.",
2213                         u : "Unknown",
2214                         v : "DVD",
2215                         z : "Other"
2216                 }
2217             },
2218             f : {    start : 5,
2219                 len   : 1,
2220                 label : "Sound on medium or separate",
2221                 values: {    a : "Sound on medium",
2222                         b : "Sound separate from medium",
2223                         u : "Unknown"
2224                 }
2225             },
2226             g : {    start : 6,
2227                 len   : 1,
2228                 label : "Medium for sound",
2229                 values: {    a : "Optical sound track on motion picture film",
2230                         b : "Magnetic sound track on motion picture film",
2231                         c : "Magnetic audio tape in cartridge",
2232                         d : "Sound disc",
2233                         e : "Magnetic audio tape on reel",
2234                         f : "Magnetic audio tape in cassette",
2235                         g : "Optical and magnetic sound track on motion picture film",
2236                         h : "Videotape",
2237                         i : "Videodisc",
2238                         u : "Unknown",
2239                         z : "Other"
2240                 }
2241             },
2242             h : {    start : 7,
2243                 len   : 1,
2244                 label : "Dimensions",
2245                 values: {    a : "8 mm.",
2246                         m : "1/4 in.",
2247                         o : "1/2 in.",
2248                         p : "1 in.",
2249                         q : "2 in.",
2250                         r : "3/4 in.",
2251                         u : "Unknown",
2252                         z : "Other"
2253                 }
2254             },
2255             i : {    start : 8,
2256                 len   : 1,
2257                 label : "Configuration of playback channel",
2258                 values: {    k : "Mixed",
2259                         m : "Monaural",
2260                         n : "Not applicable",
2261                         q : "Multichannel, surround or quadraphonic",
2262                         s : "Stereophonic",
2263                         u : "Unknown",
2264                         z : "Other"
2265                 }
2266             }
2267         }
2268     }
2269 };
2270