2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2018-2019 Nokia Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
22 import java.util.Arrays;
23 import java.util.List;
26 * Dummy model for testing purposes
28 @SuppressWarnings("unused")
31 private static final String MODEL_TYPE = "widget";
32 private static final String MODEL_VERSION = "1.0";
34 private final String modelInvariantId;
35 private final String modelType;
36 private final ModelVers modelVers;
38 public Model(String modelName, String modelInvariantId, String modelVersionId) {
39 this.modelInvariantId = modelInvariantId;
40 this.modelVers = new ModelVers(new ModelVer(modelVersionId, modelName));
41 this.modelType = MODEL_TYPE;
44 public String getModelInvariantId() {
45 return modelInvariantId;
48 public ModelVers getModelVers() {
52 public String getModelType() {
56 private static class ModelVers {
58 private final List<ModelVer> modelVer;
60 ModelVers(ModelVer... modelVer) {
61 this.modelVer = Arrays.asList(modelVer);
64 public List<ModelVer> getModelVer() {
69 private static class ModelVer {
71 private final String modelVersionId;
72 private final String modelVersion;
73 private final String modelName;
75 ModelVer(String modelVersionId, String modelName) {
76 this.modelVersionId = modelVersionId;
77 this.modelName = modelName;
78 this.modelVersion = MODEL_VERSION;
81 public String getModelVersionId() {
82 return modelVersionId;
85 public String getModelName() {
89 public String getModelVersion() {