simplified class
This commit is contained in:
@ -2,66 +2,60 @@ import {XmlUnitComponent} from "../docx/xml-components";
|
|||||||
import {XmlComponent} from "../docx/xml-components";
|
import {XmlComponent} from "../docx/xml-components";
|
||||||
import {DocumentAttributes} from "../docx/document/document-attributes";
|
import {DocumentAttributes} from "../docx/document/document-attributes";
|
||||||
|
|
||||||
abstract class Component extends XmlUnitComponent {
|
export class Title extends XmlUnitComponent {
|
||||||
protected createNullBlockOrValue(value: string): any {
|
|
||||||
return value;
|
|
||||||
//return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export class Title extends Component {
|
|
||||||
|
|
||||||
constructor(value: string) {
|
constructor(value: string) {
|
||||||
super("dc:title");
|
super("dc:title");
|
||||||
this.root = this.createNullBlockOrValue(value);
|
this.root = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Subject extends Component {
|
export class Subject extends XmlUnitComponent {
|
||||||
|
|
||||||
constructor(value: string) {
|
constructor(value: string) {
|
||||||
super("dc:subject");
|
super("dc:subject");
|
||||||
this.root = this.createNullBlockOrValue(value);
|
this.root = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Creator extends Component {
|
export class Creator extends XmlUnitComponent {
|
||||||
|
|
||||||
constructor(value: string) {
|
constructor(value: string) {
|
||||||
super("dc:creator");
|
super("dc:creator");
|
||||||
this.root = this.createNullBlockOrValue(value);
|
this.root = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Keywords extends Component {
|
export class Keywords extends XmlUnitComponent {
|
||||||
|
|
||||||
constructor(value: string) {
|
constructor(value: string) {
|
||||||
super("cp:keywords");
|
super("cp:keywords");
|
||||||
this.root = this.createNullBlockOrValue(value);
|
this.root = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Description extends Component {
|
export class Description extends XmlUnitComponent {
|
||||||
|
|
||||||
constructor(value: string) {
|
constructor(value: string) {
|
||||||
super("dc:description");
|
super("dc:description");
|
||||||
this.root = this.createNullBlockOrValue(value);
|
this.root = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LastModifiedBy extends Component {
|
export class LastModifiedBy extends XmlUnitComponent {
|
||||||
|
|
||||||
constructor(value: string) {
|
constructor(value: string) {
|
||||||
super("cp:lastModifiedBy");
|
super("cp:lastModifiedBy");
|
||||||
this.root = this.createNullBlockOrValue(value);
|
this.root = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Revision extends Component {
|
export class Revision extends XmlUnitComponent {
|
||||||
|
|
||||||
constructor(value: string) {
|
constructor(value: string) {
|
||||||
super("cp:revision");
|
super("cp:revision");
|
||||||
var revision = this.createNullBlockOrValue(value);
|
var revision = value;
|
||||||
this.root = this.createNullBlockOrValue(value);
|
this.root = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +84,7 @@ export class Created extends DateComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Modified extends DateComponent implements XmlComponent {
|
export class Modified extends DateComponent {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("dcterms:modified");
|
super("dcterms:modified");
|
||||||
|
Reference in New Issue
Block a user