Don’t include parent type in predicate name.
This commit is contained in:
parent
604fbfe47b
commit
89b23e4b95
|
@ -29,7 +29,7 @@ public class RdfParser extends RdfParserBase {
|
|||
private void composeEnum(Complex parent, String parentType, String name, Enumeration<? extends Enum> value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
decorateCode(t, value);
|
||||
|
@ -39,7 +39,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeDate(Complex parent, String parentType, String name, DateType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeDateTime(Complex parent, String parentType, String name, DateTimeType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeCode(Complex parent, String parentType, String name, CodeType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
decorateCode(t, value);
|
||||
|
@ -64,7 +64,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeString(Complex parent, String parentType, String name, StringType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeInteger(Complex parent, String parentType, String name, IntegerType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeInteger64(Complex parent, String parentType, String name, Integer64Type value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeOid(Complex parent, String parentType, String name, OidType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeCanonical(Complex parent, String parentType, String name, CanonicalType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeUri(Complex parent, String parentType, String name, UriType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeUuid(Complex parent, String parentType, String name, UuidType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeUrl(Complex parent, String parentType, String name, UrlType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeInstant(Complex parent, String parentType, String name, InstantType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeBoolean(Complex parent, String parentType, String name, BooleanType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeBase64Binary(Complex parent, String parentType, String name, Base64BinaryType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeUnsignedInt(Complex parent, String parentType, String name, UnsignedIntType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeMarkdown(Complex parent, String parentType, String name, MarkdownType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeTime(Complex parent, String parentType, String name, TimeType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeId(Complex parent, String parentType, String name, IdType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composePositiveInt(Complex parent, String parentType, String name, PositiveIntType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ public class RdfParser extends RdfParserBase {
|
|||
protected void composeDecimal(Complex parent, String parentType, String name, DecimalType value, int index) {
|
||||
if (value == null)
|
||||
return;
|
||||
Complex t = parent.predicate("fhir:"+parentType+"."+name);
|
||||
Complex t = parent.predicate("fhir:"+name);
|
||||
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
|
||||
composeElement(t, parentType, name, value, index);
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ public class JavaParserRdfGenerator extends JavaBaseGenerator {
|
|||
composer.append(" if (Utilities.noString(parentType))\r\n");
|
||||
composer.append(" t = parent;\r\n");
|
||||
composer.append(" else {\r\n");
|
||||
composer.append(" t = parent.predicate(\"fhir:\"+parentType+'.'+name);\r\n");
|
||||
composer.append(" t = parent.predicate(\"fhir:\"+name);\r\n");
|
||||
composer.append(" }\r\n");
|
||||
composer.append(" compose"+ti.getAncestorName()+"(t, \""+ti.getDefn().getName()+"\", name, element, index);\r\n");
|
||||
if (tn.equals("Coding"))
|
||||
|
|
Loading…
Reference in New Issue