Skip to content

Commit

Permalink
sepinf-inc#2286: use replaced ufed:Id (UfedXmlReader) as Communicatio…
Browse files Browse the repository at this point in the history
…n:ID
  • Loading branch information
aberenguel committed Sep 4, 2024
1 parent f888ab4 commit b6444dc
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

import org.apache.commons.lang3.StringUtils;
import org.apache.tika.config.Field;
import org.apache.tika.exception.TikaException;
import org.apache.tika.extractor.EmbeddedDocumentExtractor;
Expand Down Expand Up @@ -156,7 +158,7 @@ public void parse(InputStream inputStream, ContentHandler handler, Metadata meta
if (subitemRefs.length > 0) {
String subitemRefsQuery = "(" + Arrays.asList(subitemRefs).stream().collect(Collectors.joining(") (")) + ")";
searcher.searchIterable(subitemRefsQuery).forEach(subitems::add);
} else {
} else if (attach.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "ContentType") != null) {
subitems.add(attach);
}
}
Expand Down Expand Up @@ -223,7 +225,10 @@ public void parse(InputStream inputStream, ContentHandler handler, Metadata meta
}

// Communication:ID
chatMetadata.set(ExtraProperties.COMMUNICATION_ID, chat.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Id"));
String id = chat.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Identifier");
if (id != null) {
chatMetadata.set(ExtraProperties.COMMUNICATION_ID, id);
}

// Communication:Account
String ufedAccount = chat.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Account");
Expand Down

0 comments on commit b6444dc

Please sign in to comment.