/**************************************************************************** * This software is part of the gCube Project. * Site: http://www.gcube-system.org/ **************************************************************************** * The gCube/gCore software is licensed as Free Open Source software * conveying to the EUPL (http://ec.europa.eu/idabc/eupl). * The software and documentation is provided by its authors/distributors * "as is" and no expressed or * implied warranty is given for its use, quality or fitness for a * particular case. **************************************************************************** * Filename: ReportBuilder.java **************************************************************************** * @author Daniele Strollo ***************************************************************************/ package org.gcube.resourcemanagement.support.server.managers.report; import java.util.List; import java.util.Vector; /** * @author Daniele Strollo (ISTI-CNR) * */ public class ReportBuilder { private List entries = null; public ReportBuilder() { entries = new Vector(); } public final void addEntry(final ReportEntry entry) { this.entries.add(entry); } public final int size() { return this.entries.size(); } public final String getXML() { StringBuilder builder = new StringBuilder(); builder.append("\n"); for (ReportEntry entry : this.entries) { builder.append(entry.toXML()); } builder.append("\n"); return builder.toString(); } @Override public final String toString() { return this.getXML(); } }