|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.corpus.Parser<H>
com.aliasi.corpus.InputSourceParser<H>
com.aliasi.corpus.XMLParser<MedlineHandler>
com.aliasi.medline.MedlineParser
public class MedlineParser
A MedlineParser is able to parse 2009 MEDLINE citations
from an input source. The parser takes a visitor in the form of a
MedlineHandler, which processes the MEDLINE citations
as they are extracted by the parser.
The parser is able to store the entire raw XML form of the original citation. Whether it does so is controlled by a flag in the constructor.
For more information, see the LingPipe tutorial on parsing MEDLINE.
| Constructor Summary | |
|---|---|
MedlineParser(boolean includeRawXML)
Construct a MEDLINE parser no initial handler. |
|
MedlineParser(MedlineHandler handler,
boolean includeRawXML)
Construct a MEDLINE parser with the specified handler. |
|
| Method Summary | |
|---|---|
protected DefaultHandler |
getXMLHandler()
Return the default handler for SAX events. |
void |
parse(InputSource inSource,
MedlineHandler handler)
Deprecated. Use setHandler(MedlineHandler) followed
by parse(InputSource). |
| Methods inherited from class com.aliasi.corpus.XMLParser |
|---|
parse |
| Methods inherited from class com.aliasi.corpus.InputSourceParser |
|---|
parseString |
| Methods inherited from class com.aliasi.corpus.Parser |
|---|
getHandler, parse, parse, parseString, setHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MedlineParser(boolean includeRawXML)
includeRawXML - Set to true if the raw XML
will be available as part of the processed citation.
public MedlineParser(MedlineHandler handler,
boolean includeRawXML)
handler - Handler for the citations.includeRawXML - Set to true if the raw XML
will be available as part of the processed citation.| Method Detail |
|---|
public void parse(InputSource inSource,
MedlineHandler handler)
throws IOException,
SAXException
setHandler(MedlineHandler) followed
by parse(InputSource).
inSource - Input source to parse.handler - MEDLINE handler for processing citations.
IOException
SAXExceptionprotected DefaultHandler getXMLHandler()
XMLParserHandler specified for this
class and pass events to it extracted from the XML. Typical
concrete implementations of this method will extract the underlying
handler using Parser.getHandler() and wrap it in a default
handler.
This method is called exactly once in each parse method in this class. Thus dynamic updates to the underlying handler may be picked up by this adapter method.
getXMLHandler in class XMLParser<MedlineHandler>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||