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