jsky.catalog
Class MemoryCatalog

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by javax.swing.table.DefaultTableModel
          extended by jsky.catalog.MemoryCatalog
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.table.TableModel, Catalog, QueryResult, TableQueryResult, Saveable, SaveableAsHTML
Direct Known Subclasses:
AstroCatTable, SkycatTable, TestTableQueryResult

public class MemoryCatalog
extends javax.swing.table.DefaultTableModel
implements TableQueryResult, Saveable, SaveableAsHTML

Used to manage tabular catalog data in memory, such as the result of a catalog query or the contents of a local catalog file. This class can be easily used with a JTable widget, since it extends the DefaultTableModel class. It can also be used as an in memory catalog for further searches.

In ASCII form, the data is represented as a tab separated table with an optional header and column headings.

The header may contain comments (starting with '#') or other text. Lines of the form "keyword: value" define properties, which are saved in a Properties object for access by client classes.

A dashed line "---" divides the column headings from the data rows. The column headings should be separated by tabs.

There is one row per line and each row should have the same number of tab separated columns as the table headings.

Version:
$Revision: 1.4 $
Author:
Allan Brighton
See Also:
Serialized Form

Field Summary
static java.lang.String DEC_COL
           
static java.lang.String EQUINOX
           
static java.lang.String ID_COL
           
static java.lang.String RA_COL
           
static java.lang.String SYMBOL
           
static java.lang.String X_COL
           
static java.lang.String Y_COL
           
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Fields inherited from interface jsky.catalog.Catalog
ARCHIVE, CATALOG, DIRECTORY, IMAGE_SERVER, LOCAL, NAME_SERVER
 
Constructor Summary
protected MemoryCatalog()
          This constructor is only for use by derived classes.
  MemoryCatalog(Catalog catalog, java.io.InputStream in)
          Initialize the table from the given stream.
  MemoryCatalog(Catalog catalog, java.io.InputStream in, int maxRows)
          Initialize the table from the given stream by reading up to maxRows of the data (in tab separated table format).
  MemoryCatalog(Catalog catalog, java.io.InputStream in, QueryArgs queryArgs)
          Initialize the table from the given stream by reading up to maxRows of the data.
  MemoryCatalog(Catalog catalog, java.lang.String filename)
          Initialize the table from the given file.
  MemoryCatalog(FieldDesc[] fields, java.util.Vector dataVector)
          Create a MemoryCatalog with the given information.
  MemoryCatalog(MemoryCatalog table, FieldDesc[] fields, java.util.Vector dataRows)
          Construct a new MemoryCatalog with the given column fields and data rows (For internal use only).
  MemoryCatalog(java.lang.String filename)
          Initialize the table from the given file
 
Method Summary
protected  void _checkColumnClass(int col, java.lang.Object o)
          Check the class type for the given column to see if all of the items are the same type and update the _columnClasses vector, setting the correct lowest common class for each column.
protected  void _init(java.io.InputStream in, int maxRows)
          Initialize the table from the given stream, reading at most maxRows data rows.
protected  void _initColumnClasses()
          Determine the best class to use for each column by scanning the table items.
protected  void _initFields()
          Initialize the fields array, which describes the table columns
protected  java.util.Vector _parseHeading(java.lang.String s)
          Parse the given line looking for tab separated column heading strings and return a vector containing the strings found.
protected  java.lang.Object _parseItem(java.lang.String s)
          Parse the given string and return a Double or String object, depending on the format of the string.
protected  void _parseProperty(java.lang.String s)
          Check for a "keyword: value" pair in the given string and, if found, save it as a property.
protected  java.util.Vector _parseRow(java.lang.String lineStr)
          Parse the given table row looking for tab separated items.
protected  void _saveHeader(java.io.PrintStream out)
          Save the table header (part before the column headings) to the given PrintStream.
protected  void _saveProperties(java.io.PrintStream out)
          Save the table header (part before the column headings) to the given PrintStream.
 java.lang.Object clone()
          Implementation of the clone method (makes a shallow copy).
protected  boolean compareRow(java.util.Vector row, java.lang.String objectId, CoordinateRadius region, SearchCondition[] conditions, int[] searchCols)
          Return true if the given row satisfies the given query arguments.
 Catalog getCatalog()
          Return the catalog used to create this table, or null if not known.
 java.lang.Class getColumnClass(int columnIndex)
          Returns the lowest common denominator Class in the column.
 FieldDesc getColumnDesc(int i)
          Return a description of the ith table column parameter.
 java.util.Vector getColumnIdentifiers()
          Allow access to this inherited member variable in a subclass
 int getColumnIndex(java.lang.String name)
          Return the table column index for the given column name
 java.lang.String getColumnName(int index)
          Return the table column name for the given column index
 Coordinates getCoordinates(int rowIndex)
          Return a Coordinates object based on the appropriate columns in the given row, or null if there are no coordinates available for the row.
 java.lang.String getDescription()
          Return a description of the catalog, or null if not available
 java.net.URL getDocURL()
          Return the documentation URL for the catalog
 FieldDesc[] getFields()
          Return an array of objects describing the table columns
 java.lang.String getFilename()
          Return the filename of the local catalog, if known
 java.lang.String getId()
          Return the id or short name of the catalog
 java.lang.String getName()
          Return the name of the catalog
 int getNumColumns()
          Return the number of table columns..
 int getNumParams()
          Return the number of query parameters that this catalog accepts.
 FieldDesc getParamDesc(int i)
          Return a description of the ith query parameter.
 FieldDesc getParamDesc(java.lang.String name)
          Return a description of the named query parameter.
 CatalogDirectory getParent()
          Return a reference to the parent catalog directory, or null if not known.
 Catalog[] getPath()
          Return an array of Catalog or CatalogDirectory objects representing the path from the root catalog directory to this catalog.
 java.util.Properties getProperties()
          Return the properties defined in the table header
 java.lang.String getProperty(java.lang.String key)
          Return the value of the named property as a String
 QueryArgs getQueryArgs()
          Return the object representing the arguments to the query that resulted in this table, if known, otherwise null.
 RowCoordinates getRowCoordinates()
          Return an object storing the column indexes where RA and Dec are found, using the first plot symbol definition found.
 java.lang.String getTitle()
          Return the title for the catalog
 java.lang.String getType()
          Return the catalog type (normally one of the Catalog constants: CATALOG, ARCHIVE, DIRECTORY, LOCAL, IMAGE_SERVER)
 java.lang.Object getValueAt(int row, java.lang.String name)
          Return the value at the given row and columm name
 WorldCoordinates getWCSCenter()
          Return the center coordinates for this table from the query arguments, if known, otherwise return the coordinates of the first row, or null if there are no world coordinates available.
 boolean hasCol(java.lang.String name)
          return true if the table contains the given column
 boolean hasCoordinates()
          Return true if the table has coordinate columns, such as (ra, dec)
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns true if the cell at rowIndex and columnIndex is editable.
 boolean isImageServer()
          Return true if this object represents an image server.
 boolean isLocal()
          Return true if this is a local catalog, and false if it requires network access or if a query could hang.
 boolean isMore()
          Return true if the query result was truncated and more data would have been available
 boolean isReadOnly()
          Return true if the table is read-only and should not be editable
static void main(java.lang.String[] args)
          Test cases
protected  java.util.Vector makeColumnIdentifiers(FieldDesc[] fields)
          Create and return a vector of table column identifiers (column headings) based on the given fields.
protected  MemoryCatalog makeQueryResult(FieldDesc[] fields, java.util.Vector dataRows)
          Return a new MemoryCatalog with the given column fields and data rows.
 void print()
           
 QueryResult query(QueryArgs queryArgs)
          Query the catalog using the given argument and return the result.
 void saveAs(java.io.OutputStream os)
          Save the table to the given stream
 void saveAs(java.lang.String filename)
          Save the table to the given filename format.
 void saveAsHTML(java.lang.String filename)
          Save the table to the given filename in HTML format
 void setCatalog(Catalog cat)
          Set a reference to the catalog used to create this table.
 void setColumnClasses(java.lang.Class[] ar)
          Set the data types for column values.
 void setColumnClasses(java.util.List l)
          Set the data types for column values.
 void setColumnIdentifiers(java.util.Vector columnIdentifiers)
          Set the table column headings with a Vector of Strings
 void setDescription(java.lang.String description)
          Set the description of the catalog
 void setDocURL(java.net.URL docURL)
          Set the doc URL for the catalog
 void setFields(FieldDesc[] fields)
          Set the array of objects describing the table columns.
 void setFilename(java.lang.String filename)
          Set the filename of the local catalog
 void setId(java.lang.String id)
          Set the id or short name for the catalog
 void setMore(boolean more)
          Called to indicate if the result was truncated and more rows would have been available
 void setName(java.lang.String name)
          Set the name for the catalog
 void setParent(CatalogDirectory catDir)
          Set the parent catalog directory
 void setProperties(java.util.Properties p)
          Replace the table properties
 void setProperty(java.lang.String key, java.lang.String value)
          Set the value of the named property
 void setQueryArgs(QueryArgs queryArgs)
          Set the object representing the arguments to the query that resulted in this table.
 void setReadOnly(boolean b)
          Set to true if the table is read-only and should not be editable
 void setRegionArgs(QueryArgs queryArgs, CoordinateRadius region)
          This method is required to implement the Catalog interface, but currently does nothing here.
 void setRowCoordinates(RowCoordinates rowCoordinates)
          Set the RowCoordinates object for this catalog
 void setTitle(java.lang.String title)
          Set the title for the catalog
 void sort(java.lang.String[] sortCols, java.lang.String sortOrder)
          Sort the contents of the table by the given sort columns and in the given order.
 java.lang.String toString()
          Format and return the contents of the table as a String
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jsky.catalog.TableQueryResult
getDataVector
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnCount, getRowCount, getValueAt, removeTableModelListener, setValueAt
 

Field Detail

EQUINOX

public static final java.lang.String EQUINOX
See Also:
Constant Field Values

SYMBOL

public static final java.lang.String SYMBOL
See Also:
Constant Field Values

ID_COL

public static final java.lang.String ID_COL
See Also:
Constant Field Values

RA_COL

public static final java.lang.String RA_COL
See Also:
Constant Field Values

DEC_COL

public static final java.lang.String DEC_COL
See Also:
Constant Field Values

X_COL

public static final java.lang.String X_COL
See Also:
Constant Field Values

Y_COL

public static final java.lang.String Y_COL
See Also:
Constant Field Values
Constructor Detail

MemoryCatalog

public MemoryCatalog(FieldDesc[] fields,
                     java.util.Vector dataVector)
Create a MemoryCatalog with the given information.

Parameters:
fields - an array of objects describing the table columns
dataVector - a vector of data rows, each of which is a vector of column values.

MemoryCatalog

public MemoryCatalog(Catalog catalog,
                     java.io.InputStream in,
                     int maxRows)
              throws java.io.IOException
Initialize the table from the given stream by reading up to maxRows of the data (in tab separated table format).

Parameters:
catalog - the catalog where the data originated, if known
in - the stream to read the table data from
maxRows - the maximum number of data rows to read
Throws:
java.io.IOException

MemoryCatalog

public MemoryCatalog(Catalog catalog,
                     java.io.InputStream in)
              throws java.io.IOException
Initialize the table from the given stream.

Parameters:
catalog - the catalog where the data originated, if known
in - the stream to read the catalog data from
Throws:
java.io.IOException

MemoryCatalog

public MemoryCatalog(Catalog catalog,
                     java.io.InputStream in,
                     QueryArgs queryArgs)
              throws java.io.IOException
Initialize the table from the given stream by reading up to maxRows of the data.

Parameters:
catalog - the catalog where the data originated, if known
in - the stream to read the catalog data from
queryArgs - represents the arguments to the query that resulted in this table
Throws:
java.io.IOException

MemoryCatalog

public MemoryCatalog(Catalog catalog,
                     java.lang.String filename)
              throws java.io.IOException
Initialize the table from the given file.

Parameters:
catalog - the catalog where the data originated, if known
filename - the name of the catalog file
Throws:
java.io.IOException

MemoryCatalog

public MemoryCatalog(java.lang.String filename)
              throws java.io.IOException
Initialize the table from the given file

Parameters:
filename - the name of the catalog file
Throws:
java.io.IOException

MemoryCatalog

public MemoryCatalog(MemoryCatalog table,
                     FieldDesc[] fields,
                     java.util.Vector dataRows)
Construct a new MemoryCatalog with the given column fields and data rows (For internal use only).

Parameters:
table - the source catalog table
fields - an array of objects describing the table columns
dataRows - a vector of data rows, each of which is a vector of column values.

MemoryCatalog

protected MemoryCatalog()
This constructor is only for use by derived classes. The derived class must take care of initializing the "fields", "dataVector", and "columnIdentifiers" member variables.

Method Detail

clone

public java.lang.Object clone()
Implementation of the clone method (makes a shallow copy).

Specified by:
clone in interface Catalog
Overrides:
clone in class java.lang.Object

setCatalog

public void setCatalog(Catalog cat)
Set a reference to the catalog used to create this table.


getCatalog

public Catalog getCatalog()
Return the catalog used to create this table, or null if not known.

Specified by:
getCatalog in interface TableQueryResult

_init

protected void _init(java.io.InputStream in,
                     int maxRows)
              throws java.io.IOException
Initialize the table from the given stream, reading at most maxRows data rows.

Throws:
java.io.IOException

_parseProperty

protected void _parseProperty(java.lang.String s)
Check for a "keyword: value" pair in the given string and, if found, save it as a property.


_parseHeading

protected java.util.Vector _parseHeading(java.lang.String s)
Parse the given line looking for tab separated column heading strings and return a vector containing the strings found.

Parameters:
s - A line containing tab separated column headings.
Returns:
A vector of column heading Strings.

_initFields

protected void _initFields()
Initialize the fields array, which describes the table columns


_parseRow

protected java.util.Vector _parseRow(java.lang.String lineStr)
Parse the given table row looking for tab separated items. If fewer than numCols columns are found, set the rest to "". Any extra columns are silently ignored.

Item strings that look like numbers are inserted into the result as Doubles.

Parameters:
lineStr - A string containing a line from the table.
Returns:
A Vector containing the items in the row.

_parseItem

protected java.lang.Object _parseItem(java.lang.String s)
Parse the given string and return a Double or String object, depending on the format of the string.

Parameters:
s - A String to be parsed.
Returns:
A Double or String object.

_checkColumnClass

protected void _checkColumnClass(int col,
                                 java.lang.Object o)
Check the class type for the given column to see if all of the items are the same type and update the _columnClasses vector, setting the correct lowest common class for each column.

Parameters:
col - The column index
o - The item in the column

getColumnIdentifiers

public java.util.Vector getColumnIdentifiers()
Allow access to this inherited member variable in a subclass

Specified by:
getColumnIdentifiers in interface TableQueryResult

makeColumnIdentifiers

protected java.util.Vector makeColumnIdentifiers(FieldDesc[] fields)
Create and return a vector of table column identifiers (column headings) based on the given fields.

Returns:
a vector of Strings

getName

public java.lang.String getName()
Return the name of the catalog

Specified by:
getName in interface Catalog

setName

public void setName(java.lang.String name)
Set the name for the catalog

Specified by:
setName in interface Catalog

getFilename

public java.lang.String getFilename()
Return the filename of the local catalog, if known


setFilename

public void setFilename(java.lang.String filename)
Set the filename of the local catalog


getId

public java.lang.String getId()
Return the id or short name of the catalog

Specified by:
getId in interface Catalog

setId

public void setId(java.lang.String id)
Set the id or short name for the catalog


getTitle

public java.lang.String getTitle()
Return the title for the catalog

Specified by:
getTitle in interface Catalog

setTitle

public void setTitle(java.lang.String title)
Set the title for the catalog


getDescription

public java.lang.String getDescription()
Return a description of the catalog, or null if not available

Specified by:
getDescription in interface Catalog

setDescription

public void setDescription(java.lang.String description)
Set the description of the catalog


getDocURL

public java.net.URL getDocURL()
Return the documentation URL for the catalog

Specified by:
getDocURL in interface Catalog

setDocURL

public void setDocURL(java.net.URL docURL)
Set the doc URL for the catalog


getNumParams

public int getNumParams()
Return the number of query parameters that this catalog accepts. In this case, since we only have a table and no catalog server, the query parameters are the same as the table columns, and the parameter values may be ValueRange objects.

Specified by:
getNumParams in interface Catalog

getParamDesc

public FieldDesc getParamDesc(int i)
Return a description of the ith query parameter. In this case, since we only have a table and no catalog server, the query parameters are the same as the table columns, and the parameter values may be ValueRange objects.

Specified by:
getParamDesc in interface Catalog

getParamDesc

public FieldDesc getParamDesc(java.lang.String name)
Return a description of the named query parameter. In this case, since we only have a table and no catalog server, the query parameters are the same as the table columns, and the parameter values may be ValueRange objects.

Specified by:
getParamDesc in interface Catalog

getNumColumns

public int getNumColumns()
Return the number of table columns..


getColumnDesc

public FieldDesc getColumnDesc(int i)
Return a description of the ith table column parameter.

Specified by:
getColumnDesc in interface TableQueryResult

setRegionArgs

public void setRegionArgs(QueryArgs queryArgs,
                          CoordinateRadius region)
This method is required to implement the Catalog interface, but currently does nothing here.

Specified by:
setRegionArgs in interface Catalog
Parameters:
queryArgs - (in/out) describes the query arguments
region - (in) describes the query region (center and radius range)

isLocal

public boolean isLocal()
Return true if this is a local catalog, and false if it requires network access or if a query could hang. A local catalog query is run in the event dispatching thread, while others are done in a separate thread.

Specified by:
isLocal in interface Catalog

isImageServer

public boolean isImageServer()
Return true if this object represents an image server.

Specified by:
isImageServer in interface Catalog

getType

public java.lang.String getType()
Return the catalog type (normally one of the Catalog constants: CATALOG, ARCHIVE, DIRECTORY, LOCAL, IMAGE_SERVER)

Specified by:
getType in interface Catalog

setParent

public void setParent(CatalogDirectory catDir)
Set the parent catalog directory

Specified by:
setParent in interface Catalog

getParent

public CatalogDirectory getParent()
Return a reference to the parent catalog directory, or null if not known.

Specified by:
getParent in interface Catalog

getPath

public Catalog[] getPath()
Return an array of Catalog or CatalogDirectory objects representing the path from the root catalog directory to this catalog.

Specified by:
getPath in interface Catalog

query

public QueryResult query(QueryArgs queryArgs)
                  throws java.io.IOException
Query the catalog using the given argument and return the result.

Specified by:
query in interface Catalog
Parameters:
queryArgs - An object describing the query arguments.
Returns:
An object describing the result of the query.
Throws:
java.io.IOException

makeQueryResult

protected MemoryCatalog makeQueryResult(FieldDesc[] fields,
                                        java.util.Vector dataRows)
Return a new MemoryCatalog with the given column fields and data rows.

Parameters:
fields - an array of objects describing the table columns
dataRows - a vector of data rows, each of which is a vector of column values.

toString

public java.lang.String toString()
Format and return the contents of the table as a String

Overrides:
toString in class java.lang.Object

compareRow

protected boolean compareRow(java.util.Vector row,
                             java.lang.String objectId,
                             CoordinateRadius region,
                             SearchCondition[] conditions,
                             int[] searchCols)
Return true if the given row satisfies the given query arguments.

Parameters:
row - A vector containing the column values for a row.
objectId - If not null, search for an object with this id.
region - The region (center, radius) for a circular search, if not null.
conditions - Specifies the ranges for column values we are search for.
searchCols - An array of column indexes corresponding to the condition argument (used for efficiency).
Returns:
True if the row satisfies the conditions, otherwise false.

isMore

public boolean isMore()
Return true if the query result was truncated and more data would have been available

Specified by:
isMore in interface TableQueryResult

setMore

public void setMore(boolean more)
Called to indicate if the result was truncated and more rows would have been available


setColumnIdentifiers

public void setColumnIdentifiers(java.util.Vector columnIdentifiers)
Set the table column headings with a Vector of Strings

Overrides:
setColumnIdentifiers in class javax.swing.table.DefaultTableModel

hasCol

public boolean hasCol(java.lang.String name)
return true if the table contains the given column


getValueAt

public java.lang.Object getValueAt(int row,
                                   java.lang.String name)
Return the value at the given row and columm name


getColumnIndex

public int getColumnIndex(java.lang.String name)
Return the table column index for the given column name

Specified by:
getColumnIndex in interface TableQueryResult

getColumnName

public java.lang.String getColumnName(int index)
Return the table column name for the given column index

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.DefaultTableModel

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Returns the lowest common denominator Class in the column. This is used by the table to set up a default renderer and editor for the column.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Returns:
the common ancestor class of the object values in the model.

setColumnClasses

public void setColumnClasses(java.util.List l)
Set the data types for column values.


setColumnClasses

public void setColumnClasses(java.lang.Class[] ar)
Set the data types for column values.


getFields

public FieldDesc[] getFields()
Return an array of objects describing the table columns


setFields

public void setFields(FieldDesc[] fields)
Set the array of objects describing the table columns.


isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Returns true if the cell at rowIndex and columnIndex is editable. Otherwise, setValueAt() on the cell will not change the value of that cell.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.DefaultTableModel
Parameters:
rowIndex - the row whose value is to be looked up
columnIndex - the column whose value is to be looked up
Returns:
true if the cell is editable.
See Also:
DefaultTableModel.setValueAt(java.lang.Object, int, int)

isReadOnly

public boolean isReadOnly()
Return true if the table is read-only and should not be editable


setReadOnly

public void setReadOnly(boolean b)
Set to true if the table is read-only and should not be editable


sort

public void sort(java.lang.String[] sortCols,
                 java.lang.String sortOrder)
Sort the contents of the table by the given sort columns and in the given order.

Parameters:
sortCols - an array of column names to sort by
sortOrder - if true, sort in ascending order, otherwise descending.

hasCoordinates

public boolean hasCoordinates()
Return true if the table has coordinate columns, such as (ra, dec)

Specified by:
hasCoordinates in interface TableQueryResult

getCoordinates

public Coordinates getCoordinates(int rowIndex)
Return a Coordinates object based on the appropriate columns in the given row, or null if there are no coordinates available for the row.

Specified by:
getCoordinates in interface TableQueryResult

print

public void print()

saveAs

public void saveAs(java.lang.String filename)
            throws java.io.IOException
Save the table to the given filename format.

Specified by:
saveAs in interface Saveable
Throws:
java.io.IOException

saveAs

public void saveAs(java.io.OutputStream os)
Save the table to the given stream


_saveHeader

protected void _saveHeader(java.io.PrintStream out)
Save the table header (part before the column headings) to the given PrintStream.


_saveProperties

protected void _saveProperties(java.io.PrintStream out)
Save the table header (part before the column headings) to the given PrintStream.


saveAsHTML

public void saveAsHTML(java.lang.String filename)
                throws java.io.IOException
Save the table to the given filename in HTML format

Specified by:
saveAsHTML in interface SaveableAsHTML
Throws:
java.io.IOException

getQueryArgs

public QueryArgs getQueryArgs()
Return the object representing the arguments to the query that resulted in this table, if known, otherwise null.

Specified by:
getQueryArgs in interface TableQueryResult

setQueryArgs

public void setQueryArgs(QueryArgs queryArgs)
Set the object representing the arguments to the query that resulted in this table.

Specified by:
setQueryArgs in interface TableQueryResult

getRowCoordinates

public RowCoordinates getRowCoordinates()
Return an object storing the column indexes where RA and Dec are found, using the first plot symbol definition found.

Specified by:
getRowCoordinates in interface TableQueryResult

setRowCoordinates

public void setRowCoordinates(RowCoordinates rowCoordinates)
Set the RowCoordinates object for this catalog


getWCSCenter

public WorldCoordinates getWCSCenter()
Return the center coordinates for this table from the query arguments, if known, otherwise return the coordinates of the first row, or null if there are no world coordinates available.

Specified by:
getWCSCenter in interface TableQueryResult

_initColumnClasses

protected void _initColumnClasses()
Determine the best class to use for each column by scanning the table items.


getProperties

public java.util.Properties getProperties()
Return the properties defined in the table header


setProperties

public void setProperties(java.util.Properties p)
Replace the table properties


getProperty

public java.lang.String getProperty(java.lang.String key)
Return the value of the named property as a String


setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Set the value of the named property


main

public static void main(java.lang.String[] args)
Test cases