protected boolean isChildContained(BaseRuntimeElementDefinition<?> childDef, boolean theIncludedResource) { return (childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES || childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCE_LIST) && getContainedResources().isEmpty() == false && theIncludedResource == false; }
private void managePrimitiveExtension(final IBase theValue, final RuntimeResourceDefinition theResDef, final IBaseResource theResource, final JsonLikeWriter theEventWriter, final BaseRuntimeElementDefinition<?> def, final String childName) throws IOException { if (def.getChildType().equals(ID_DATATYPE) || def.getChildType().equals(PRIMITIVE_DATATYPE)) { final List<HeldExtension> extensions = new ArrayList<HeldExtension>(0); final List<HeldExtension> modifierExtensions = new ArrayList<HeldExtension>(0); // Undeclared extensions extractUndeclaredExtensions(theValue, extensions, modifierExtensions, myParent, null); // Declared extensions if (def != null) { extractDeclaredExtensions(theValue, def, extensions, modifierExtensions, myParent); } boolean haveContent = false; if (!extensions.isEmpty() || !modifierExtensions.isEmpty()) { haveContent = true; } if (haveContent) { beginObject(theEventWriter, '_' + childName); writeExtensionsAsDirectChild(theResource, theEventWriter, theResDef, extensions, modifierExtensions); theEventWriter.endObject(); } } }
switch (theDefinition.getChildType()) { case ID_DATATYPE: case PRIMITIVE_XHTML_HL7ORG: throw new IllegalStateException("state should not happen: " + theDefinition.getChildType());
if (def.getChildType() == ChildTypeEnum.RESOURCE_BLOCK) { extractAndWriteExtensionsAsDirectChild(myValue, theEventWriter, def, theResDef, theResource, myChildElem, null); } else {
if (def.getChildType() == ChildTypeEnum.CONTAINED_RESOURCE_LIST) { def = myContext.getElementDefinition(theElement.getClass()); switch (def.getChildType()) { case ID_DATATYPE: case PRIMITIVE_XHTML_HL7ORG: case EXTENSION_DECLARED: case UNDECL_EXT: { throw new IllegalStateException("state should not happen: " + def.getChildType());
switch (childDef.getChildType()) { case ID_DATATYPE: { IIdType value = IIdType.class.cast(theElement);
boolean primitive = childDef.getChildType() == ChildTypeEnum.PRIMITIVE_DATATYPE; if ((childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES || childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCE_LIST) && theContainedResource) { continue;
boolean theForceEmpty) throws IOException { switch (theChildDef.getChildType()) { case ID_DATATYPE: { IIdType value = (IIdType) theNextValue; case UNDECL_EXT: default: throw new IllegalStateException("Should not have this state here: " + theChildDef.getChildType().name());
protected boolean isChildContained(BaseRuntimeElementDefinition<?> childDef, boolean theIncludedResource) { return (childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES || childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCE_LIST) && getContainedResources().isEmpty() == false && theIncludedResource == false; }
private void managePrimitiveExtension(final IBase theValue, final RuntimeResourceDefinition theResDef, final IBaseResource theResource, final JsonLikeWriter theEventWriter, final BaseRuntimeElementDefinition<?> def, final String childName, EncodeContext theEncodeContext) throws IOException { if (def.getChildType().equals(ID_DATATYPE) || def.getChildType().equals(PRIMITIVE_DATATYPE)) { final List<HeldExtension> extensions = new ArrayList<HeldExtension>(0); final List<HeldExtension> modifierExtensions = new ArrayList<HeldExtension>(0); // Undeclared extensions extractUndeclaredExtensions(theValue, extensions, modifierExtensions, myParent, null); // Declared extensions if (def != null) { extractDeclaredExtensions(theValue, def, extensions, modifierExtensions, myParent); } boolean haveContent = false; if (!extensions.isEmpty() || !modifierExtensions.isEmpty()) { haveContent = true; } if (haveContent) { beginObject(theEventWriter, '_' + childName); writeExtensionsAsDirectChild(theResource, theEventWriter, theResDef, extensions, modifierExtensions, theEncodeContext); theEventWriter.endObject(); } } }
switch (theDefinition.getChildType()) { case ID_DATATYPE: case PRIMITIVE_XHTML_HL7ORG: throw new IllegalStateException("state should not happen: " + theDefinition.getChildType());
if (def.getChildType() == ChildTypeEnum.RESOURCE_BLOCK) { extractAndWriteExtensionsAsDirectChild(myValue, theEventWriter, def, theResDef, theResource, myChildElem, null, theEncodeContext); } else {
if (def.getChildType() == ChildTypeEnum.CONTAINED_RESOURCE_LIST) { def = myContext.getElementDefinition(theElement.getClass()); switch (def.getChildType()) { case ID_DATATYPE: case PRIMITIVE_XHTML_HL7ORG: case EXTENSION_DECLARED: case UNDECL_EXT: { throw new IllegalStateException("state should not happen: " + def.getChildType());
switch (childDef.getChildType()) { case ID_DATATYPE: { IIdType value = IIdType.class.cast(theElement);
boolean primitive = childDef.getChildType() == ChildTypeEnum.PRIMITIVE_DATATYPE; if ((childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES || childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCE_LIST) && theContainedResource) { continue;
fillExtensions(theStruct, path, def.getExtensionsModifier(), "modifierExtension", true); if (def.getChildType() == ChildTypeEnum.RESOURCE) { StructureElement narrative = theStruct.addElement(); narrative.setName("text");
boolean theForceEmpty, EncodeContext theEncodeContext) throws IOException { switch (theChildDef.getChildType()) { case ID_DATATYPE: { IIdType value = (IIdType) theNextValue; case UNDECL_EXT: default: throw new IllegalStateException("Should not have this state here: " + theChildDef.getChildType().name());