com.aliasi.medline
Interface MedlineHandler

All Superinterfaces:
Handler, ObjectHandler<MedlineCitation>

public interface MedlineHandler
extends ObjectHandler<MedlineCitation>

The MedlineHandler interface specifies a single method that applies to a MEDLINE citation. The standard usage for a handler is to handle citations generated by a MedlineParser.

Each year, the NLM publishes a baseline version of MEDLINE, with a single entry per citation. Parsing the baseline, each citation will result in a single call to the method handle(MedlineCitation).

On an ongoing basis (5 times weekly), the NLM publishes updates for MEDLINE. These updates contain new citations, replacement citations, and deletions. New and replacement citations result in a call to handle(MedlineCitation) just as when parsing the baseline. It is up to the handler implementation to detect replacements through duplicated PubMed identifiers in the citation. The deletions in the MEDLINE updates result in calls to the method delete(String) which indicate the PubMed identifier of the citation to delete.

For more information, see the LingPipe tutorial on parsing MEDLINE.

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

Method Summary
 void delete(String pmid)
          Delete the citation with the specified PubMed identifier.
 void handle(MedlineCitation citation)
          Deprecated. See class documentation.
 

Method Detail

handle

@Deprecated
void handle(MedlineCitation citation)
Deprecated. See class documentation.

Handle the specified citation. When parsing the MEDLINE baseline, this method will be called exactly once for each baseline citation. When parsing the MEDLINE updates, this method may be called more than once for a given citation, with later calls taking precedence over earlier calls.

Specified by:
handle in interface ObjectHandler<MedlineCitation>
Parameters:
citation - MEDLINE citation that is visited.

delete

void delete(String pmid)
Delete the citation with the specified PubMed identifier. These events will be called only when parsing the MEDLINE updates; there are no deletions in the yearly baselines. This method will not be called for citations that are being replaced; handle(MedlineCitation) will be called a second time instead.

Parameters:
pmid - Identifier of citation to delete.