| | |
| | | meta.setEpsgCode(epsgCode); |
| | | |
| | | if (StaticData.ZIP.equals(meta.getExtName())) { |
| | | List<MetaFileEntity> subs = getMappers(path, meta.getPath(), meta); |
| | | List<MetaFileEntity> subs = getMappers(path, meta); |
| | | if (null != subs && subs.size() > 0) { |
| | | list.addAll(subs); |
| | | continue; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取映射 |
| | | * 获取映射文件 |
| | | */ |
| | | private List<MetaFileEntity> getMappers(String path, String zipPath, MetaFileEntity meta) { |
| | | File file = new File(pathHelper.getConfig().getTempPath() + File.separator + zipPath); |
| | | private List<MetaFileEntity> getMapperFiles(String path, MetaFileEntity meta) { |
| | | String zipFile = pathHelper.getConfig().getTempPath() + File.separator + meta.getPath(); |
| | | File file = new File(zipFile); |
| | | if (!file.exists() || file.isDirectory()) { |
| | | return null; |
| | | } |
| | |
| | | zipFolder.mkdirs(); |
| | | } |
| | | |
| | | List<MetaFileEntity> list = new ArrayList<>(); |
| | | String subPath = zipFolder + File.separator + meta.getName().toLowerCase().replace(".zip", ""); |
| | | ZipHelper.unzip(zipFile, subPath); |
| | | |
| | | File subFile = new File(subPath); |
| | | File[] files = subFile.listFiles(); |
| | | if (null == files || files.length == 0) { |
| | | return null; |
| | | } |
| | | |
| | | return getMapperFiles(files, meta); |
| | | } |
| | | |
| | | /** |
| | | * 获取映射文件 |
| | | */ |
| | | private List<MetaFileEntity> getMapperFiles(File[] files, MetaFileEntity meta) { |
| | | List<MetaFileEntity> list = new ArrayList<>(); |
| | | |
| | | return list; |
| | | } |