2016-03-31 23:01:20 +01:00
|
|
|
import {XmlComponent, Attributes} from "../xml-components";
|
2016-03-31 23:03:16 +01:00
|
|
|
import {Body} from "./body";
|
2016-04-01 04:09:24 +01:00
|
|
|
import {Paragraph} from "../paragraph";
|
2016-03-31 23:01:20 +01:00
|
|
|
|
|
|
|
export class Document {
|
|
|
|
private document: Array<XmlComponent>;
|
2016-04-01 04:09:24 +01:00
|
|
|
private body: Body;
|
2016-03-31 23:01:20 +01:00
|
|
|
|
|
|
|
constructor() {
|
|
|
|
this.document = new Array<XmlComponent>();
|
|
|
|
this.document.push(new Attributes({}));
|
2016-04-01 04:09:24 +01:00
|
|
|
this.body = new Body();
|
|
|
|
this.document.push(this.body);
|
2016-03-31 23:01:20 +01:00
|
|
|
}
|
|
|
|
|
2016-04-01 04:09:24 +01:00
|
|
|
addParagraph(paragraph: Paragraph) {
|
|
|
|
this.body.push(paragraph);
|
2016-03-31 23:01:20 +01:00
|
|
|
}
|
|
|
|
}
|