org.opencrx.kernel.backend
Class Exporter

java.lang.Object
  extended by org.opencrx.kernel.backend.AbstractImpl
      extended by org.opencrx.kernel.backend.Exporter

public class Exporter
extends AbstractImpl


Nested Class Summary
static class Exporter.ExportParams
           
static class Exporter.TraversedObject
           
 
Field Summary
static String FILE_EXT_BIN
           
static String FILE_EXT_XLS
           
static String FILE_EXT_XML
           
static String FILE_EXT_ZIP
           
protected static int MAX_LEVELS
           
static String MIME_TYPE_EXCEL
           
static String MIME_TYPE_XML
           
 
Constructor Summary
protected Exporter()
           
 
Method Summary
 void exportItem(OutputStream out, PrintStream ps, List<Exporter.TraversedObject> startPoints, List<Exporter.TraversedObject> allExportedObjects, List<Exporter.TraversedObject> allReferencedObjects, Exporter.ExportParams params)
           
 Object[] exportItem(RefObject_1_0 object, ExportProfile exportProfile, String referenceFilter, String itemMimeType)
          Export object according to the given export profile and itemMimeType.
protected  Collection<?> getContent(Exporter.TraversedObject object, String referenceName)
           
static Exporter getInstance()
           
static void register()
           
 
Methods inherited from class org.opencrx.kernel.backend.AbstractImpl
getInstance, getUidAsString, registerImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIME_TYPE_XML

public static final String MIME_TYPE_XML
See Also:
Constant Field Values

MIME_TYPE_EXCEL

public static final String MIME_TYPE_EXCEL
See Also:
Constant Field Values

FILE_EXT_XLS

public static final String FILE_EXT_XLS
See Also:
Constant Field Values

FILE_EXT_XML

public static final String FILE_EXT_XML
See Also:
Constant Field Values

FILE_EXT_BIN

public static final String FILE_EXT_BIN
See Also:
Constant Field Values

FILE_EXT_ZIP

public static final String FILE_EXT_ZIP
See Also:
Constant Field Values

MAX_LEVELS

protected static final int MAX_LEVELS
See Also:
Constant Field Values
Constructor Detail

Exporter

protected Exporter()
Method Detail

register

public static void register()

getInstance

public static Exporter getInstance()
                            throws ServiceException
Throws:
ServiceException

exportItem

public void exportItem(OutputStream out,
                       PrintStream ps,
                       List<Exporter.TraversedObject> startPoints,
                       List<Exporter.TraversedObject> allExportedObjects,
                       List<Exporter.TraversedObject> allReferencedObjects,
                       Exporter.ExportParams params)
                throws IOException,
                       ServiceException
Throws:
IOException
ServiceException

exportItem

public Object[] exportItem(RefObject_1_0 object,
                           ExportProfile exportProfile,
                           String referenceFilter,
                           String itemMimeType)
                    throws ServiceException
Export object according to the given export profile and itemMimeType. The default implementation allows to export objects in the format text/xml or application/x-excel. The default implementation recursively walks the object (composites and references objects) according to the reference filter. Override this method for custom-specific export and rendering of objects. E.g. a custom-specific implementation could work as follows:

Throws:
ServiceException

getContent

protected Collection<?> getContent(Exporter.TraversedObject object,
                                   String referenceName)


This software is published under the BSD license. Copyright © 2003-2012, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.