mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Put name together manually if formattedName field is missing.
This commit is contained in:
parent
9f5f586aae
commit
d6cb162d6c
@ -166,7 +166,34 @@ final class VcardParser {
|
|||||||
|
|
||||||
extractPhotos(vcard, abstractFile);
|
extractPhotos(vcard, abstractFile);
|
||||||
|
|
||||||
ThunderbirdMboxFileIngestModule.addArtifactAttribute(vcard.getFormattedName().getValue(), BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME_PERSON, attributes);
|
String name = "";
|
||||||
|
if (vcard.getFormattedName() != null) {
|
||||||
|
name = vcard.getFormattedName().getValue();
|
||||||
|
} else {
|
||||||
|
if (vcard.getStructuredName() != null) {
|
||||||
|
// Attempt to put the name together if there was no formatted version
|
||||||
|
for (String prefix:vcard.getStructuredName().getPrefixes()) {
|
||||||
|
name += prefix + " ";
|
||||||
|
}
|
||||||
|
if (vcard.getStructuredName().getGiven() != null) {
|
||||||
|
name += vcard.getStructuredName().getGiven() + " ";
|
||||||
|
}
|
||||||
|
if (vcard.getStructuredName().getFamily() != null) {
|
||||||
|
name += vcard.getStructuredName().getFamily() + " ";
|
||||||
|
}
|
||||||
|
for (String suffix:vcard.getStructuredName().getSuffixes()) {
|
||||||
|
name += suffix + " ";
|
||||||
|
}
|
||||||
|
if (! vcard.getStructuredName().getAdditionalNames().isEmpty()) {
|
||||||
|
name += "(";
|
||||||
|
for (String addName:vcard.getStructuredName().getAdditionalNames()) {
|
||||||
|
name += addName + " ";
|
||||||
|
}
|
||||||
|
name += ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ThunderbirdMboxFileIngestModule.addArtifactAttribute(name, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME_PERSON, attributes);
|
||||||
|
|
||||||
for (Telephone telephone : vcard.getTelephoneNumbers()) {
|
for (Telephone telephone : vcard.getTelephoneNumbers()) {
|
||||||
addPhoneAttributes(telephone, abstractFile, attributes);
|
addPhoneAttributes(telephone, abstractFile, attributes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user