FIx build
This commit is contained in:
parent
4dfecbdc74
commit
403fe28bd8
|
@ -86,6 +86,7 @@ public class RuntimeChildChoiceDefinition extends BaseRuntimeDeclaredChildDefini
|
|||
|
||||
String elementName;
|
||||
BaseRuntimeElementDefinition<?> nextDef;
|
||||
boolean nonPreferred = false;
|
||||
if (IBaseResource.class.isAssignableFrom(next)) {
|
||||
elementName = getElementName() + StringUtils.capitalize(next.getSimpleName());
|
||||
List<Class<? extends IBaseResource>> types = new ArrayList<Class<? extends IBaseResource>>();
|
||||
|
@ -103,18 +104,21 @@ public class RuntimeChildChoiceDefinition extends BaseRuntimeDeclaredChildDefini
|
|||
IRuntimeDatatypeDefinition nextDefDatatype = (IRuntimeDatatypeDefinition) nextDef;
|
||||
if (nextDefDatatype.getProfileOf() != null) {
|
||||
/*
|
||||
* Elements which are called foo[x] and have a choice which is a profiled datatype
|
||||
* must use the unprofiled datatype as the element name. E.g. if foo[x] allows
|
||||
* markdown as a datatype, it calls the element fooString when encoded, because
|
||||
* markdown is a profile of string. This is according to the FHIR spec
|
||||
* Elements which are called foo[x] and have a choice which is a profiled datatype must use the
|
||||
* unprofiled datatype as the element name. E.g. if foo[x] allows markdown as a datatype, it calls the
|
||||
* element fooString when encoded, because markdown is a profile of string. This is according to the
|
||||
* FHIR spec
|
||||
*/
|
||||
nextDefForChoice = nextDefDatatype.getProfileOf();
|
||||
nonPreferred = true;
|
||||
}
|
||||
}
|
||||
elementName = getElementName() + StringUtils.capitalize(nextDefForChoice.getName());
|
||||
}
|
||||
|
||||
if (myNameToChildDefinition.containsKey(elementName) == false || !nonPreferred) {
|
||||
myNameToChildDefinition.put(elementName, nextDef);
|
||||
}
|
||||
|
||||
if (IBaseResource.class.isAssignableFrom(next)) {
|
||||
Class<? extends IBase> refType = theContext.getVersion().getResourceReferenceType();
|
||||
|
|
Loading…
Reference in New Issue