@Test public void testReadSCDFile() { HashMap<String,String> attIds = null; try { attIds = eScd.readSCDFile("PTCANV_id"); assertEquals("CAN attribute name for PTCANV_id object", "ID_N_ATT_CAN", attIds.get("CAN_id")); assertEquals("IDU attribute name for PTCANV_id object", "ID_N_ATT_IDU", attIds.get("IDU_id")); assertEquals("MAP attribute name for PTCANV_id object", "ID_N_ATT_MAP", attIds.get("MAP_id")); assertEquals("ORI attribute name for PTCANV_id object", "ID_N_ATT_ORI", attIds.get("ORI_id")); assertEquals("PALT attribute name for PTCANV_id object", "ID_N_ATT_PALT", attIds.get("PALT_id")); assertEquals("PALT attribute name for PTCANV_id object", "ID_N_ATT_PPLN", attIds.get("PPLN_id")); assertEquals("PALT attribute name for PTCANV_id object", "ID_N_ATT_SYM", attIds.get("SYM_id")); } catch (IOException e) { assertFalse(true); } attIds = null; }
public HashMap<String,String> readSCDFile(String obj) throws IOException { EdigeoParser scdParser = new EdigeoParser(scdFile); String idAtt = null; String idDic = null; int nbAtt; HashMap<String,String> attIds = new HashMap<String, String>(); while (scdParser.readLine()) { if (scdParser.line.contains(DS + obj)) { while(scdParser.readLine()) { if (scdParser.line.contains("AACSN")) { nbAtt = Integer.parseInt(scdParser.getValue("AACSN")); for (int i = 0; i < nbAtt; i++) { scdParser.readLine(); idAtt = scdParser.getValue("AAPCP"); idAtt = idAtt.substring(idAtt.lastIndexOf(VS)+1); idDic = getDicAtt(idAtt); attIds.put(idAtt, idDic); } break; } } break; } } scdParser.close(); return attIds; }
EdigeoSCD { public HashMap<String,String> readSCDFile(String obj) throws IOException { EdigeoParser scdParser = new EdigeoParser(scdFile); String idAtt = null; String idDic = null; int nbAtt; HashMap<String,String> attIds = new HashMap<String, String>(); while (scdParser.readLine()) { if (scdParser.line.contains(DS + obj)) { while(scdParser.readLine()) { if (scdParser.line.contains("AACSN")) { nbAtt = Integer.parseInt(scdParser.getValue("AACSN")); for (int i = 0; i < nbAtt; i++) { scdParser.readLine(); idAtt = scdParser.getValue("AAPCP"); idAtt = idAtt.substring(idAtt.lastIndexOf(VS)+1); idDic = getDicAtt(idAtt); attIds.put(idAtt, idDic); } break; } } break; } } scdParser.close(); return attIds; } }
EdigeoSCD { public HashMap<String,String> readSCDFile(String obj) throws IOException { EdigeoParser scdParser = new EdigeoParser(scdFile); String idAtt = null; String idDic = null; int nbAtt; HashMap<String,String> attIds = new HashMap<String, String>(); while (scdParser.readLine()) { if (scdParser.line.contains(DS + obj)) { while(scdParser.readLine()) { if (scdParser.line.contains("AACSN")) { nbAtt = Integer.parseInt(scdParser.getValue("AACSN")); for (int i = 0; i < nbAtt; i++) { scdParser.readLine(); idAtt = scdParser.getValue("AAPCP"); idAtt = idAtt.substring(idAtt.lastIndexOf(VS)+1); idDic = getDicAtt(idAtt); attIds.put(idAtt, idDic); } break; } } break; } } scdParser.close(); return attIds; } EdigeoSCD(String path); }
EdigeoSCD { public HashMap<String,String> readSCDFile(String obj) throws IOException { EdigeoParser scdParser = new EdigeoParser(scdFile); String idAtt = null; String idDic = null; int nbAtt; HashMap<String,String> attIds = new HashMap<String, String>(); while (scdParser.readLine()) { if (scdParser.line.contains(DS + obj)) { while(scdParser.readLine()) { if (scdParser.line.contains("AACSN")) { nbAtt = Integer.parseInt(scdParser.getValue("AACSN")); for (int i = 0; i < nbAtt; i++) { scdParser.readLine(); idAtt = scdParser.getValue("AAPCP"); idAtt = idAtt.substring(idAtt.lastIndexOf(VS)+1); idDic = getDicAtt(idAtt); attIds.put(idAtt, idDic); } break; } } break; } } scdParser.close(); return attIds; } EdigeoSCD(String path); HashMap<String,String> readSCDFile(String obj); }
EdigeoSCD { public HashMap<String,String> readSCDFile(String obj) throws IOException { EdigeoParser scdParser = new EdigeoParser(scdFile); String idAtt = null; String idDic = null; int nbAtt; HashMap<String,String> attIds = new HashMap<String, String>(); while (scdParser.readLine()) { if (scdParser.line.contains(DS + obj)) { while(scdParser.readLine()) { if (scdParser.line.contains("AACSN")) { nbAtt = Integer.parseInt(scdParser.getValue("AACSN")); for (int i = 0; i < nbAtt; i++) { scdParser.readLine(); idAtt = scdParser.getValue("AAPCP"); idAtt = idAtt.substring(idAtt.lastIndexOf(VS)+1); idDic = getDicAtt(idAtt); attIds.put(idAtt, idDic); } break; } } break; } } scdParser.close(); return attIds; } EdigeoSCD(String path); HashMap<String,String> readSCDFile(String obj);  }