|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.mit.jwi.data.parse.SenseKeyParser
public class SenseKeyParser
A parser that takes a sense key string and produces an ISenseKey
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.mit.jwi.data.parse.ILineParser |
---|
ILineParser.MisformattedLineException |
Constructor Summary | |
---|---|
protected |
SenseKeyParser()
This constructor is marked protected so that the class may be sub-classed, but not directly instantiated. |
Method Summary | |
---|---|
static SenseKeyParser |
getInstance()
Returns the singleton instance of this class, instantiating it if necessary. |
ISenseKey |
parseLine(java.lang.String key)
Given the line of data, this method produces an object of class T . |
protected ILexFile |
resolveLexicalFile(int lexFileNum)
Retrieves the lexical file objects for the parseLine(String)
method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SenseKeyParser()
getInstance()
method.
Method Detail |
---|
public static SenseKeyParser getInstance()
null
.
null
singleton instance of this class,
instantiating it if necessary.public ISenseKey parseLine(java.lang.String key)
ILineParser
T
.
parseLine
in interface ILineParser<ISenseKey>
key
- the line to be parsed
protected ILexFile resolveLexicalFile(int lexFileNum)
Retrieves the lexical file objects for the parseLine(String)
method. If the lexical file number does correspond to a known lexical
file, the method returns a singleton placeholder 'unknown' lexical file
object.
This is implemented in its own method for ease of subclassing.
lexFileNum
- the number of the lexical file to return
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |