public class IndexLineParser extends Object implements ILineParser<IIndexWord>
Parser parser for Wordnet index files (e.g., idx.adv or
adv.idx). It produces an IIndexWord object.
This class follows a singleton design pattern, and is not intended to be
instantiated directly; rather, call the getInstance() method to get
the singleton instance.
ILineParser.MisformattedLineException| Modifier | Constructor and Description |
|---|---|
protected |
IndexLineParser()
This constructor is marked protected so that the class may be
sub-classed, but not directly instantiated.
|
| Modifier and Type | Method and Description |
|---|---|
static IndexLineParser |
getInstance()
Returns the singleton instance of this class, instantiating it if
necessary.
|
IIndexWord |
parseLine(String line)
Given the line of data, this method produces an object of class
T. |
protected IPointer |
resolvePointer(String symbol,
POS pos)
Retrieves the pointer objects for the
parseLine(String) method. |
protected IndexLineParser()
getInstance() method.public static IndexLineParser getInstance()
null.null singleton instance of this class,
instantiating it if necessary.public IIndexWord parseLine(String line)
ILineParserT.parseLine in interface ILineParser<IIndexWord>line - the line to be parsedprotected IPointer resolvePointer(String symbol, POS pos)
Retrieves the pointer objects for the parseLine(String) method.
This is implemented in its own method for ease of subclassing.
symbol - the symbol of the pointer to returnpos - the part of speech of the pointer to return, can be
null unless the pointer symbol is ambiguousNullPointerException - if the symbol is nullIllegalArgumentException - if the symbol and part of speech combination does not
correspond to a known pointerCopyright © 2018. All rights reserved.