2 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13 * or implied. See the License for the specific language governing
14 * permissions and limitations under the License.
18 * Example scenarios, for development, testing and demos.
20 export default class Scenarios {
22 // ///////////////////////////////////////////////////////////////////////////////////////////////
25 * Construct scenarios; read model and metamodel templates.
30 ecomp: require('./model/ECOMP.json'),
31 blank: require('./model/BLANK.json'),
32 dimensions: require('./model/DIMENSIONS.json'),
35 ecomp: require('./metamodel/ECOMP.json'),
36 blank: require('./metamodel/BLANK.json'),
41 // ///////////////////////////////////////////////////////////////////////////////////////////////
45 * @return ECOMP scenario JSON.
48 return JSON.parse(JSON.stringify(this.templates.model.ecomp));
51 // ///////////////////////////////////////////////////////////////////////////////////////////////
54 * Get ECOMP scenario metamodel.
55 * @return scenario metamodel JSON.
58 return JSON.parse(JSON.stringify(this.templates.metamodel.ecomp));
61 // ///////////////////////////////////////////////////////////////////////////////////////////////
65 * @return blank scenario JSON.
68 return JSON.parse(JSON.stringify(this.templates.model.blank));
71 // ///////////////////////////////////////////////////////////////////////////////////////////////
74 * Get empty scenario metamodel.
75 * @return empty metamodel JSON.
78 return JSON.parse(JSON.stringify(this.templates.metamodel.blank));
81 // ///////////////////////////////////////////////////////////////////////////////////////////////
85 * @return scenario JSON.
88 return JSON.parse(JSON.stringify(this.templates.model.dimensions));
91 // ///////////////////////////////////////////////////////////////////////////////////////////////
94 * Get scenario metamodel.
95 * @return metamodel JSON.
97 getDimensionsMetamodel() {
98 return JSON.parse(JSON.stringify(this.templates.metamodel.blank));
101 // ///////////////////////////////////////////////////////////////////////////////////////////////
104 * Get demo metamodels.
108 return [this.getBlankMetamodel(), this.getDimensionsMetamodel(), this.getECOMPMetamodel()];