@@ -0,0 +1,1385 @@
+package org.tarent.cvio.server.doc;%0A%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.util.HashMap;%0A%0Aimport net.sf.jooreports.templates.DocumentTemplate;%0Aimport net.sf.jooreports.templates.DocumentTemplateException;%0Aimport net.sf.jooreports.templates.DocumentTemplateFactory;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A/**%0A * This class is used to generate an open-document file with all relevant%0A * data from cvio.%0A * %0A * @author Viktor Hamm%0A *%0A */%0Apublic class CVIODocumentGenerator %7B%0A%0A%09 /**%0A     * the logger.%0A     */%0A    private final Logger logger = LoggerFactory%0A            .getLogger(CVIODocumentGenerator.class);%0A%0A%09%0A%09/**%0A%09 * Generates a document with all cv data.%0A%09 * %0A%09 * @param dataModel - a %7B@link HashMap%7D data representation. %0A%09 */%0A%09public void generateDocument(HashMap%3CObject, Object%3E dataModel) %7B%0A%09%09DocumentTemplateFactory fac = new DocumentTemplateFactory();%0A%09%09logger.trace(%22generating cv document%22);%0A%09%09%0A%09%09try %7B%0A%09%09%09DocumentTemplate template = fac.getTemplate(new File(%22cv-template.odt%22));%0A%09%09%09template.createDocument(dataModel, new FileOutputStream(%22my-output.odt%22));%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09logger.error(%22error occured while creating the cv template%22, e.getMessage());%0A%09%09%7D catch (DocumentTemplateException e) %7B%0A%09%09%09logger.error(%22error occured while parsing the cv template%22, e.getMessage());%0A%09%09%7D%0A%09%7D%0A%7D%0A

add document generator