package com.persagy.adm.server.backstage.service.impl;

import cn.hutool.core.collection.CollUtil;
import com.persagy.adm.server.backstage.domain.AdmAnalysisModel;
import com.persagy.adm.server.backstage.service.AdmAnalyseService;
import com.persagy.dmp.common.helper.SpringHelper;

import javax.swing.*;
import java.util.List;

/**
 * ADM模型解析门面
 * @author : lijie
 * Update By 2022/1/21 15:07
 */
public class AdmAnalysisFacade {

    private static AdmAnalyseService firstAdmAnalyseService;

    static {
        firstAdmAnalyseService = SpringHelper.getBean(AdmPreFileServiceImpl.class);
        AdmAnalyseService admPreFloorService = SpringHelper.getBean(AdmPreFloorServiceImpl.class);
        firstAdmAnalyseService.setNext(admPreFloorService);
        AdmAnalyseService admUnzipFileService = SpringHelper.getBean(AdmUnzipFileServiceImpl.class);
        admPreFloorService.setNext(admUnzipFileService);
        AdmAnalyseService dataHandleService = SpringHelper.getBean(AdmDataHandleServiceImpl.class);
        admUnzipFileService.setNext(dataHandleService);
    }

    /**
     * 解析模型文件
     * return : void
     * @author : lijie
     * Update By 2022/1/21 15:09
     */
    public static void analysisAdmModelFile(){
        AdmAnalysisModel model = new AdmAnalysisModel();
        firstAdmAnalyseService.analysis(model);
    }
}
