continue; extensions.add(new HeldExtension(next, false, theChildElem, theParent)); continue; modifierExtensions.add(new HeldExtension(next, true, theChildElem, theParent)); continue; extensions.add(new HeldExtension(next, false, theChildElem, theParent)); continue; modifierExtensions.add(new HeldExtension(next, true, theChildElem, theParent));
writeUndeclaredExtension(theResDef, theResource, theEventWriter, (IBaseExtension<?, ?>) next); managePrimitiveExtension(value, theResDef, theResource, theEventWriter, childDef, childName);
private void writeExtensionsAsDirectChild(IBaseResource theResource, JsonLikeWriter theEventWriter, RuntimeResourceDefinition resDef, List<HeldExtension> extensions, List<HeldExtension> modifierExtensions) throws IOException { if (extensions.isEmpty() == false) { beginArray(theEventWriter, "extension"); for (HeldExtension next : extensions) { next.write(resDef, theResource, theEventWriter); } theEventWriter.endArray(); } if (modifierExtensions.isEmpty() == false) { beginArray(theEventWriter, "modifierExtension"); for (HeldExtension next : modifierExtensions) { next.write(resDef, theResource, theEventWriter); } theEventWriter.endArray(); } }
writeUndeclaredExtension(theResDef, theResource, theEventWriter, (IBaseExtension<?, ?>) next, theEncodeContext); managePrimitiveExtension(value, theResDef, theResource, theEventWriter, childDef, childName, theEncodeContext);
continue; extensions.add(new HeldExtension(next, false, theChildElem, theParent)); continue; modifierExtensions.add(new HeldExtension(next, true, theChildElem, theParent)); continue; extensions.add(new HeldExtension(next, false, theChildElem, theParent)); continue; modifierExtensions.add(new HeldExtension(next, true, theChildElem, theParent));
public void write(RuntimeResourceDefinition theResDef, IBaseResource theResource, JsonLikeWriter theEventWriter, EncodeContext theEncodeContext) throws IOException { if (myUndeclaredExtension != null) { writeUndeclaredExtension(theResDef, theResource, theEventWriter, myUndeclaredExtension, theEncodeContext); } else { theEventWriter.beginObject(); String childName = myDef.getChildNameByDatatype(myValue.getClass()); encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, myValue, def, childName, false, myParent, false, theEncodeContext); managePrimitiveExtension(myValue, theResDef, theResource, theEventWriter, def, childName, theEncodeContext);
private void extractDeclaredExtensions(IBase theResource, BaseRuntimeElementDefinition<?> resDef, List<HeldExtension> extensions, List<HeldExtension> modifierExtensions, CompositeChildElement theChildElem) { for (RuntimeChildDeclaredExtensionDefinition nextDef : resDef.getExtensionsNonModifier()) { for (IBase nextValue : nextDef.getAccessor().getValues(theResource)) { if (nextValue != null) { if (nextValue.isEmpty()) { continue; } extensions.add(new HeldExtension(nextDef, nextValue, theChildElem)); } } } for (RuntimeChildDeclaredExtensionDefinition nextDef : resDef.getExtensionsModifier()) { for (IBase nextValue : nextDef.getAccessor().getValues(theResource)) { if (nextValue != null) { if (nextValue.isEmpty()) { continue; } modifierExtensions.add(new HeldExtension(nextDef, nextValue, theChildElem)); } } } }
private void writeExtensionsAsDirectChild(IBaseResource theResource, JsonLikeWriter theEventWriter, RuntimeResourceDefinition resDef, List<HeldExtension> extensions, List<HeldExtension> modifierExtensions, EncodeContext theEncodeContext) throws IOException { if (extensions.isEmpty() == false) { beginArray(theEventWriter, "extension"); for (HeldExtension next : extensions) { next.write(resDef, theResource, theEventWriter, theEncodeContext); } theEventWriter.endArray(); } if (modifierExtensions.isEmpty() == false) { beginArray(theEventWriter, "modifierExtension"); for (HeldExtension next : modifierExtensions) { next.write(resDef, theResource, theEventWriter, theEncodeContext); } theEventWriter.endArray(); } }
private boolean addToHeldExtensions(int valueIdx, List<? extends IBaseExtension<?, ?>> ext, ArrayList<ArrayList<HeldExtension>> list, boolean theIsModifier, CompositeChildElement theChildElem, CompositeChildElement theParent) { if (ext.size() > 0) { list.ensureCapacity(valueIdx); while (list.size() <= valueIdx) { list.add(null); } if (list.get(valueIdx) == null) { list.set(valueIdx, new ArrayList<JsonParser.HeldExtension>()); } for (IBaseExtension<?, ?> next : ext) { list.get(valueIdx).add(new HeldExtension(next, theIsModifier, theChildElem, theParent)); } return true; } return false; }
public void write(RuntimeResourceDefinition theResDef, IBaseResource theResource, JsonLikeWriter theEventWriter) throws IOException { if (myUndeclaredExtension != null) { writeUndeclaredExtension(theResDef, theResource, theEventWriter, myUndeclaredExtension); } else { theEventWriter.beginObject(); String childName = myDef.getChildNameByDatatype(myValue.getClass()); encodeChildElementToStreamWriter(theResDef, theResource, theEventWriter, myValue, def, childName, false, false, myParent, false); managePrimitiveExtension(myValue, theResDef, theResource, theEventWriter, def, childName);
private void extractDeclaredExtensions(IBase theResource, BaseRuntimeElementDefinition<?> resDef, List<HeldExtension> extensions, List<HeldExtension> modifierExtensions, CompositeChildElement theChildElem) { for (RuntimeChildDeclaredExtensionDefinition nextDef : resDef.getExtensionsNonModifier()) { for (IBase nextValue : nextDef.getAccessor().getValues(theResource)) { if (nextValue != null) { if (nextValue.isEmpty()) { continue; } extensions.add(new HeldExtension(nextDef, nextValue, theChildElem)); } } } for (RuntimeChildDeclaredExtensionDefinition nextDef : resDef.getExtensionsModifier()) { for (IBase nextValue : nextDef.getAccessor().getValues(theResource)) { if (nextValue != null) { if (nextValue.isEmpty()) { continue; } modifierExtensions.add(new HeldExtension(nextDef, nextValue, theChildElem)); } } } }
private boolean addToHeldExtensions(int valueIdx, List<? extends IBaseExtension<?, ?>> ext, ArrayList<ArrayList<HeldExtension>> list, boolean theIsModifier, CompositeChildElement theChildElem, CompositeChildElement theParent) { if (ext.size() > 0) { list.ensureCapacity(valueIdx); while (list.size() <= valueIdx) { list.add(null); } if (list.get(valueIdx) == null) { list.set(valueIdx, new ArrayList<JsonParser.HeldExtension>()); } for (IBaseExtension<?, ?> next : ext) { list.get(valueIdx).add(new HeldExtension(next, theIsModifier, theChildElem, theParent)); } return true; } return false; }