com.jalios.jcms.stat
Class XmlRawDataExportHandler

java.lang.Object
  extended by com.jalios.jcms.stat.RawDataExportHandler
      extended by com.jalios.jcms.stat.XmlRawDataExportHandler
All Implemented Interfaces:
Cloneable

public class XmlRawDataExportHandler
extends RawDataExportHandler

Export data to XML format

Author:
Ludovic SMADJA

Field Summary
 
Fields inherited from class com.jalios.jcms.stat.RawDataExportHandler
key, out, realOutput, REVISION, useCompressStream, userLang
 
Constructor Summary
XmlRawDataExportHandler()
           
 
Method Summary
 String convertField(String name, Class<?> clazz, Set<?> valueSet, String extraFieldName, String userLang)
          convert field to handler data
 List<String> duplicateHeader(String string, Class<?> clazz)
          indicate if a field have other representation (like member have id and also a name)
 void end(OutputStream out)
          Process end of export (after any write)
 void exportFooter(OutputStream out, String[] columnNames)
          export footer of data
 void exportHeader(OutputStream out, String[] columnNames)
          Export header of data
 void exportLine(OutputStream out, String[] columnNames)
          Export a line of data
 String getConfigurationFragmentPath()
          indicates the path of the jsp fragment with driver configuration fields
 String getContentType()
           
 String getFileExtension()
           
 void init(OutputStream out)
          Initialise the handler (before any write)
 
Methods inherited from class com.jalios.jcms.stat.RawDataExportHandler
clone, getKey, getOut, getUserLang, isUseCompressStream, setKey, setOut, setParameters, setUseCompressStream, setUserLang, validateParameters
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRawDataExportHandler

public XmlRawDataExportHandler()
Method Detail

convertField

public String convertField(String name,
                           Class<?> clazz,
                           Set<?> valueSet,
                           String extraFieldName,
                           String userLang)
Description copied from class: RawDataExportHandler
convert field to handler data

Specified by:
convertField in class RawDataExportHandler
Parameters:
name - the name of the field (see StatEntry.STAT_FIELDS)
clazz - the class of the field (see StatEntry.STAT_FIELDS_CLASS)
valueSet - the Set of value
extraFieldName - the duplicate field name if used
userLang - the current language
Returns:
the converted value to export

duplicateHeader

public List<String> duplicateHeader(String string,
                                    Class<?> clazz)
Description copied from class: RawDataExportHandler
indicate if a field have other representation (like member have id and also a name)

Specified by:
duplicateHeader in class RawDataExportHandler
Parameters:
string - the name of the field (see StatEntry.STAT_FIELDS)
clazz - the class of the field (see StatEntry.STAT_FIELDS_CLASS)
Returns:
the List of other representation name

init

public void init(OutputStream out)
          throws IOException
Description copied from class: RawDataExportHandler
Initialise the handler (before any write)

Specified by:
init in class RawDataExportHandler
Parameters:
out - outputstream associated to this handler
Throws:
IOException

exportFooter

public void exportFooter(OutputStream out,
                         String[] columnNames)
                  throws IOException
Description copied from class: RawDataExportHandler
export footer of data

Specified by:
exportFooter in class RawDataExportHandler
Parameters:
out - outputstream associated to this handler
columnNames - footer data
Throws:
IOException

exportHeader

public void exportHeader(OutputStream out,
                         String[] columnNames)
                  throws IOException
Description copied from class: RawDataExportHandler
Export header of data

Specified by:
exportHeader in class RawDataExportHandler
Parameters:
out - outputstream associated to this handler
columnNames - the names of columns
Throws:
IOException

exportLine

public void exportLine(OutputStream out,
                       String[] columnNames)
                throws IOException
Description copied from class: RawDataExportHandler
Export a line of data

Specified by:
exportLine in class RawDataExportHandler
Parameters:
out - outputstream associated to this handler
columnNames - the data array
Throws:
IOException

getConfigurationFragmentPath

public String getConfigurationFragmentPath()
Description copied from class: RawDataExportHandler
indicates the path of the jsp fragment with driver configuration fields

Specified by:
getConfigurationFragmentPath in class RawDataExportHandler
Returns:
the fragment path

end

public void end(OutputStream out)
         throws IOException
Description copied from class: RawDataExportHandler
Process end of export (after any write)

Specified by:
end in class RawDataExportHandler
Parameters:
out - outputstream associated to this handler
Throws:
IOException

getFileExtension

public String getFileExtension()
Specified by:
getFileExtension in class RawDataExportHandler
Returns:
the file extension of generated file

getContentType

public String getContentType()
Specified by:
getContentType in class RawDataExportHandler
Returns:
the content type of the generated file


Copyright © 2001-2010 Jalios SA. All Rights Reserved.