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