Merge from ECOMP's repository
[vid.git] / vid-app-common / src / main / java / org / onap / vid / model / NewVNF.java
index dba6bdc..1b977a9 100644 (file)
@@ -1,33 +1,22 @@
 package org.onap.vid.model;
 
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.regex.Pattern;
 
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.onap.vid.asdc.beans.tosca.NodeTemplate;
-
 public class NewVNF extends NewNode {
-       
-       /** The Constant LOG. */
-       private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VNF.class);
-       
-       /** The Constant dateFormat. */
-       final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
 
        /** The pattern used to normalize VNF names */
-       final static Pattern COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+");
+       static final Pattern COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+");
        
        /** The model customization name. */
        private String modelCustomizationName;
        
        /** The vf modules. */
-       private Map<String, VfModule> vfModules = new HashMap<String, VfModule>();
+       private Map<String, VfModule> vfModules = new HashMap<>();
        
        /** The volume groups. */
-       private Map<String, VolumeGroup> volumeGroups = new HashMap<String, VolumeGroup>();
+       private Map<String, VolumeGroup> volumeGroups = new HashMap<>();
        
        /**
         * Instantiates a newvnf.
@@ -96,28 +85,6 @@ public class NewVNF extends NewNode {
         * @return the normalized name
         */
        public static String normalizeName (String originalName) {
-
-               String normalizedName = originalName.toLowerCase();
-               normalizedName = COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN.matcher(normalizedName).replaceAll(" ");
-               String[] splitArr = null;
-               
-               try {
-                       splitArr = normalizedName.split(" ");
-               }
-               catch (Exception ex ) {
-                       return (normalizedName);
-               }
-               StringBuffer sb = new StringBuffer();
-               if ( splitArr != null ) {
-                       for (String splitElement : splitArr) {
-                               sb.append(splitElement);
-                       }
-                       return (sb.toString());
-               }
-               else {
-                       return (normalizedName);
-               }
-               
+                       return VNF.normalizeName(originalName);
        }
-
 }