changeset 110:484be3266e54

omit empty attributes in XML dump.
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Thu, 08 Aug 2019 19:13:29 +0200
parents 8013b12cecf7
children 71465cead59c
files src/main/java/org/mpi/openmind/repository/utils/OM4StreamWriter.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/org/mpi/openmind/repository/utils/OM4StreamWriter.java	Wed Jul 17 16:51:16 2019 +0200
+++ b/src/main/java/org/mpi/openmind/repository/utils/OM4StreamWriter.java	Thu Aug 08 19:13:29 2019 +0200
@@ -331,6 +331,8 @@
         if (entity.getAttributes().size() > 0) {
             writer.writeStartElement(XMLUtil.ATTRIBUTES);
             for (Attribute att : entity.getAttributes()) {
+            	// skip empty attributes
+            	if (StringUtils.isEmpty(att.getValue())) continue;
                 // update stats
                 updateAttStats(att, attStats);
                 // write xml