use of com.nedap.archie.rm.datavalues.encapsulated.DvMultimedia in project openEHR_SDK by ehrbase.
the class FeederAuditRMUnmarshaller method handle.
@Override
public void handle(String currentTerm, FeederAudit rmObject, Map<FlatPathDto, String> currentValues, Context<Map<FlatPathDto, String>> context, Set<String> consumedPaths) {
Map<FlatPathDto, String> originalContentValues = FlatHelper.filter(currentValues, currentTerm + "/original_content", false);
if (!originalContentValues.isEmpty()) {
rmObject.setOriginalContent(new DvParsable());
DV_PARSABLE_RM_UNMARSHALLER.handle(currentTerm + "/original_content", (DvParsable) rmObject.getOriginalContent(), originalContentValues, context, consumedPaths);
}
Map<FlatPathDto, String> originalContentMultimediaValues = FlatHelper.filter(currentValues, currentTerm + "/original_content_multimedia", false);
if (!originalContentMultimediaValues.isEmpty()) {
rmObject.setOriginalContent(new DvMultimedia());
DV_MULTIMEDIA_RM_UNMARSHALLER.handle(currentTerm + "/original_content_multimedia", (DvMultimedia) rmObject.getOriginalContent(), originalContentMultimediaValues, context, consumedPaths);
}
Map<FlatPathDto, String> originatingSystemAuditValues = FlatHelper.filter(currentValues, currentTerm + "/originating_system_audit", false);
if (!originatingSystemAuditValues.isEmpty()) {
rmObject.setOriginatingSystemAudit(new FeederAuditDetails());
FEEDER_AUDIT_DETAILS_RM_UNMARSHALLER.handle(currentTerm + "/originating_system_audit", rmObject.getOriginatingSystemAudit(), currentValues, context, consumedPaths);
}
Map<Integer, Map<String, String>> feederSystemIds = extractMultiValued(currentTerm, "feeder_system_item_id", currentValues);
rmObject.getFeederSystemItemIds().addAll(feederSystemIds.values().stream().map(DefaultValues::toDvIdentifier).collect(Collectors.toList()));
consumeAllMatching(currentTerm + PATH_DIVIDER + "feeder_system_item_id", currentValues, consumedPaths, false);
Map<Integer, Map<String, String>> originatingSystemIds = extractMultiValued(currentTerm, "originating_system_item_id", currentValues);
rmObject.getOriginatingSystemItemIds().addAll(originatingSystemIds.values().stream().map(DefaultValues::toDvIdentifier).collect(Collectors.toList()));
consumeAllMatching(currentTerm + PATH_DIVIDER + "originating_system_item_id", currentValues, consumedPaths, false);
}
Aggregations