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.DATA_IMPORT_LIST;
24 import static org.openecomp.sdc.asdctool.enums.SchemaZipFileEnum.SchemaZipConstants.EMPTY_IMPORT_LIST;
25 import static org.openecomp.sdc.asdctool.enums.SchemaZipFileEnum.SchemaZipConstants.RELATIONSHIPS_TYPES_IMPORT_LIST;
27 public enum SchemaZipFileEnum {
29 DATA("data", "data-types", "dataTypes", "data_types", EMPTY_IMPORT_LIST),
30 GROUPS("groups", "group-types", "groupTypes", "group_types", DATA_IMPORT_LIST),
31 POLICIES("policies", "policy-types", "policyTypes", "policy_types", DATA_IMPORT_LIST),
32 ANNOTATIONS("annotations", "annotation-types", "annotationTypes", "annotation_types", DATA_IMPORT_LIST),
33 RELATIONSHIPS("relationships", "relationship-types", "relationshipTypes", "relationship_types", RELATIONSHIPS_TYPES_IMPORT_LIST),
34 ARTIFACTS("artifacts", "artifact-types", "artifactTypes", "artifact_types", DATA_IMPORT_LIST),
35 CAPABILITIES("capabilities", "capability-types", "capabilityTypes", "capability_types", DATA_IMPORT_LIST),
36 INTERFACES("interfaces", "interface-lifecycle-types", "interfaceLifecycleTypes", "interface_types", DATA_IMPORT_LIST);
38 private String fileName;
39 private String sourceFolderName;
40 private String sourceFileName;
41 private String collectionTitle;
42 private String[] importFileList;
44 SchemaZipFileEnum(String fileName, String sourceFolderName, String sourceFileName, String collectionTitle,
45 String[] importFileList) {
46 this.fileName = fileName;
47 this.sourceFolderName = sourceFolderName;
48 this.sourceFileName = sourceFileName;
49 this.collectionTitle = collectionTitle;
50 this.importFileList = importFileList;
53 public String getFileName() {
57 public String getSourceFolderName() {
58 return sourceFolderName;
61 public String getSourceFileName() {
62 return sourceFileName;
65 public String getCollectionTitle() {
66 return collectionTitle;
69 public String[] getImportFileList() {
70 return importFileList;
73 static class SchemaZipConstants {
74 static final String [] EMPTY_IMPORT_LIST = new String[]{};
75 static final String [] DATA_IMPORT_LIST = new String[]{"data.yml"};
76 static final String [] RELATIONSHIPS_TYPES_IMPORT_LIST = new String[]{"capabilities.yml", "data.yml", "interfaces.yml"};