For resources with a modifierExtension, use a leading underscore for the rdf:type.
This commit is contained in:
parent
5dc19cd052
commit
12bf57886f
|
@ -333,7 +333,13 @@ public class TurtleParser extends ParserBase {
|
||||||
}
|
}
|
||||||
String subjId = genSubjectId(e);
|
String subjId = genSubjectId(e);
|
||||||
|
|
||||||
Subject subject = section.triple(subjId, "a", "fhir:" + e.getType());
|
boolean hasModifierExtension = e.getChildren().stream().anyMatch(p -> p.getName().equals("modifierExtension"));
|
||||||
|
Subject subject;
|
||||||
|
if (hasModifierExtension)
|
||||||
|
subject = section.triple(subjId, "a", "fhir:_" + e.getType());
|
||||||
|
else
|
||||||
|
subject = section.triple(subjId, "a", "fhir:" + e.getType());
|
||||||
|
|
||||||
subject.linkedPredicate("fhir:nodeRole", "fhir:treeRoot", linkResolver == null ? null : linkResolver.resolvePage("rdf.html#tree-root"), null);
|
subject.linkedPredicate("fhir:nodeRole", "fhir:treeRoot", linkResolver == null ? null : linkResolver.resolvePage("rdf.html#tree-root"), null);
|
||||||
|
|
||||||
for (Element child : e.getChildren()) {
|
for (Element child : e.getChildren()) {
|
||||||
|
|
Loading…
Reference in New Issue