public class SiteCatalogTextParser
extends java.lang.Object
org.griphyn.cPlanner.classes.SiteCatalogTextScanner
,
org.griphyn.cPlanner.classes.Token
Modifier and Type | Field and Description |
---|---|
private LogManager |
m_logger
The handle to the logger used to log messages.
|
private Token |
m_lookAhead
Stores the look-ahead symbol.
|
private SiteCatalogTextScanner |
m_scanner
The access to the lexical scanner is stored here.
|
Constructor and Description |
---|
SiteCatalogTextParser(java.io.Reader r)
Initializes the parser with an input stream to read from.
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
getSiteHandle()
Returns the site handle for a site, and moves the scanner to hold the next
SiteCatalogReservedWord . |
java.lang.String |
niceString(java.lang.String input)
Remove potential leading and trainling quotes from a string.
|
PoolConfig |
parse()
Parses the complete input stream, into the PoolConfig data object that
holds the contents of all the sites referred to in the stream.
|
private void |
populate(SiteInfo site)
Populates all the attributes except the handle, associated with the site
in the
SiteInfo object. |
private SiteCatalogTextScanner m_scanner
private Token m_lookAhead
private LogManager m_logger
public SiteCatalogTextParser(java.io.Reader r) throws java.io.IOException, ScannerException
r
- is the stream opened for reading.java.io.IOException
ScannerException
public PoolConfig parse() throws java.io.IOException, ScannerException, java.lang.Exception
java.io.IOException
ScannerException
java.lang.Exception
org.griphyn.cPlanner.classes.PoolConfig
public java.lang.String niceString(java.lang.String input)
input
- is a string which may have leading and trailing quotesprivate void populate(SiteInfo site) throws java.io.IOException, ScannerException, java.lang.Exception
SiteInfo
object.site
- the SiteInfo object that is to be populated.
even
- more mysteryjava.io.IOException
ScannerException
java.lang.Exception
private java.lang.String getSiteHandle() throws java.io.IOException, ScannerException
SiteCatalogReservedWord
.plenty
java.io.IOException
ScannerException