TC Java
2011 Version

gov.nih.nlm.nls.tc.Api
Class MltApi

java.lang.Object
  extended by gov.nih.nlm.nls.tc.Api.MltApi

public class MltApi
extends java.lang.Object

This class is the MEDLINE tokenizer, which provides a Java API to retrieve field information from MEDLINE citations by specifying field tag(s).

History:

Version:
V-2011
Author:
NLM Lexical Systems Group
See Also:
Design Document

Field Summary
protected  java.lang.String configFile_
           
 
Constructor Summary
MltApi(Configuration conf)
          Creates an MltApi object and initiate related data, using a specified subHeading objects.
MltApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
          Creates an MltApi object and initiate related data, using a specified properties to be overwritten in configuration.
MltApi(java.lang.String configFile)
          Creates an MltApi object and initiate related data, using a specified configuration file.
MltApi(Subheadings shs)
          Creates an MltApi object and initiate related data, using a specified subHeading objects.
 
Method Summary
 JidTaJds GetJidTaJds()
          Get JidTaJds object.
 java.util.Vector<MltObj> GetMltObjs(java.lang.String inStr, java.lang.String fieldTag, boolean sortFlag)
          Proceed MEDLINE tokenizer function and put pmid, jid, and tokenized text into a collection of MltObjs.
 java.lang.String Process(java.lang.String inStr, java.lang.String fieldTag, boolean sortFlag, boolean pmidFlag)
          Proceed MEDLINE tokenizer function.
 void Process(java.lang.String inFile, java.lang.String outFile, java.lang.String fieldTag, boolean sortFlag, boolean pmidFlag)
          Proceed MEDLINE tokenizer function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configFile_

protected java.lang.String configFile_
Constructor Detail

MltApi

public MltApi(Subheadings shs)
Creates an MltApi object and initiate related data, using a specified subHeading objects.

Parameters:
shs - subHeadings object

MltApi

public MltApi(java.lang.String configFile)
Creates an MltApi object and initiate related data, using a specified configuration file.

Parameters:
configFile - the absolute path of the configuration file

MltApi

public MltApi(Configuration conf)
Creates an MltApi object and initiate related data, using a specified subHeading objects.

Parameters:
conf - configuration object.

MltApi

public MltApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates an MltApi object and initiate related data, using a specified properties to be overwritten in configuration.

Parameters:
properties - properties to be overwrite in configuration
Method Detail

GetMltObjs

public java.util.Vector<MltObj> GetMltObjs(java.lang.String inStr,
                                           java.lang.String fieldTag,
                                           boolean sortFlag)
Proceed MEDLINE tokenizer function and put pmid, jid, and tokenized text into a collection of MltObjs. The tokenized feature is the same as Process. It takes the input text, tokenize field by the specified tag, and return the tokenized result. The inpus can be multiple records. In such case, the outputs of each record are represented in one line (when it's not in ALL tag).

Parameters:
inStr - input MEDLIE record
fieldTag - the field tag for infromtaion to be retrieved
sortFlag - the flag of sorting reocrd by PMID

GetJidTaJds

public JidTaJds GetJidTaJds()
Get JidTaJds object.

Returns:
Journal id, title, and descriptors

Process

public java.lang.String Process(java.lang.String inStr,
                                java.lang.String fieldTag,
                                boolean sortFlag,
                                boolean pmidFlag)
Proceed MEDLINE tokenizer function. It takes the input text, tokenize field by the specified tag, and return the tokenized result. The inpus can be multiple records. In such case, the outputs of each record are represented in one line (when it's not in ALL tag).

Parameters:
inStr - input MEDLIE record
fieldTag - the field tag for infromtaion to be retrieved
sortFlag - the flag of sorting reocrd by PMID
pmidFlag - the flag of putting PMID in the first field

Process

public void Process(java.lang.String inFile,
                    java.lang.String outFile,
                    java.lang.String fieldTag,
                    boolean sortFlag,
                    boolean pmidFlag)
Proceed MEDLINE tokenizer function. It read text from input file, tokenize field by the specified tag, and send to output file.

Parameters:
inFile - the path/name of input file
outFile - the path/name of output file
fieldTag - the field tag for infromtaion to be retrieved
sortFlag - the flag of sorting reocrd by PMID
pmidFlag - the flag of putting PMID in the first field

TC Java
2011 Version

Submit a bug or feature

Copyright © 2011 National Library of Medicine