edu.nrao.sss.model.source.parser
Class VlaCalibDbHtmlReader

java.lang.Object
  extended by edu.nrao.sss.model.source.parser.AbstractSourceCatalogReader
      extended by edu.nrao.sss.model.source.parser.VlaCalibDbHtmlReader
All Implemented Interfaces:
SourceCatalogReader

public class VlaCalibDbHtmlReader
extends AbstractSourceCatalogReader

A parser of the VLA Calibrator Manual HTML page. This parser turns the data on the above page into a SourceCatalog.

Version Info:

$Revision: 1324 $
$Date: 2008-06-04 16:42:24 -0600 (Wed, 04 Jun 2008) $
$Author: dharland $

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

Field Summary
 
Fields inherited from class edu.nrao.sss.model.source.parser.AbstractSourceCatalogReader
catalog, errors, histRecPrefix, readWasSuccessful, sourceInfoOrigin
 
Constructor Summary
VlaCalibDbHtmlReader()
          Creates a new instance.
VlaCalibDbHtmlReader(URL parentUrlForLinks)
          Creates a new instance.
 
Method Summary
 boolean read(Reader in, SourceCatalog destination)
          NOTE: This method closes the incoming Reader!
 void setBaseUrlForLinks(URL parentUrlForLinks)
          Sets the base URL for relative links found by this reader.
 void setPrefixForHistoricalRecords(String prefix)
          Sets text that will be used as a prefix for any historical source records generated by this reader.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VlaCalibDbHtmlReader

public VlaCalibDbHtmlReader()
Creates a new instance.


VlaCalibDbHtmlReader

public VlaCalibDbHtmlReader(URL parentUrlForLinks)
Creates a new instance.

Parameters:
parentUrlForLinks - serves as the parent URL for any relative URLs found by this reader.
Method Detail

setBaseUrlForLinks

public void setBaseUrlForLinks(URL parentUrlForLinks)
Sets the base URL for relative links found by this reader.

Parameters:
parentUrlForLinks - serves as the parent URL for any relative URLs found by this reader.

setPrefixForHistoricalRecords

public void setPrefixForHistoricalRecords(String prefix)
Description copied from interface: SourceCatalogReader
Sets text that will be used as a prefix for any historical source records generated by this reader.

Specified by:
setPrefixForHistoricalRecords in interface SourceCatalogReader
Overrides:
setPrefixForHistoricalRecords in class AbstractSourceCatalogReader
Parameters:
prefix - text that will be used as a prefix for any historical source records generated by this reader.
See Also:
SourceCatalogReader.setPrefixForHistoricalRecords(String)

read

public boolean read(Reader in,
                    SourceCatalog destination)
NOTE: This method closes the incoming Reader!

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.read(java.io.Reader, edu.nrao.sss.model.source.SourceCatalog)


Copyright © 2009. All Rights Reserved.