2016-05-20 00:40:31 +01:00
|
|
|
import {BaseXmlComponent} from "./base";
|
|
|
|
|
|
|
|
export abstract class XmlUnitComponent extends BaseXmlComponent {
|
|
|
|
protected root: string;
|
|
|
|
|
|
|
|
constructor(rootKey: string) {
|
|
|
|
super(rootKey);
|
|
|
|
}
|
|
|
|
|
2017-03-08 21:49:41 +00:00
|
|
|
public replaceKey(): void {
|
2016-05-20 00:40:31 +01:00
|
|
|
if (this.root !== undefined) {
|
|
|
|
this[this.rootKey] = this.root;
|
|
|
|
delete this.root;
|
|
|
|
}
|
|
|
|
}
|
2017-03-08 21:49:41 +00:00
|
|
|
}
|