Skip to content

Commit

Permalink
'#2011: render group nodes in graph using a multiple people icon
Browse files Browse the repository at this point in the history
  • Loading branch information
lfcnassif committed Jul 26, 2024
1 parent da55663 commit d33361c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion iped-engine/src/main/java/iped/engine/graph/GraphTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ private NodeValues getPhoneNodeValues(String value) {
return null;
}

private NodeValues getGroupNodeValues(String value) {
return new NodeValues(DynLabel.label(GraphConfiguration.CONTACT_GROUP_LABEL), BasicProps.NAME, value.trim().toLowerCase());
}

private NodeValues getGenericNodeValues(String value) {
return new NodeValues(DynLabel.label("GENERIC"), "entity", value.trim().toLowerCase());
}
Expand Down Expand Up @@ -469,7 +473,12 @@ private void processCommunicationMetadata(IItem evidence) throws IOException {
recipients.addAll(Arrays.asList(metadata.getValues(Message.MESSAGE_BCC)));

for (String recipient : recipients) {
NodeValues nv2 = getNodeValues(recipient, evidence.getMetadata(), detectPhones);
NodeValues nv2;
if (Boolean.valueOf(metadata.get(ExtraProperties.IS_GROUP_MESSAGE))) {
nv2 = getGroupNodeValues(recipient);
} else {
nv2 = getNodeValues(recipient, metadata, detectPhones);
}
graphFileWriter.writeNode(nv2.label, nv2.propertyName, nv2.propertyValue, nv2.props);
graphFileWriter.writeRelationship(nv1.label, nv1.propertyName, nv1.propertyValue, nv2.label,
nv2.propertyName, nv2.propertyValue, relationshipType, relProps);
Expand Down

0 comments on commit d33361c

Please sign in to comment.