From 28ef03d26b95d846d70d6f6f96ca198bdf5a8eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Berenguel?= Date: Tue, 5 Nov 2024 16:10:16 -0300 Subject: [PATCH] #2286: handle ufed:PositionAddress --- .../src/main/java/iped/parsers/ufed/ReferencedLocation.java | 3 +++ .../src/main/java/iped/parsers/ufed/ReportGenerator.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReferencedLocation.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReferencedLocation.java index 1100c10aef..f7d4e7fa40 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReferencedLocation.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReferencedLocation.java @@ -47,4 +47,7 @@ public String getCountry() { return readUfedMetadata(item, "Country"); } + public String getPositionAddress() { + return readUfedMetadata(item, "PositionAddress"); + } } diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReportGenerator.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReportGenerator.java index 4b0a2a15f9..226b0f193b 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReportGenerator.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/ufed/ReportGenerator.java @@ -96,11 +96,15 @@ private String formatLocation(Message message) { String city = localization.getCity(); String state = localization.getState(); String country = localization.getCountry(); + String positionAddress = localization.getPositionAddress(); String complement = Arrays.asList(city, state, country).stream().filter(StringUtils::isNotBlank).collect(Collectors.joining(" - ")); if (isNotBlank(name)) { div.with(span(name), br()); } + if (isNotBlank(positionAddress)) { + div.with(span(i(positionAddress)), br()); + } if (isNotBlank(street)) { String fullStreet = street; if (isNotBlank(houseNumber) && !"0".equals(houseNumber)) {