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