|
|
|
@ -1,7 +1,10 @@
|
|
|
|
|
package cokr.xit.fims.crdn.parsing;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.nio.file.Path;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
@ -11,10 +14,29 @@ public class XitRecommend implements EquipmentEnterprise{
|
|
|
|
|
@Override
|
|
|
|
|
public List<DataObject> parsing(Stream<Path> fileList) {
|
|
|
|
|
|
|
|
|
|
//파일명으로 정렬(파싱 전)
|
|
|
|
|
List<Path> sortedFileList = fileList
|
|
|
|
|
.sorted((item1, item2) -> item1.toFile().getName().compareTo(item2.toFile().getName()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
List<DataObject> dataObjectList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
sortedFileList.forEach(item -> {
|
|
|
|
|
DataObject dataObject = new DataObject();
|
|
|
|
|
File file = item.toFile();
|
|
|
|
|
String filePath = file.getPath();
|
|
|
|
|
dataObject.put("FILE_PATH", filePath);
|
|
|
|
|
String fileName = file.getName();
|
|
|
|
|
dataObject.put("FILE_NAME", fileName);
|
|
|
|
|
|
|
|
|
|
//TODO:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataObjectList.add(dataObject);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return dataObjectList;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
1. 연계형식: 파일 연계
|
|
|
|
|
|
|
|
|
@ -56,7 +78,6 @@ public class XitRecommend implements EquipmentEnterprise{
|
|
|
|
|
127.482432
|
|
|
|
|
37.362931
|
|
|
|
|
*/
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|