for (OpenEngSBModelEntry entry : model.toOpenEngSBModelEntries()) {
if (entry.getValue() == null) {
continue;
} else if (entry.getType().equals(FileWrapper.class)) {
try {
FileWrapper wrapper = (FileWrapper) entry.getValue();
String content = Base64.encodeBase64String(wrapper.getContent());
object.putEDBObjectEntry(entry.getKey(), content, String.class);
object.putEDBObjectEntry(entry.getKey() + FILEWRAPPER_FILENAME_SUFFIX,
wrapper.getFilename(), String.class);
} catch (IOException e) {
LOGGER.error(e.getMessage());
}
} else if (OpenEngSBModel.class.isAssignableFrom(entry.getType())) {
OpenEngSBModel temp = (OpenEngSBModel) entry.getValue();