com.aliasi.medline
Class MedlineParser

java.lang.Object
  extended by com.aliasi.corpus.Parser<H>
      extended by com.aliasi.corpus.InputSourceParser<H>
          extended by com.aliasi.corpus.XMLParser<MedlineHandler>
              extended by com.aliasi.medline.MedlineParser

Deprecated. Moved to lingmed sandbox project.

@Deprecated
public class MedlineParser
extends XMLParser<MedlineHandler>

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.

Since:
LingPipe2.0
Version:
3.9.1
Author:
Bob Carpenter

Constructor Summary
MedlineParser(boolean includeRawXML)
          Deprecated. Construct a MEDLINE parser no initial handler.
MedlineParser(MedlineHandler handler, boolean includeRawXML)
          Deprecated. Construct a MEDLINE parser with the specified handler.
 
Method Summary
protected  DefaultHandler getXMLHandler()
          Deprecated. 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

MedlineParser

public MedlineParser(boolean includeRawXML)
Deprecated. 
Construct a MEDLINE parser no initial handler.

Parameters:
includeRawXML - Set to true if the raw XML will be available as part of the processed citation.

MedlineParser

public MedlineParser(MedlineHandler handler,
                     boolean includeRawXML)
Deprecated. 
Construct a MEDLINE parser with the specified handler.

Parameters:
handler - Handler for the citations.
includeRawXML - Set to true if the raw XML will be available as part of the processed citation.
Method Detail

parse

@Deprecated
public void parse(InputSource inSource,
                             MedlineHandler handler)
           throws IOException,
                  SAXException
Deprecated. Use setHandler(MedlineHandler) followed by parse(InputSource).

Parse the MEDLINE citations in the specified input source and give them to the specified handler for processing.

Parameters:
inSource - Input source to parse.
handler - MEDLINE handler for processing citations.
Throws:
IOException
SAXException

getXMLHandler

protected DefaultHandler getXMLHandler()
Deprecated. 
Description copied from class: XMLParser
Return the default handler for SAX events. This default handler should wrap the Handler 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.

Specified by:
getXMLHandler in class XMLParser<MedlineHandler>
Returns:
SAX handler for XML parsing.