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