File was renamed from pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/busi/deal/TreeParse.java |
| | |
| | | package com.dy.aceMw.server.busi.deal; |
| | | package com.dy.aceMw.server.rtuData; |
| | | |
| | | |
| | | import java.net.URL; |
| | |
| | | */ |
| | | protected TreeConfig parseConfig() { |
| | | try { |
| | | URL configFileURL = TreeParse.class.getResource("Tree.xml"); |
| | | ClassLoader classLoader = ClassLoader.getSystemClassLoader(); |
| | | URL configFileURL = classLoader.getResource("RtuDataDealTree.xml"); |
| | | return this.parse(this.createDom(configFileURL)) ; |
| | | } catch (Exception e) { |
| | | System.out.println("系统启动时,初始上行数据处理任务配置出错 !"); |
| | |
| | | private TreeConfig parse(Document doc) throws Exception { |
| | | Element root = doc.getRootElement(); |
| | | if (root == null) { |
| | | throw new Exception("未得到上行数据处理任务配置文件根元素config!"); |
| | | throw new Exception("未得到上行数据处理任务配置文件根元素project!"); |
| | | } |
| | | |
| | | List<Element> rootTasks = root.getChildren("task") ; |