edu.nrao.sss.model.source
Class VlaHistoricalCalibratorData

java.lang.Object
  extended by edu.nrao.sss.model.source.VlaHistoricalCalibratorData

public class VlaHistoricalCalibratorData
extends Object

Structured representation of data from the old VLA Calibrator Manual.

Warning: This class is not expected to be used by anything other than the source catalog application under controlled circumstances. Because of this documentation herein is scanty and error handling has not been coded. If you would like to use this class in your own environment, see the author about making this class more robust.

CVS Info:

$Revision: 760 $
$Date: 2007-07-09 08:39:29 -0600 (Mon, 09 Jul 2007) $
$Author: dharland $

Since:
2006-12-13
Author:
David M. Harland

Method Summary
static List<String> getBandLineColumnNames()
          Returns a list where each entry is the name of a column in a "band" line.
 List<List<String>> getBandLines()
          Returns a list "band" lines for this record.
static List<String> getNameLineColumnNames()
          Returns a list where each entry is the name of a column in a "name" line.
 List<List<String>> getNameLines()
          Returns a list "name" lines for this record.
static boolean isOldVlaRecord(String text)
          Returns true if it looks like text is in a form that the parse(String) method of this class understands.
static VlaHistoricalCalibratorData parse(String text)
          Creates a new historical record by parsing the given text.
 String toHtmlBandTable(String tableStyle)
          Returns an HTML table that contains a row for each band line.
 String toHtmlNameTable(String tableStyle)
          Returns an HTML table that contains a row for each name line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNameLineColumnNames

public static List<String> getNameLineColumnNames()
Returns a list where each entry is the name of a column in a "name" line.

Returns:
a list of name-line column names.

getBandLineColumnNames

public static List<String> getBandLineColumnNames()
Returns a list where each entry is the name of a column in a "band" line.

Returns:
a list of band-line column names.

getNameLines

public List<List<String>> getNameLines()
Returns a list "name" lines for this record. There is usually one name line for J2000 and one for B1950. Each line is a list of strings. The meaning of the nth string can be found by fetching the nth element of getNameLineColumnNames().

Returns:
a list of name lines.

getBandLines

public List<List<String>> getBandLines()
Returns a list "band" lines for this record. Each line is a list of strings. The meaning of the nth string can be found by fetching the nth element of getBandLineColumnNames().

Returns:
a list of band lines.

toHtmlNameTable

public String toHtmlNameTable(String tableStyle)
Returns an HTML table that contains a row for each name line.

Parameters:
tableStyle - text that is added to the <table> tag.
Returns:
an HTML table that contains a row for each name line.

toHtmlBandTable

public String toHtmlBandTable(String tableStyle)
Returns an HTML table that contains a row for each band line.

Parameters:
tableStyle - text that is added to the <table> tag.
Returns:
an HTML table that contains a row for each band line.

parse

public static VlaHistoricalCalibratorData parse(String text)
Creates a new historical record by parsing the given text. The text is expected to be in the same format as that which is found in the "historical record" field of the new VLA Calibrator Database.

Parameters:
text - to be parsed.
Returns:
a new record.
Throws:
IllegalArgumentException - if text is not in the expected format.

isOldVlaRecord

public static boolean isOldVlaRecord(String text)
Returns true if it looks like text is in a form that the parse(String) method of this class understands. Specifically, this method will return true if text contains the string "origin=VLA.Calibrator.Catalog".

Parameters:
text - a potential VLA Calibrator Manual entry.
Returns:
true if the given text looks like it could be an old VLA Calibrator Manual entry.


Copyright © 2009. All Rights Reserved.