+ private void processFiles(String modelName, List<File> fileList) {
+ Map<String, MSAttributeObject> tempMap;
+ for (File file : fileList){
+ if (file.isFile()){
+ int i = file.getName().lastIndexOf('.');
+ String type = file.getName().substring(i+1);
+
+ if("yml".equalsIgnoreCase(type)){
+
+ processYmlModel(file.toString(), modelName);
+
+ }else{
+
+ tempMap = utils.processEpackage(file.getAbsolutePath(), MODEL_TYPE.XMI);
+ classMap.putAll(tempMap);
+ }
+ }
+ }
+ }
+
+ private void doCleanUpFiles(String randomID) {
+ String cleanUpFile;
+ cleanUpFile = "ExtractDir" + File.separator + randomID + ".zip";
+ try {
+ FileUtils.deleteDirectory(new File("ExtractDir" + File.separator + randomID));
+ FileUtils.deleteDirectory(new File(randomID));
+ File deleteFile = new File(cleanUpFile);
+ FileUtils.forceDelete(deleteFile);
+ } catch (IOException e) {
+ logger.error("Failed to unzip model file " + randomID, e);
+ }
+ }
+