edu.nrao.sss.model.source.parser
Class PstSourceCatalogReader
java.lang.Object
edu.nrao.sss.model.source.parser.AbstractSourceCatalogReader
edu.nrao.sss.model.source.parser.PstSourceCatalogReader
- All Implemented Interfaces:
- SourceCatalogReader
public class PstSourceCatalogReader
- extends AbstractSourceCatalogReader
A parser of source catalog text files in the format used by the
GBT / VLA Proposal Submission Tool (PST).
The following are the specifications for source catalog text files
found in the PST User Manual:
This ASCII file must be formatted as follows:
- Each line of the ASCII file should contain the information for a single
source, as a comma-separated list in the following order: source name;
right ascension; declination; epoch; velocity; redshift; and (optional)
group name(s), with each group name separated by a comma.
- Either, but not both of, the velocity or the redshift must be specified
for every source.
- If any group name is given, the source will appear only as a member of
the indicated group or groups: it will not appear as an ``ungrouped''
(individual) source, and will not be selectable as an individual source
when creating source/resource pairs on the Sessions Tab Page (see §[*]
and §[*]). To enter a source both as an individual and as part of a
group, simply put the same source in two lines, one listing groups and
one not listing groups.
- A valid source line must have a minimum of six commas.
- Comment lines begin with the character ``#''.
- You can use tab as the delimiter in place of comma. However, commas and
tabs cannot be mixed in the same source data line.
- Embedded blank lines are fine.
Version Info:
$Revision: 1251 $ |
$Date: 2008-04-28 16:28:37 -0600 (Mon, 28 Apr 2008) $ |
$Author: dharland $ (last person to modify) |
- Since:
- 2007-08-09
- Author:
- David M. Harland
Method Summary |
boolean |
read(Reader in,
SourceCatalog destination)
Reads data from in and uses it to add sources to
destination . |
Methods inherited from class edu.nrao.sss.model.source.parser.AbstractSourceCatalogReader |
getCatalog, getError, getErrorCount, getErrors, getOriginOfSourceInformation, getPrefixForHistoricalRecords, getSuccess, putError, read, read, read, read, read, read, read, setOriginOfSourceInformation, setPrefixForHistoricalRecords |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PstSourceCatalogReader
public PstSourceCatalogReader()
- Creates a new instance.
read
public boolean read(Reader in,
SourceCatalog destination)
- Reads data from
in
and uses it to add sources to
destination
.
Note: this method closes the reader when it is done.
- Specified by:
read
in interface SourceCatalogReader
- Specified by:
read
in class AbstractSourceCatalogReader
- Parameters:
in
- the source of text that can be read and turned into
Source
objects.destination
- the catalog to which the sources should be
added. If this parameter is null,
a new catalog will be created.
- Returns:
- true if nothing unexpected occurred while reading data.
- See Also:
AbstractSourceCatalogReader.getCatalog()
,
AbstractSourceCatalogReader.getErrors()
Copyright © 2009. All Rights Reserved.