|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.table.StreamStarTableWriter
uk.ac.starlink.table.formats.AbstractTextTableWriter
uk.ac.starlink.table.formats.IpacTableWriter
public class IpacTableWriter
A StarTableWriter which writes to the IPAC text format. The data format is defined at http://irsa.ipac.caltech.edu/applications/DDGEN/Doc/ipac_tbl.html.
| Field Summary | |
|---|---|
static String |
NULL
String representation for null values. |
| Constructor Summary | |
|---|---|
IpacTableWriter()
Constructor. |
|
| Method Summary | |
|---|---|
String |
formatValue(Object val,
ValueInfo info,
int width)
Formats a data value for output. |
String |
getFormatName()
Returns "IPAC". |
protected int |
getMaximumParameterLength()
The comments parameter may be many lines long. |
int |
getMaxWidth()
Returns the maximum width for a given column. |
String |
getMimeType()
Returns "text/plain". |
int |
getMinNameWidth(ColumnInfo info)
Returns the minimum width required to output the actual characters of the name for a given column. |
boolean |
looksLikeFile(String location)
Returns true for files with extension ".ipac" or ".tbl". |
void |
printColumnHeads(OutputStream out,
int[] colwidths,
ColumnInfo[] cinfos)
Outputs headings for the table columns. |
protected void |
printLine(OutputStream out,
int[] colwidths,
String[] data)
Outputs a line of table data. |
protected void |
printParam(OutputStream out,
String name,
String value,
Class clazz)
Outputs a parameter and its value. |
protected void |
printSeparator(OutputStream out,
int[] colwidths)
Outputs a decorative separator line, of the sort you might find between the column headings and the table data. |
| Methods inherited from class uk.ac.starlink.table.formats.AbstractTextTableWriter |
|---|
getBytes, getSampledRows, getWriteParameters, setWriteParameters, writeStarTable |
| Methods inherited from class uk.ac.starlink.table.StreamStarTableWriter |
|---|
writeStarTable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String NULL
| Constructor Detail |
|---|
public IpacTableWriter()
| Method Detail |
|---|
public String getFormatName()
getFormatName in interface StarTableWritergetFormatName in class AbstractTextTableWriterpublic String getMimeType()
getMimeType in interface StarTableWritergetMimeType in class AbstractTextTableWriterpublic boolean looksLikeFile(String location)
location - the location name (probably filename)
public int getMaxWidth()
AbstractTextTableWriter
getMaxWidth in class AbstractTextTableWriterpublic int getMinNameWidth(ColumnInfo info)
AbstractTextTableWriterAbstractTextTableWriter.printColumnHeads(java.io.OutputStream, int[], uk.ac.starlink.table.ColumnInfo[]) method does not need
to be included.
getMinNameWidth in class AbstractTextTableWriterinfo - column metadata
public String formatValue(Object val,
ValueInfo info,
int width)
AbstractTextTableWriter
formatValue in class AbstractTextTableWriterval - the valueinfo - the metadata object describing val's typewidth - maximum preferred width into which the value should
be formatted
public void printColumnHeads(OutputStream out,
int[] colwidths,
ColumnInfo[] cinfos)
throws IOException
AbstractTextTableWriter
printColumnHeads in class AbstractTextTableWriterout - stream to write intocolwidths - column widths in characterscinfos - array of column headings
IOException
protected void printLine(OutputStream out,
int[] colwidths,
String[] data)
throws IOException
AbstractTextTableWriter
printLine in class AbstractTextTableWriterout - stream to write intocolwidths - column widths in charactersdata - array of strings to be output, one per column
IOException
protected void printSeparator(OutputStream out,
int[] colwidths)
AbstractTextTableWriter
printSeparator in class AbstractTextTableWriterout - stream to write intocolwidths - column widths in characters
protected void printParam(OutputStream out,
String name,
String value,
Class clazz)
throws IOException
AbstractTextTableWriter
printParam in class AbstractTextTableWriterout - stream to write intoname - parameter namevalue - formatted parameter valueclazz - type of value
IOExceptionprotected int getMaximumParameterLength()
getMaximumParameterLength in class AbstractTextTableWriter
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||