2 * Simple wrapper class for our external MARC21.Record JS library.
7 export class MarcRecord {
9 id: number; // Database ID when known.
11 record: any; // MARC21.Record object
14 constructor(xml: string) {
15 this.record = new MARC21.Record({marcxml: xml});
16 this.breakerText = this.record.toBreaker();
20 return this.record.toXmlString();
24 return this.record.toBreaker();
27 absorbBreakerChanges() {
28 this.record = new MARC21.Record({marcbreaker: this.breakerText});