|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.source.parser.AbstractSourceCatalogReader edu.nrao.sss.model.source.parser.GbtSourceCatalogReader
public class GbtSourceCatalogReader
A parser of source catalog text files in the Green Bank Telescope's format. See the Users Guide for Astrid Source Catalogs for details on this format.
Version Info:
$Revision: 757 $ |
$Date: 2007-07-06 14:13:35 -0600 (Fri, 06 Jul 2007) $ |
$Author: dharland $ (last person to modify) |
Field Summary |
---|
Fields inherited from class edu.nrao.sss.model.source.parser.AbstractSourceCatalogReader |
---|
catalog, errors, histRecPrefix, readWasSuccessful, sourceInfoOrigin |
Constructor Summary | |
---|---|
GbtSourceCatalogReader()
Creates a new instance. |
Method Summary | |
---|---|
String |
getError(int index)
Returns the index th error found during the most
recent read. |
int |
getErrorCount()
Returns the number of errors found during the most recent read. |
StringBuilder |
getErrors()
Returns the combined text of all errors found during the most recent read. |
boolean |
read(Reader in,
SourceCatalog destination)
NOTE: This method closes the incoming Reader! |
Methods inherited from class edu.nrao.sss.model.source.parser.AbstractSourceCatalogReader |
---|
getCatalog, 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 |
Constructor Detail |
---|
public GbtSourceCatalogReader()
Method Detail |
---|
public boolean read(Reader in, SourceCatalog destination)
read
in interface SourceCatalogReader
read
in class AbstractSourceCatalogReader
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.
AbstractSourceCatalogReader.read(java.io.Reader,
edu.nrao.sss.model.source.SourceCatalog)
public StringBuilder getErrors()
SourceCatalogReader
Note that an "error" is anything unexpected encountered while reading. Not all errors are harmful. The text of each error includes the line number where it occurred and an explanation of what was wrong.
getErrors
in interface SourceCatalogReader
getErrors
in class AbstractSourceCatalogReader
SourceCatalogReader.getErrors()
public String getError(int index)
SourceCatalogReader
index
th error found during the most
recent read.
getError
in interface SourceCatalogReader
getError
in class AbstractSourceCatalogReader
index
- a positional value >= zero and < SourceCatalogReader.getErrorCount()
.
index
th error found during the most
recent read.SourceCatalogReader.getError(int)
public int getErrorCount()
SourceCatalogReader
getErrorCount
in interface SourceCatalogReader
getErrorCount
in class AbstractSourceCatalogReader
SourceCatalogReader.getErrorCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |