STIL can deal with externally-stored tables in a number of different
formats. It does this using a set of handlers each of which knows
about turning an external table into a java
StarTable
object
or turning a StarTable
object into an external table.
Such an "external table" will typically be a file on a local disk,
but might also be a URL pointing to a file on a remote host,
or an SQL query on a remote database, or something else.
The core I/O framework of STIL itself does not know about any table formats, but it knows how to talk to format-specific input or output handlers. A number of these (VOTable, FITS, ASCII and others) are supplied as part of the STIL package, so for dealing with tables in these formats you don't need to do any extra work. However, the fact that these are treated in a standard way means that it is possible to add new format-specific handlers and the rest of the library will work with tables in that format just the same as with the supplied formats.
If you have a table format which is unsupported by STIL as it stands, you can do one or both of the following:
TableBuilder
interface to take a stream of data and return a
StarTable
object.
Install it in a
StarTableFactory
, which
will then be able to pick up tables in this format as well as
other known formats.
Such a TableBuilder
can also be used directly to read tables by code which knows
that it's dealing with data in that particular format.
StarTableWriter
interface to take a StarTable
and write it to a given
destination.
Install it in a
StarTableOutput
, which
will be then be able to write tables in this format as well as others.
Such a StarTableWriter
can also be used directly to write tables by code which wants to write
data in that particular format.