2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 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
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=========================================================
21 package org.openecomp.sdc.asdctool.enums;
23 import static org.openecomp.sdc.asdctool.enums.SchemaZipFileEnum.SchemaZipConstants.*;
25 public enum SchemaZipFileEnum {
27 DATA("data", "data-types", "dataTypes", "data_types", EMPTY_IMPORT_LIST),
28 GROUPS("groups", "group-types", "groupTypes", "group_types", DATA_IMPORT_LIST),
29 POLICIES("policies", "policy-types", "policyTypes", "policy_types", DATA_IMPORT_LIST),
30 ANNOTATIONS("annotations", "annotation-types", "annotationTypes", "annotation_types", DATA_IMPORT_LIST),
31 RELATIONSHIPS("relationships", "relationship-types", "relationshipTypes", "relationship_types", RELATIONSHIPS_TYPES_IMPORT_LIST),
32 ARTIFACTS("artifacts", "artifact-types", "artifactTypes", "artifact_types", DATA_IMPORT_LIST),
33 CAPABILITIES("capabilities", "capability-types", "capabilityTypes", "capability_types", DATA_IMPORT_LIST),
34 INTERFACES("interfaces", "interface-lifecycle-types", "interfaceLifecycleTypes", "interface_types", DATA_IMPORT_LIST);
36 private String fileName;
37 private String sourceFolderName;
38 private String sourceFileName;
39 private String collectionTitle;
40 private String[] importFileList;
42 SchemaZipFileEnum(String fileName, String sourceFolderName, String sourceFileName, String collectionTitle,
43 String[] importFileList) {
44 this.fileName = fileName;
45 this.sourceFolderName = sourceFolderName;
46 this.sourceFileName = sourceFileName;
47 this.collectionTitle = collectionTitle;
48 this.importFileList = importFileList;
51 public String getFileName() {
55 public String getSourceFolderName() {
56 return sourceFolderName;
59 public String getSourceFileName() {
60 return sourceFileName;
63 public String getCollectionTitle() {
64 return collectionTitle;
67 public String[] getImportFileList() {
68 return importFileList;
71 static class SchemaZipConstants {
72 static final String [] EMPTY_IMPORT_LIST = new String[]{};
73 static final String [] DATA_IMPORT_LIST = new String[]{"data.yml"};
74 static final String [] RELATIONSHIPS_TYPES_IMPORT_LIST = new String[]{"capabilities.yml", "data.yml", "interfaces.yml"};