LexCheck
2011 Version

gov.nih.nlm.nls.lexCheck.Lib
Class LexRecord

java.lang.Object
  extended by gov.nih.nlm.nls.lexCheck.Lib.LexRecord

public class LexRecord
extends java.lang.Object

This class provides a Java object for a lexical record.

History:

Version:
V-2011
Author:
NLM Lexical System Development Team

Constructor Summary
LexRecord()
          Creates a default lexical record object
 
Method Summary
 java.util.Vector<java.lang.String> GetAbbreviations()
          Get the abbreviations of this lexical record.
 java.util.Vector<java.lang.String> GetAcronyms()
          Get the acronyms of this lexical record.
 java.util.Vector<java.lang.String> GetAnnotations()
          Get the annotations of this lexical record.
 java.lang.String GetBase()
          Get the base of this lexical record.
 java.lang.String GetCategory()
          Get the category name of this lexical record.
 CatEntry GetCatEntry()
          Get the category entry of this lexical record
 java.lang.String GetDbFormatText(java.lang.String cDate)
          Get the fixed text of this lexical object.
 java.lang.String GetEnd()
          Get the record end curly bracket of this lexical record.
 java.lang.String GetEui()
          Get the Eui of this lexical record.
 InflVarsAndAgreements GetInflVarsAndAgreements()
          Get the derived inflectional variants of this lexical record
 java.util.Vector<java.lang.String> GetNominalizations()
          Get the nominalization of this lexical record.
 java.lang.String GetReleaseFormatText()
          Get the release format of this lexical object 1.
 java.lang.String GetSignature()
          Get the signature of this lexical record.
 java.util.Vector<java.lang.String> GetSpellingVars()
          Get the spelling variants of this lexical record.
 java.lang.String GetText()
          Get the text format of this lexical object
 java.util.Vector<java.lang.String> GetVariants()
          Get the variants of this lexical record.
 java.lang.String GetXml()
          Get the xml format of a lexical record with root of lexRecords
 java.lang.String GetXml(int indLevel)
          Get the xml format of a lexical record with root of lexRecord
static java.lang.String GetXmlHeader()
          Get xml header
static java.lang.String GetXmlRootBeginTag()
          Get the xml format of a lexical records begin tag
static java.lang.String GetXmlRootEndTag()
          Get the xml format of a lexical records begin tag
static void main(java.lang.String[] args)
           
 void Print()
          print out the text and xml for this lexical record
 void PrintDbFormatText(java.lang.String cDate)
          print out the text for the database format lexical record
 void PrintReleaseFormatText()
          print out the text for the release lexical record
 void PrintText()
          print out the text for this lexical record
 void PrintXml()
          print out the xml for this lexical record
 void Reset()
          Reset the lexical record
 void SetAbbreviation(java.lang.String abbreviation)
          Set (add) an abbreviation for this lexical record
 void SetAbbreviations(java.util.Vector<java.lang.String> abbreviations)
          Set the entire collection of abbreviations for this lexical record
 void SetAcronym(java.lang.String acronym)
          Set (add) an acronym for this lexical record
 void SetAcronyms(java.util.Vector<java.lang.String> acronyms)
          Set the entire collection of acronyms for this lexical record
 void SetAnnotation(java.lang.String annotation)
          Set (add) an annotation for this lexical record
 void SetAnnotations(java.util.Vector<java.lang.String> annotations)
          Set the entire collection of annotations for this lexical record
 void SetBase(java.lang.String base)
          Set the base for this lexical record
 void SetCat(java.lang.String category)
          Set the category for this lexical record
 void SetCatEntry(CatEntry catEntry)
          Set the category entry for this lexical record
 void SetEnd(java.lang.String end)
          Set the record end currly bracket for this lexical record
 void SetEui(java.lang.String eui)
          Set the Eui for this lexical record
 void SetLexRecord(LexRecord lexRecord)
          set the lexical record to a given lexRecord
 void SetNominalizations(java.util.Vector<java.lang.String> nominalizations)
          Set the entire collection of nominalizations for this lexical record
 void SetPrintXmlHeader(boolean printXmlHeader)
          Set the flag to print out xml header
 void SetSignature(java.lang.String signature)
          Set signature for this lexical record
 void SetSpellingVar(java.lang.String spellingVar)
          Set (add) a spelling variant for this lexical record
 void SetSpellingVars(java.util.Vector<java.lang.String> spellingVars)
          Set the entire collection of spelling variants for this lexical record
 void SetVariants(java.util.Vector<java.lang.String> variants)
          Set the entire collection of variants for this lexical record.
 void SetXmlHeader(java.lang.String xmlHeader)
          Set the xml header
static void SetXmlRootTag(java.lang.String xmlRootTag)
          Set the xml root tag, lexRecords
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexRecord

public LexRecord()
Creates a default lexical record object

Method Detail

SetLexRecord

public void SetLexRecord(LexRecord lexRecord)
set the lexical record to a given lexRecord


Reset

public void Reset()
Reset the lexical record


GetXml

public java.lang.String GetXml()
Get the xml format of a lexical record with root of lexRecords

Returns:
xml format of the lexical record

GetXmlRootBeginTag

public static java.lang.String GetXmlRootBeginTag()
Get the xml format of a lexical records begin tag

Returns:
xml begin tag of the lexical records

GetXmlRootEndTag

public static java.lang.String GetXmlRootEndTag()
Get the xml format of a lexical records begin tag

Returns:
xml begin tag of the lexical records

GetXml

public java.lang.String GetXml(int indLevel)
Get the xml format of a lexical record with root of lexRecord

Returns:
xml format of the lexical record

GetText

public java.lang.String GetText()
Get the text format of this lexical object

Returns:
text format of this lexical object

GetReleaseFormatText

public java.lang.String GetReleaseFormatText()
Get the release format of this lexical object 1. remove annotation 2. remove signature

Returns:
text format of this lexical object

GetDbFormatText

public java.lang.String GetDbFormatText(java.lang.String cDate)
Get the fixed text of this lexical object. The steps are:
  1. add base into irreg
  2. rm signature from lexRecord
  3. add eui|base|cat|cSig|mSig|aSig|lastAct|cDate|mDate|aDate|lexRecord
This format is used as the input of LexBuild

Returns:
text format of this lexical object

GetInflVarsAndAgreements

public InflVarsAndAgreements GetInflVarsAndAgreements()
Get the derived inflectional variants of this lexical record

Returns:
Java object of InflVarsAndAgreements

Print

public void Print()
print out the text and xml for this lexical record


PrintReleaseFormatText

public void PrintReleaseFormatText()
print out the text for the release lexical record


PrintDbFormatText

public void PrintDbFormatText(java.lang.String cDate)
print out the text for the database format lexical record


PrintText

public void PrintText()
print out the text for this lexical record


PrintXml

public void PrintXml()
print out the xml for this lexical record


GetBase

public java.lang.String GetBase()
Get the base of this lexical record.

Returns:
base in String

GetEui

public java.lang.String GetEui()
Get the Eui of this lexical record.

Returns:
Eui in String

GetSpellingVars

public java.util.Vector<java.lang.String> GetSpellingVars()
Get the spelling variants of this lexical record.

Returns:
a Vector collection of spelling variants

GetAcronyms

public java.util.Vector<java.lang.String> GetAcronyms()
Get the acronyms of this lexical record.

Returns:
a Vector collection of acronyms

GetAbbreviations

public java.util.Vector<java.lang.String> GetAbbreviations()
Get the abbreviations of this lexical record.

Returns:
a Vector collection of abbreviations

GetNominalizations

public java.util.Vector<java.lang.String> GetNominalizations()
Get the nominalization of this lexical record. Return an empty vector if category is not verb, noun, or adj

Returns:
a Vector collection of abbreviations

GetVariants

public java.util.Vector<java.lang.String> GetVariants()
Get the variants of this lexical record. Return an empty Vector for the following: - Only one variant if category is det - No variants if category is prep, conj, compl

Returns:
a Vector collection of variant(s)

GetAnnotations

public java.util.Vector<java.lang.String> GetAnnotations()
Get the annotations of this lexical record.

Returns:
a Vector collection of annotations

GetSignature

public java.lang.String GetSignature()
Get the signature of this lexical record.

Returns:
signature in String

GetCategory

public java.lang.String GetCategory()
Get the category name of this lexical record.

Returns:
category name in String

GetEnd

public java.lang.String GetEnd()
Get the record end curly bracket of this lexical record.

Returns:
record end curly bracket

SetBase

public void SetBase(java.lang.String base)
Set the base for this lexical record

Parameters:
base - the base form

SetEui

public void SetEui(java.lang.String eui)
Set the Eui for this lexical record

Parameters:
eui - the entry unique identifier

SetSpellingVar

public void SetSpellingVar(java.lang.String spellingVar)
Set (add) a spelling variant for this lexical record

Parameters:
spellingVar - spelling variant to be added

SetSpellingVars

public void SetSpellingVars(java.util.Vector<java.lang.String> spellingVars)
Set the entire collection of spelling variants for this lexical record

Parameters:
spellingVars - the whole collection of spelling variants

SetAcronym

public void SetAcronym(java.lang.String acronym)
Set (add) an acronym for this lexical record

Parameters:
acronym - acronym to be added

SetAbbreviation

public void SetAbbreviation(java.lang.String abbreviation)
Set (add) an abbreviation for this lexical record

Parameters:
abbreviation - abbreviation to be added

SetAnnotation

public void SetAnnotation(java.lang.String annotation)
Set (add) an annotation for this lexical record

Parameters:
annotation - annotation to be added

SetAcronyms

public void SetAcronyms(java.util.Vector<java.lang.String> acronyms)
Set the entire collection of acronyms for this lexical record

Parameters:
acronyms - the whole collection of acronyms to be set

SetAbbreviations

public void SetAbbreviations(java.util.Vector<java.lang.String> abbreviations)
Set the entire collection of abbreviations for this lexical record

Parameters:
abbreviations - the whole collection of abbreviations to be set

SetNominalizations

public void SetNominalizations(java.util.Vector<java.lang.String> nominalizations)
Set the entire collection of nominalizations for this lexical record

Parameters:
nominalizations - the whole list of nominalizations to be set

SetVariants

public void SetVariants(java.util.Vector<java.lang.String> variants)
Set the entire collection of variants for this lexical record. Do nothing if category is det, prep, conj, compl

Parameters:
variants - the whole collection of variants to be set

SetAnnotations

public void SetAnnotations(java.util.Vector<java.lang.String> annotations)
Set the entire collection of annotations for this lexical record

Parameters:
annotations - the whole collection of annotations to be set

SetSignature

public void SetSignature(java.lang.String signature)
Set signature for this lexical record

Parameters:
signature - the signature to be set

SetCat

public void SetCat(java.lang.String category)
Set the category for this lexical record

Parameters:
category - the name of category to be set

SetCatEntry

public void SetCatEntry(CatEntry catEntry)
Set the category entry for this lexical record

Parameters:
catEntry - the category entry to be set

SetEnd

public void SetEnd(java.lang.String end)
Set the record end currly bracket for this lexical record

Parameters:
end - the record end currly bracket to be set

SetPrintXmlHeader

public void SetPrintXmlHeader(boolean printXmlHeader)
Set the flag to print out xml header

Parameters:
printXmlHeader - xml header printing flag

SetXmlHeader

public void SetXmlHeader(java.lang.String xmlHeader)
Set the xml header

Parameters:
xmlHeader - xml header

SetXmlRootTag

public static void SetXmlRootTag(java.lang.String xmlRootTag)
Set the xml root tag, lexRecords

Parameters:
xmlRootTag - xml root tag

GetCatEntry

public CatEntry GetCatEntry()
Get the category entry of this lexical record

Returns:
category entry

GetXmlHeader

public static java.lang.String GetXmlHeader()
Get xml header

Returns:
xml header

main

public static void main(java.lang.String[] args)

LexCheck
2011 Version

Submit a bug or feature

Copyright © 2011 National Library of Medicine