45a00ff06bd247eb1b4466357748e59792f0bfab
[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 Base {
38     public files: Map<string, string>;
39
40     constructor() {
41         this.files = new Map<string, string>();
42     }
43
44     public setContent(key: string, value: string) {
45         this.files.set(key, value);
46         return this;
47     }
48
49     public getValue(key: string): string {
50         return this.files.get(key);
51     }
52 }
53 export class Scripts {
54     public files: Map<string, string>;
55
56     constructor() {
57         this.files = new Map<string, string>();
58     }
59
60     public setScripts(key: string, value: string) {
61         this.files.set(key, value);
62         return this;
63     }
64 }
65
66
67 export class Template {
68     public files: Map<string, string>;
69
70     constructor() {
71         this.files = new Map<string, string>();
72     }
73
74     public setTemplates(key: string, value: string) {
75         this.files.set(key, value);
76         return this;
77     }
78
79     public getValue(key: string): string {
80         return this.files.get(key);
81     }
82 }
83
84 export class Mapping extends Base {
85 }
86 export class CBAPackage {
87
88     public metaData: MetaDataTabModel;
89     public definitions: Definition;
90     public scripts: Scripts;
91     public templates: Template;
92     public mapping: Mapping;
93
94
95     constructor() {
96         this.definitions = new Definition();
97         this.scripts = new Scripts();
98         this.metaData = new MetaDataTabModel();
99         this.templates = new Template();
100         this.mapping = new Mapping();
101     }
102
103
104 }
105
106