package testgenerator; /** * @author Stevie (Admin) * * To change this generated comment edit the template variable "typecomment": * Window>Preferences>Java>Templates. * To enable and disable the creation of type comments go to * Window>Preferences>Java>Code Generation. */ public class Supplement { private String supplement; /** * Constructor for Supplement. */ public Supplement() { supplement = " <SupplementProfile>\n"; } public void addMetaInfo(String mimeType, String description) { supplement += " <MetaInfo>\n" + " <MimeType>" + mimeType + "</MimeType>"; if (!(description==null)) { supplement+= " <Description>" + description + "</Description>"; } supplement+= " </MetaInfo>"; } public void addBase64Content(String fileName, String data) { supplement+= " <Content Reference=\"" + fileName + "\">\n"+ " <Base64Content>"+data+"</Base64Content>\n" + " </Content>\n"; } public void addXMLContent(String fileName, String data) { supplement+= " <Content Reference=\"" + fileName + "\">\n"+ " <XMLContent xml:space=\"preserve\">"+data+"</XMLContent>\n" + " </Content>\n"; } public void closeSupplement() { supplement+= " </SupplementProfile>\n"; } public String getSupplement() { return supplement; } }