Reformat catalog-model
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / jsonjanusgraph / datamodel / ToscaElementTypeEnum.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T 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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20 package org.openecomp.sdc.be.model.jsonjanusgraph.datamodel;
21
22 import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
23
24 public enum ToscaElementTypeEnum {
25     NODE_TYPE("node_type"), TOPOLOGY_TEMPLATE("topology_template");
26     String value;
27
28     private ToscaElementTypeEnum(String value) {
29         this.value = value;
30     }
31
32     public static VertexTypeEnum getVertexTypeByToscaType(ToscaElementTypeEnum toscaType) {
33         switch (toscaType) {
34             case NODE_TYPE:
35                 return VertexTypeEnum.NODE_TYPE;
36             case TOPOLOGY_TEMPLATE:
37                 return VertexTypeEnum.TOPOLOGY_TEMPLATE;
38             default:
39                 return null;
40         }
41     }
42
43     public String getValue() {
44         return value;
45     }
46 }