line = line.replaceAll("&", "");
parts = line.split(DELIMETER);
String src, dst, label;
MaltegoEntity srcType, dstType;
for (int i = 0; i < rmodel.getRowCount(); i++) {
src = ((String) rmodel.getValueAt(i, 0)).trim();
dst = ((String) rmodel.getValueAt(i, 1)).trim();
label = (String) rmodel.getValueAt(i, 2);
if (parts[typesc.get(src)].trim().length() > 0 && parts[typesc.get(dst)].trim().length() > 0) {
srcType = types.get(typesc.get(src));
dstType = types.get(typesc.get(dst));
writer.write(String.format("%s,%s,%s,%s,%s\n", srcType.getName(), parts[typesc.get(src)], dstType.getName(), parts[typesc.get(dst)], label));
}
}
}
reader.close();