|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.report.io.BaseFormatter
inetsoft.report.io.DelimitedFormatter
public class DelimitedFormatter
Converting a report to a delimited text file. Only table data is exported. All other report elements are ignored. By default cell values are separated by comma. The delimiter can be changed by calling setDelimiter(). An optional quote can be added around the values by calling setQuote().
| Field Summary | |
|---|---|
protected boolean |
allColumns
|
protected String |
delim
|
protected boolean |
keepHeader
|
protected OutputStream |
output
|
protected String |
quote
|
protected ReportSheet |
sheet
|
protected PrintWriter |
writer
|
| Fields inherited from class inetsoft.report.io.BaseFormatter |
|---|
docInfo, report |
| Constructor Summary | |
|---|---|
DelimitedFormatter(OutputStream output)
Create a report formatter. |
|
| Method Summary | |
|---|---|
void |
end()
Write the end of report. |
protected void |
endCell()
End a cell. |
protected void |
endGrid()
End the layout grid. |
void |
endHeader()
End a header section. |
protected void |
endRow()
End a row. |
String |
getDelimiter()
Get the cell value delimiter. |
String |
getQuote()
Get the quote string. |
boolean |
isKeepHeader()
Get the keepHeader value. |
void |
prolog(ReportSheet sheet)
Write the prolog of report. |
void |
setDelimiter(String delim)
Set the delimiter string between cell values. |
void |
setKeepHeader(boolean keepHeader)
Set the keepHeader values. |
void |
setQuote(String quote)
Set the quote around values. |
protected void |
startCell(TabularSheet sheet,
int r,
int c,
Object bg,
Insets borders,
Color bcolor,
Rectangle span,
String width,
boolean repeat)
Start a new cell. |
protected void |
startGrid(int rows,
int cols)
Start a layout grid (for tabular layout). |
void |
startHeader(int type)
Start a header section. |
void |
startHeader(String eid,
boolean header)
Start a header selection for element associated header/footer. |
protected void |
startRow(TabularSheet sheet,
int row)
Start a new row. |
protected static String |
toString(Object obj)
|
void |
write(AreaBreakElement elem)
Write the area break element. |
void |
write(BeanElement elem)
Write the bean element. |
void |
write(ChartElement elem)
Write the chart element. |
void |
write(CompositeElement elem)
Write the composite element. |
void |
write(CondPageBreakElement elem)
Write the conditional page break element. |
void |
write(FormElement elem)
Write the form element. |
void |
write(HeadingElement elem)
Write the heading text element. |
void |
write(NewlineElement elem)
Write the newline element. |
void |
write(PageBreakElement elem)
Write the page break element. |
void |
write(PageLayoutElement elem)
Write the page layout element. |
void |
write(PainterElement elem)
Write the painter element. |
void |
write(SectionElement elem)
Write the section element. |
void |
write(SeparatorElement elem)
Write the separator element. |
void |
write(SpaceElement elem)
Write the space element. |
void |
write(TabElement elem)
Write the tab element. |
void |
write(TableElement elem)
Write the table element. |
void |
write(TextBoxElement elem)
Write the text box element. |
void |
write(TextElement elem)
Write the text element. |
void |
write(TOCElement elem)
Write the TOC element. |
void |
write(inetsoft.report.style.XTableStyle style)
Write embedded table style. |
protected void |
writeElementContents(ReportElement elem,
ReportSheet sheet)
Export a element content object. |
protected void |
writeSectionBand(SectionBand band)
Print one band. |
protected void |
writeShapes(PageLayout.Shape[] shapes)
Write the pagelayout shapes specifications. |
protected void |
writeWarnings(ReportElement elem,
ReportSheet sheet)
Write warning messages. |
| Methods inherited from class inetsoft.report.io.BaseFormatter |
|---|
addProgressListener, escape, fireProgressEvent, init, localize, removeProgressListener, setDocumentInfo, write, write, write, write, writeBeanPropertyDefinition, writeContents, writeContents, writeContents, writeSection, writeWarnings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PrintWriter writer
protected OutputStream output
protected String delim
protected String quote
protected boolean keepHeader
protected boolean allColumns
protected ReportSheet sheet
| Constructor Detail |
|---|
public DelimitedFormatter(OutputStream output)
| Method Detail |
|---|
protected void startGrid(int rows,
int cols)
startGrid in class BaseFormatterrows - number of rows.cols - number of columns.protected void endGrid()
endGrid in class BaseFormatter
protected void startRow(TabularSheet sheet,
int row)
startRow in class BaseFormattersheet - tabular report object.row - row index in the grid.protected void endRow()
endRow in class BaseFormatter
protected void startCell(TabularSheet sheet,
int r,
int c,
Object bg,
Insets borders,
Color bcolor,
Rectangle span,
String width,
boolean repeat)
startCell in class BaseFormatterr - row index.c - column index.bg - cell background color or image.borders - border setting.bcolor - border color.span - cell span.width - column width. See TabularSheet for width specification
format.repeat - true to repeat the cell contents on every page.protected void endCell()
endCell in class BaseFormatterprotected void writeShapes(PageLayout.Shape[] shapes)
writeShapes in class BaseFormatterpublic void setDelimiter(String delim)
delim - delimiter.public String getDelimiter()
public void setQuote(String quote)
quote - quote string.public String getQuote()
public void setKeepHeader(boolean keepHeader)
keepHeader - boolean.public boolean isKeepHeader()
public void prolog(ReportSheet sheet)
public void startHeader(int type)
type - header/footer type. Defined in ReportSheet.
public void startHeader(String eid,
boolean header)
eid - element ID.header - true if header, false if footer.public void endHeader()
public void write(inetsoft.report.style.XTableStyle style)
public void write(HeadingElement elem)
public void write(TextElement elem)
public void write(SectionElement elem)
throws IOException
IOException
protected void writeWarnings(ReportElement elem,
ReportSheet sheet)
writeWarnings in class BaseFormatterpublic void write(TableElement elem)
public void write(FormElement elem)
public void write(PainterElement elem)
public void write(ChartElement elem)
public void write(TextBoxElement elem)
public void write(TabElement elem)
public void write(NewlineElement elem)
public void write(AreaBreakElement elem)
public void write(PageBreakElement elem)
public void write(PageLayoutElement elem)
public void write(CondPageBreakElement elem)
public void write(SpaceElement elem)
public void write(SeparatorElement elem)
public void write(TOCElement elem)
public void write(CompositeElement elem)
throws IOException
IOExceptionpublic void end()
end in interface Formatterend in class BaseFormatterprotected static String toString(Object obj)
public void write(BeanElement elem)
throws IOException
IOException
protected void writeSectionBand(SectionBand band)
throws IOException
writeSectionBand in class BaseFormatterIOException
protected void writeElementContents(ReportElement elem,
ReportSheet sheet)
throws IOException
writeElementContents in class BaseFormatterIOException
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||