gov.nih.nlm.umls.meta.impl
Class IndexEntryImpl

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.IndexEntryImpl
All Implemented Interfaces:
IndexEntry
Direct Known Subclasses:
LowercaseWordIndexEntryImpl, NormalizedStringIndexEntryImpl, NormalizedWordIndexEntryImpl

public class IndexEntryImpl
extends Object
implements IndexEntry

Default implementation of the IndexEntry interface.

Author:
Deborah Shapiro, Brian Carlsen

Constructor Summary
IndexEntryImpl()
          Instantiates an empty IndexEntry.
IndexEntryImpl(IndexEntry ie)
          Instantiates an IndexEntry from the specified IndexEntry.
 
Method Summary
 int compareTo(Object o)
          Compares this IndexEntry to another one.
 boolean equals(Object o)
          Returns true if the specified object is equal to this object.
 String getConceptIdentifier()
          Returns a String representation of the CUI.
 String getCui()
          Returns a String representation of the CUI.
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 String getLanguage()
          Returns a String representation of the language.
 String getLat()
          Returns a String representation of the language.
 String getLui()
          Returns a String representation of the LUI.
 String getStringIdentifier()
          Return the string identifier (SUI).
 String getSui()
          Returns a String representation of the SUI.
 String getTermIdentifier()
          Returns the term identifier (LUI).
 String getValue()
          Returns the String that is being indexed.
 int hashCode()
          Return a hash code based on all fields.
 void setConceptIdentifier(String cui)
          Sets the CUI.
 void setCui(String cui)
          Sets the CUI.
 void setLanguage(String lat)
          Sets the language abbreviation.
 void setLat(String lat)
          Sets the language abbreviation.
 void setLui(String lui)
          Sets the LUI.
 void setStringIdentifier(String sui)
          Sets the string identifier (SUI).
 void setSui(String sui)
          Sets the SUI.
 void setTermIdentifier(String lui)
          Sets the term identifier (LUI).
 void setValue(String value)
          Set the String being indexed
 String toString()
          Returns a String representation of the index entry.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexEntryImpl

public IndexEntryImpl()
Instantiates an empty IndexEntry.


IndexEntryImpl

public IndexEntryImpl(IndexEntry ie)
Instantiates an IndexEntry from the specified IndexEntry.

Parameters:
ie - IndexEntry to be copied
Method Detail

hashCode

public int hashCode()
Return a hash code based on all fields.

Returns:
a hash code based on all fields

equals

public boolean equals(Object o)
Returns true if the specified object is equal to this object. The specified object must be an IndexEntry with matching key fields.

Parameters:
o - an Object to compare against
Returns:
boolean true if Object o is equal false otherwise

toString

public String toString()
Returns a String representation of the index entry.

Returns:
a String representation of the index entry

getKeyFields

public String getKeyFields()
Returns a String key which can be used by equals, compareTo, and hashCode methods.

Specified by:
getKeyFields in interface IndexEntry
Returns:
a String composed from the cui, aui, sui, versioned source, tty, and code.

compareTo

public int compareTo(Object o)
Compares this IndexEntry to another one. Results are indeterminate if the specified parameter is not of the same class.

Parameters:
o - the Object to compare to
Returns:
int representing the relative ordering of this and the compare-to object

getCui

public String getCui()
Returns a String representation of the CUI.

Specified by:
getCui in interface IndexEntry
Returns:
a String representation of the CUI

setCui

public void setCui(String cui)
Sets the CUI.

Specified by:
setCui in interface IndexEntry
Parameters:
cui - the String CUI value

getConceptIdentifier

public String getConceptIdentifier()
Returns a String representation of the CUI.

Specified by:
getConceptIdentifier in interface IndexEntry
Returns:
a String representation of the CUI

setConceptIdentifier

public void setConceptIdentifier(String cui)
Sets the CUI.

Specified by:
setConceptIdentifier in interface IndexEntry
Parameters:
cui - the String CUI value

getLui

public String getLui()
Returns a String representation of the LUI.

Specified by:
getLui in interface IndexEntry
Returns:
a String representation of the LUI

setLui

public void setLui(String lui)
Sets the LUI.

Specified by:
setLui in interface IndexEntry
Parameters:
lui - the String LUI value

getTermIdentifier

public String getTermIdentifier()
Returns the term identifier (LUI).

Specified by:
getTermIdentifier in interface IndexEntry
Returns:
the LUI

setTermIdentifier

public void setTermIdentifier(String lui)
Sets the term identifier (LUI).

Specified by:
setTermIdentifier in interface IndexEntry
Parameters:
lui - the LUI

getSui

public String getSui()
Returns a String representation of the SUI.

Specified by:
getSui in interface IndexEntry
Returns:
a String representation of the SUI

setSui

public void setSui(String sui)
Sets the SUI.

Specified by:
setSui in interface IndexEntry
Parameters:
sui - a String SUI value

getStringIdentifier

public String getStringIdentifier()
Return the string identifier (SUI).

Specified by:
getStringIdentifier in interface IndexEntry
Returns:
the SUI

setStringIdentifier

public void setStringIdentifier(String sui)
Sets the string identifier (SUI).

Specified by:
setStringIdentifier in interface IndexEntry
Parameters:
sui - the SUI

getLat

public String getLat()
Returns a String representation of the language.

Specified by:
getLat in interface IndexEntry
Returns:
a String representation of the language

setLat

public void setLat(String lat)
Sets the language abbreviation.

Specified by:
setLat in interface IndexEntry
Parameters:
lat - the language abbreviation

getLanguage

public String getLanguage()
Returns a String representation of the language.

Specified by:
getLanguage in interface IndexEntry
Returns:
a String representation of the language

setLanguage

public void setLanguage(String lat)
Sets the language abbreviation.

Specified by:
setLanguage in interface IndexEntry
Parameters:
lat - the language abbreviation

getValue

public String getValue()
Returns the String that is being indexed.

Specified by:
getValue in interface IndexEntry
Returns:
the String that is being indexed

setValue

public void setValue(String value)
Set the String being indexed

Specified by:
setValue in interface IndexEntry
Parameters:
value - the String being indexed


Copyright ©2005