Skip to content

Commit

Permalink
Keep identical label/IDs if they have different comments
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Jun 21, 2024
1 parent d7c917f commit d5d3dbf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ private static void printNodeList(String pId, PathwayModel p) throws IOException
idMappings = getIDMappingsString(e, pId, p, idmpStack);
if (!writtenStrings.contains(idMappings)) {
if(!comment.equals("")) comment = comment.substring(0, comment.length()-5);
w.write(e.getTextLabel().replace("\n", "") + "\t" + e.getType() + "\t" + ((bioregID != null) ? bioregID : "") + "\t\"" + comment + "\"\t" + idMappings + "\n");
writtenStrings.add(idMappings); // full string, bc the identifiers may be linked to different labels
String output = e.getTextLabel().replace("\n", "") + "\t" + e.getType() + "\t" + ((bioregID != null) ? bioregID : "") + "\t\"" + comment + "\"\t" + idMappings + "\n";
w.write(output);
writtenStrings.add(output);
}
}
}
Expand Down

0 comments on commit d5d3dbf

Please sign in to comment.