Project

General

Profile

« Previous | Next » 

Revision 57758

#4961: ensure we properly build XML records of projects and orgs with summary and budget information

View differences:

XmlRecordFactory.java
544 544
			if (fd.getFullName().equals("eu.dnetlib.data.proto.OafEntity.type")) return;
545 545
			metadata.add(asXmlElement(fd.getName(), ((EnumValueDescriptor) o).getName(), null, null));
546 546
		} else {
547
			metadata.add(asXmlElement(fd.getName(), o.toString(), null, null));
547
			if(fd.getType().equals(FieldDescriptor.Type.FLOAT)){
548
				metadata.add(asXmlElement(fd.getName(), String.format ("%.2f", ((Float) o)), null, null));
549
			} else {
550
				metadata.add(asXmlElement(fd.getName(), o.toString(), null, null));
551
			}
548 552
		}
549 553
	}
550 554

  

Also available in: Unified diff