3595f787282becd1bb7671bfdff1bcd76368cec0
[ccsdk/cds.git] /
1 import {MetaDataTabModel} from './metadata/MetaDataTab.model';
2
3 export class Definition {
4
5     // public metaDataTab: MetaDataTabModel;
6     public imports: Map<string, string>;
7     public dslDefinition: DslDefinition;
8
9     // public dslDefinition:
10
11     constructor() {
12         this.imports = new Map<string, string>();
13         // this.metaDataTab = new MetaDataTabModel();
14         this.dslDefinition = new DslDefinition();
15     }
16
17     public setImports(key: string, value: string) {
18         this.imports.set(key, value);
19         return this;
20     }
21
22     // public setMetaData(metaDataTab: MetaDataTabModel) {
23     //     this.metaDataTab = metaDataTab;
24     //     return this;
25     // }
26
27     public setDslDefinition(dslDefinition: DslDefinition): Definition {
28         this.dslDefinition = dslDefinition;
29         return this;
30     }
31 }
32
33 export class DslDefinition {
34     content: string;
35 }
36
37 export class Scripts {
38     public files: Map<string, string>;
39
40     constructor() {
41         this.files = new Map<string, string>();
42     }
43
44     public setScripts(key: string, value: string) {
45         this.files.set(key, value);
46         return this;
47     }
48 }
49
50
51 export class Template {
52     public files: Map<string, string>;
53
54     constructor() {
55         this.files = new Map<string, string>();
56     }
57
58     public setTemplates(key: string, value: string) {
59         this.files.set(key, value);
60         return this;
61     }
62
63     public getValue(key: string): string {
64         return this.files.get(key);
65     }
66 }
67
68 export class CBAPackage {
69
70     public metaData: MetaDataTabModel;
71     public definitions: Definition;
72     public scripts: Scripts;
73     public templates: Template;
74
75
76     constructor() {
77         this.definitions = new Definition();
78         this.scripts = new Scripts();
79         this.metaData = new MetaDataTabModel();
80         this.templates = new Template();
81     }
82
83
84 }
85
86