Use leading underscore for properties with objects with modifier extensions.
This commit is contained in:
parent
12bf57886f
commit
d596a6c343
|
@ -333,9 +333,8 @@ public class TurtleParser extends ParserBase {
|
|||
}
|
||||
String subjId = genSubjectId(e);
|
||||
|
||||
boolean hasModifierExtension = e.getChildren().stream().anyMatch(p -> p.getName().equals("modifierExtension"));
|
||||
Subject subject;
|
||||
if (hasModifierExtension)
|
||||
if (hasModifierExtension(e))
|
||||
subject = section.triple(subjId, "a", "fhir:_" + e.getType());
|
||||
else
|
||||
subject = section.triple(subjId, "a", "fhir:" + e.getType());
|
||||
|
@ -348,6 +347,10 @@ public class TurtleParser extends ParserBase {
|
|||
|
||||
}
|
||||
|
||||
private boolean hasModifierExtension(Element e) {
|
||||
return e.getChildren().stream().anyMatch(p -> p.getName().equals("modifierExtension"));
|
||||
}
|
||||
|
||||
protected String getURIType(String uri) {
|
||||
if(uri.startsWith("<" + FHIR_URI_BASE))
|
||||
if(uri.substring(FHIR_URI_BASE.length() + 1).contains("/"))
|
||||
|
@ -479,8 +482,11 @@ public class TurtleParser extends ParserBase {
|
|||
|
||||
if (en.endsWith("[x]"))
|
||||
en = en.substring(0, en.length()-3);
|
||||
|
||||
return en;
|
||||
|
||||
if (hasModifierExtension(element))
|
||||
return "_" + en;
|
||||
else
|
||||
return en;
|
||||
}
|
||||
|
||||
static public String ttlLiteral(String value, String type) {
|
||||
|
|
Loading…
Reference in New Issue