fr.opensagres.xdocreport.document.dump
Class DumpHelper

java.lang.Object
  extended by fr.opensagres.xdocreport.document.dump.DumpHelper

public class DumpHelper
extends Object

Dump helper.


Field Summary
static String JAVA_MAIN_DUMP_TEMPLATE
           
 
Constructor Summary
DumpHelper()
           
 
Method Summary
static IContext createDumpContext(IXDocReport report, ITemplateEngine templateEngine, DumperOptions option)
           
static void generate(ITemplateEngine templateEngine, String templateName, IContext dumpContext, OutputStream out)
           
static void generateDocumentEntry(IXDocReport report, InputStream documentIn, IContext dumpContext, String src, File baseDir, ZipOutputStream out)
           
static void generateDocumentFile(IXDocReport report, InputStream documentIn, IContext dumpContext, File srcDir)
           
static void generateDocumentZipEntry(IXDocReport report, InputStream documentIn, IContext dumpContext, ZipOutputStream out, String src)
           
static void generateEntry(ITemplateEngine templateEngine, String templateName, IContext dumpContext, String entryName, File baseDir, ZipOutputStream out)
           
static void generateFieldsMetadataEntry(IXDocReport report, IContext dumpContext, String resourcesSrcPath, File baseDir, ZipOutputStream out)
           
static void generateFieldsMetadataFile(IXDocReport report, IContext dumpContext, File srcDir)
           
static void generateFieldsMetadataZipEntry(IXDocReport report, IContext dumpContext, ZipOutputStream out, String src)
           
static void generateFile(ITemplateEngine templateEngine, String templateName, IContext dumpContext, File javaFile)
           
static void generateJSONEntry(IXDocReport report, IContext context, boolean upperCaseFirstChar, IContext dumpContext, String resourcesSrcPath, File baseDir, ZipOutputStream out)
           
static void generateJSONFile(IXDocReport report, IContext context, boolean upperCaseFirstChar, IContext dumpContext, File srcDir)
           
static void generateJSONZipEntry(IXDocReport report, IContext context, boolean upperCaseFirstChar, IContext dumpContext, ZipOutputStream out, String src)
           
static void generateZipEntry(ITemplateEngine templateEngine, String templateName, IContext dumpContext, String entryName, ZipOutputStream out)
           
static String getClassName(IXDocReport report)
           
static String getClassNameFile(IContext dumpContext)
           
static InputStream getDocument(IXDocReport report)
           
static String getJSONFileName(IXDocReport report, IContext dumpContext)
           
static String toDocumentAsBinary64(IXDocReport report)
           
static String toJSON(IContext context, boolean upperCaseFirstChar)
           
static String toJSON(IContext context, boolean upperCaseFirstChar, boolean formatAsJavaString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_MAIN_DUMP_TEMPLATE

public static final String JAVA_MAIN_DUMP_TEMPLATE
See Also:
Constant Field Values
Constructor Detail

DumpHelper

public DumpHelper()
Method Detail

toDocumentAsBinary64

public static String toDocumentAsBinary64(IXDocReport report)
                                   throws IOException
Parameters:
report -
Returns:
Throws:
IOException

getDocument

public static InputStream getDocument(IXDocReport report)
                               throws IOException
Throws:
IOException

generateDocumentEntry

public static void generateDocumentEntry(IXDocReport report,
                                         InputStream documentIn,
                                         IContext dumpContext,
                                         String src,
                                         File baseDir,
                                         ZipOutputStream out)
                                  throws IOException
Throws:
IOException

generateDocumentFile

public static void generateDocumentFile(IXDocReport report,
                                        InputStream documentIn,
                                        IContext dumpContext,
                                        File srcDir)
                                 throws FileNotFoundException,
                                        IOException
Throws:
FileNotFoundException
IOException

generateDocumentZipEntry

public static void generateDocumentZipEntry(IXDocReport report,
                                            InputStream documentIn,
                                            IContext dumpContext,
                                            ZipOutputStream out,
                                            String src)
                                     throws IOException
Throws:
IOException

getClassName

public static String getClassName(IXDocReport report)

getClassNameFile

public static String getClassNameFile(IContext dumpContext)

toJSON

public static String toJSON(IContext context,
                            boolean upperCaseFirstChar)

toJSON

public static String toJSON(IContext context,
                            boolean upperCaseFirstChar,
                            boolean formatAsJavaString)

generateJSONEntry

public static void generateJSONEntry(IXDocReport report,
                                     IContext context,
                                     boolean upperCaseFirstChar,
                                     IContext dumpContext,
                                     String resourcesSrcPath,
                                     File baseDir,
                                     ZipOutputStream out)
                              throws IOException
Throws:
IOException

generateJSONFile

public static void generateJSONFile(IXDocReport report,
                                    IContext context,
                                    boolean upperCaseFirstChar,
                                    IContext dumpContext,
                                    File srcDir)
                             throws IOException
Throws:
IOException

generateJSONZipEntry

public static void generateJSONZipEntry(IXDocReport report,
                                        IContext context,
                                        boolean upperCaseFirstChar,
                                        IContext dumpContext,
                                        ZipOutputStream out,
                                        String src)
                                 throws IOException
Throws:
IOException

getJSONFileName

public static String getJSONFileName(IXDocReport report,
                                     IContext dumpContext)

generateFieldsMetadataEntry

public static void generateFieldsMetadataEntry(IXDocReport report,
                                               IContext dumpContext,
                                               String resourcesSrcPath,
                                               File baseDir,
                                               ZipOutputStream out)
                                        throws IOException
Throws:
IOException

generateFieldsMetadataFile

public static void generateFieldsMetadataFile(IXDocReport report,
                                              IContext dumpContext,
                                              File srcDir)
                                       throws IOException
Throws:
IOException

generateFieldsMetadataZipEntry

public static void generateFieldsMetadataZipEntry(IXDocReport report,
                                                  IContext dumpContext,
                                                  ZipOutputStream out,
                                                  String src)
                                           throws IOException
Throws:
IOException

createDumpContext

public static IContext createDumpContext(IXDocReport report,
                                         ITemplateEngine templateEngine,
                                         DumperOptions option)
                                  throws IOException
Throws:
IOException

generate

public static void generate(ITemplateEngine templateEngine,
                            String templateName,
                            IContext dumpContext,
                            OutputStream out)
                     throws IOException,
                            XDocReportException
Throws:
IOException
XDocReportException

generateFile

public static void generateFile(ITemplateEngine templateEngine,
                                String templateName,
                                IContext dumpContext,
                                File javaFile)
                         throws IOException,
                                XDocReportException
Throws:
IOException
XDocReportException

generateZipEntry

public static void generateZipEntry(ITemplateEngine templateEngine,
                                    String templateName,
                                    IContext dumpContext,
                                    String entryName,
                                    ZipOutputStream out)
                             throws IOException,
                                    XDocReportException
Throws:
IOException
XDocReportException

generateEntry

public static void generateEntry(ITemplateEngine templateEngine,
                                 String templateName,
                                 IContext dumpContext,
                                 String entryName,
                                 File baseDir,
                                 ZipOutputStream out)
                          throws IOException,
                                 XDocReportException
Throws:
IOException
XDocReportException


Copyright © 2013. All rights reserved.