public class IpacTableWriter extends AbstractTextTableWriter
Modifier and Type | Field and Description |
---|---|
static String |
NULL
String representation for null values.
|
Constructor and Description |
---|
IpacTableWriter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
docIncludesExample()
Indicates whether the serialization of some (short) example table
should be added to the user documentation for this handler.
|
String |
formatValue(Object val,
ValueInfo info,
int width)
Formats a data value for output.
|
String |
getFormatName()
Returns "IPAC".
|
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.
|
String |
getXmlDescription()
Returns user-directed documentation in XML format.
|
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.
|
getBytes, getMaximumParameterLength, getMaxWidth, getSampledRows, getWriteParameters, setMaximumParameterLength, setMaxWidth, setSampledRows, setWriteParameters, writeStarTable
getExtensions, looksLikeFile, writeStarTable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
matchesExtension, readText, toLink
public static String NULL
public String getFormatName()
getFormatName
in interface StarTableWriter
getFormatName
in class AbstractTextTableWriter
public boolean docIncludesExample()
DocumentedIOHandler
Documented.getXmlDescription()
method already includes some example output, should return false.public String getXmlDescription()
Documented
The output should be a sequence of one or more <P> elements, using XHTML-like XML. Since rendering may be done in a number of contexts however, use of the full range of XHTML elements is discouraged. Where possible, the content should stick to simple markup such as the elements P, A, UL, OL, LI, DL, DT, DD EM, STRONG, I, B, CODE, TT, PRE.
public String getMimeType()
getMimeType
in interface StarTableWriter
getMimeType
in class AbstractTextTableWriter
public int getMinNameWidth(ColumnInfo info)
AbstractTextTableWriter
AbstractTextTableWriter.printColumnHeads(java.io.OutputStream, int[], uk.ac.starlink.table.ColumnInfo[])
method does not need
to be included.getMinNameWidth
in class AbstractTextTableWriter
info
- column metadatapublic String formatValue(Object val, ValueInfo info, int width)
AbstractTextTableWriter
formatValue
in class AbstractTextTableWriter
val
- the valueinfo
- the metadata object describing val
's typewidth
- maximum preferred width into which the value should
be formattedvalue
,
preferably no longer than width
characterspublic void printColumnHeads(OutputStream out, int[] colwidths, ColumnInfo[] cinfos) throws IOException
AbstractTextTableWriter
printColumnHeads
in class AbstractTextTableWriter
out
- stream to write intocolwidths
- column widths in characterscinfos
- array of column headingsIOException
protected void printLine(OutputStream out, int[] colwidths, String[] data) throws IOException
AbstractTextTableWriter
printLine
in class AbstractTextTableWriter
out
- stream to write intocolwidths
- column widths in charactersdata
- array of strings to be output, one per columnIOException
protected void printSeparator(OutputStream out, int[] colwidths)
AbstractTextTableWriter
printSeparator
in class AbstractTextTableWriter
out
- stream to write intocolwidths
- column widths in charactersprotected void printParam(OutputStream out, String name, String value, Class<?> clazz) throws IOException
AbstractTextTableWriter
printParam
in class AbstractTextTableWriter
out
- stream to write intoname
- parameter namevalue
- formatted parameter valueclazz
- type of valueIOException
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.