Additional fixes for list output.

This commit is contained in:
Jim Balhoff 2022-09-15 12:44:45 -04:00
parent 41d23ed56f
commit ee7f148424
1 changed files with 42 additions and 42 deletions

View File

@ -29,8 +29,8 @@ 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:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
decorateCode(t, value);
}
@ -39,24 +39,24 @@ 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:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeDateTime(Complex parent, String parentType, String name, DateTimeType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeCode(Complex parent, String parentType, String name, CodeType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
decorateCode(t, value);
}
@ -64,136 +64,136 @@ 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:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeInteger(Complex parent, String parentType, String name, IntegerType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeInteger64(Complex parent, String parentType, String name, Integer64Type value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name), index > -1;
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeOid(Complex parent, String parentType, String name, OidType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeCanonical(Complex parent, String parentType, String name, CanonicalType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeUri(Complex parent, String parentType, String name, UriType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeUuid(Complex parent, String parentType, String name, UuidType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeUrl(Complex parent, String parentType, String name, UrlType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeInstant(Complex parent, String parentType, String name, InstantType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeBoolean(Complex parent, String parentType, String name, BooleanType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeBase64Binary(Complex parent, String parentType, String name, Base64BinaryType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeUnsignedInt(Complex parent, String parentType, String name, UnsignedIntType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeMarkdown(Complex parent, String parentType, String name, MarkdownType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeTime(Complex parent, String parentType, String name, TimeType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeId(Complex parent, String parentType, String name, IdType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composePositiveInt(Complex parent, String parentType, String name, PositiveIntType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}
protected void composeDecimal(Complex parent, String parentType, String name, DecimalType value, int index) {
if (value == null)
return;
Complex t = parent.predicate("fhir:"+name);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()));
Complex t = parent.predicate("fhir:"+name, index > -1);
t.predicate("fhir:v", ttlLiteral(value.asStringValue()), false);
composeElement(t, parentType, name, value, index);
}