|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.model.DataBookUtil
public final class DataBookUtil
The DataBookUtil
handles simple access to databooks. It allows export/import of
data.
Method Summary | |
---|---|
static String |
formatCSVFileName(String pName)
Formats a name as filename for a csv export. |
static void |
writeCSV(IDataBook pBook,
OutputStream pStream,
String[] pColumnNames,
String[] pLabels,
ICondition pFilter,
SortDefinition pSort)
Writes all rows and values of a databook, as comma separated values to a stream. |
static void |
writeCSV(IDataBook pBook,
OutputStream pStream,
String[] pColumnNames,
String[] pLabels,
ICondition pFilter,
SortDefinition pSort,
String pSeparator)
Writes all rows and values of a databook, as comma separated values to a stream. |
static void |
writeQuoted(OutputStreamWriter pStream,
IDataType pDataType,
Object pValue,
String pSeparator)
Writes an object as quoted string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void writeCSV(IDataBook pBook, OutputStream pStream, String[] pColumnNames, String[] pLabels, ICondition pFilter, SortDefinition pSort) throws ModelException, IOException
pBook
- the databookpStream
- the output streampColumnNames
- specific column names or null
to use the
column names from the current
ColumnView
pLabels
- the preferred column labelspFilter
- the export filterpSort
- the export sort definition
ModelException
- if the access to rows or values of the databook
failes
IOException
- if an error occurs during writingpublic static void writeCSV(IDataBook pBook, OutputStream pStream, String[] pColumnNames, String[] pLabels, ICondition pFilter, SortDefinition pSort, String pSeparator) throws ModelException, IOException
pBook
- the databookpStream
- the output streampColumnNames
- specific column names or null
to use the column names
from the current ColumnView
pLabels
- the preferred column labelspFilter
- the export filterpSort
- the export sort definitionpSeparator
- the list separator
ModelException
- if the access to rows or values of the databook failes
IOException
- if an error occurs during writingpublic static String formatCSVFileName(String pName)
pName
- a databook name or filename. Predefined extensions will be re-used.
pName
is null
then
Export.csv
is used.public static void writeQuoted(OutputStreamWriter pStream, IDataType pDataType, Object pValue, String pSeparator) throws IOException
pStream
- the output streampDataType
- the datatype for the given valuepValue
- the valuepSeparator
- the column separator
IOException
- if a write error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |