use of org.ehrbase.serialisation.flatencoding.std.umarshal.rmunmarshaller.RMUnmarshaller in project openEHR_SDK by ehrbase.
the class StdToCompositionWalker method preHandle.
@Override
protected void preHandle(Context<Map<FlatPathDto, String>> context) {
// Handle if at an End-Node
if (!isRaw(context) && !visitChildren(context.getNodeDeque().peek()) && !context.getFlatHelper().skip(context)) {
if (context.getRmObjectDeque().peek().getClass().isAssignableFrom(DvCodedText.class) && context.getObjectDeque().peek().keySet().stream().anyMatch(k -> "other".equals(k.getLast().getAttributeName()))) {
replaceRmObject(context, new DvText());
}
RMUnmarshaller rmUnmarshaller = findRMUnmarshaller(context.getRmObjectDeque().peek().getClass());
String namePath = buildNamePathWithElementHandling(context);
rmUnmarshaller.handle(namePath, context.getRmObjectDeque().peek(), context.getObjectDeque().peek(), context, consumedPaths);
}
}
use of org.ehrbase.serialisation.flatencoding.std.umarshal.rmunmarshaller.RMUnmarshaller in project openEHR_SDK by ehrbase.
the class DvOrderedPostprocessor method handleBorder.
private void handleBorder(Map<FlatPathDto, String> values, Set<String> consumedPaths, Context<Map<FlatPathDto, String>> context, String borderName, Consumer<DvOrdered> borderConsumer, String term) {
Map<FlatPathDto, String> borderValues = FlatHelper.filter(values, term + PATH_DIVIDER + borderName, false);
if (!borderValues.isEmpty()) {
DvOrdered lower = WebTemplateSkeletonBuilder.build(context.getNodeDeque().peek(), false, DvOrdered.class);
borderConsumer.accept(lower);
RMUnmarshaller rmUnmarshaller = findRMUnmarshaller(lower.getClass());
rmUnmarshaller.handle(term + PATH_DIVIDER + borderName, lower, borderValues, context, consumedPaths);
}
}
Aggregations