|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.meta.impl.TermImpl
Default implementation of the Term
interface.
Constructor Summary | |
TermImpl()
Instantiates an empty Term . |
|
TermImpl(Term term)
Instantiates a Term from the specified Term . |
Method Summary | |
void |
addTermAttribute(TermAttribute ta)
Adds the specified TermAttribute . |
void |
addTermVariant(StringInfo tv)
Adds the specified term variant. |
void |
clearTermAttributes()
Removes all TermAttribute s. |
void |
clearTermVariants()
Removes all term variants. |
int |
compareTo(Object o)
Compares this Term to another one. |
boolean |
equals(Object o)
Returns true if the specified object is
equal to this object. |
Concept |
getConcept()
Returns the Concept that holds this Term . |
String |
getKeyFields()
Returns a String key which can be used
by equals, compareTo, and hashCode methods. |
Language |
getLanguage()
Returns the Language (LAT). |
Language |
getLat()
Shorthand for getLanguage() . |
String |
getLui()
Shorthand for getTermIdentifier() . |
String |
getName()
Sets the name (STR). |
String |
getStr()
Shorthand for getName() . |
TermAttribute[] |
getTermAttributes()
Returns all TermAttribute s. |
List |
getTermAttributesAsList()
Returns all TermAttribute s as a List . |
String |
getTermIdentifier()
Returns the term identifier (LUI). |
TermStatus |
getTermStatus()
Returns the TermStatus (TS). |
StringInfo[] |
getTermVariants()
Returns all StringInfo term variants. |
List |
getTermVariantsAsList()
Returns all StringInfo term variants as a List . |
TermStatus |
getTs()
Shorthand for getTermStatus() . |
int |
hashCode()
Return a hash code based on key fields. |
boolean |
hasPreferredLui()
Shorthand for hasPreferredTermIdentifier() |
boolean |
hasPreferredTermIdentifier()
Indicates whether or not this Term is the preferred Term
of the Concept . |
void |
removeTermAttribute(TermAttribute ta)
Removes the specified TermAttribute . |
void |
removeTermVariant(StringInfo tv)
Removes the specified term variant. |
void |
setConcept(Concept concept)
Sets the Concept that holds this Term . |
void |
setLanguage(Language lat)
Sets the Language (LAT). |
void |
setLat(Language lat)
Shorthand for setLanguage(Language) . |
void |
setLui(String lui)
Shorthand for setTermIdentifier(String) . |
void |
setName(String str)
Sets the name (STR). |
void |
setStr(String str)
Shorthand for setName(String) . |
void |
setTermAttributes(List tas)
Replaces TermAttribute s with the specified List |
void |
setTermAttributes(TermAttribute[] tas)
Replaces the TermAttribute s with the specified TermAttribute objects. |
void |
setTermIdentifier(String lui)
Sets the term identifier (LUI). |
void |
setTermStatus(TermStatus ts)
Sets the TermStatus (TS). |
void |
setTermVariants(List tvs)
Replaces term variants with the specified List |
void |
setTermVariants(StringInfo[] tvs)
Replaces term variants with the specified StringInfo objects. |
void |
setTs(TermStatus ts)
Shorthand for setTermStatus(TermStatus) . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TermImpl()
Term
.
public TermImpl(Term term)
Term
from the specified Term
.
term
- Term
to be copiedMethod Detail |
public Language getLanguage()
Language
(LAT).
getLanguage
in interface Term
Language
public Language getLat()
getLanguage()
.
getLat
in interface Term
Language
public void setLanguage(Language lat)
Language
(LAT).
setLanguage
in interface Term
lat
- the Language
public void setLat(Language lat)
setLanguage(Language)
.
setLat
in interface Term
lat
- the Language
public TermStatus getTermStatus()
TermStatus
(TS).
getTermStatus
in interface Term
TermStatus
public TermStatus getTs()
getTermStatus()
.
getTs
in interface Term
TermStatus
public void setTermStatus(TermStatus ts)
TermStatus
(TS).
setTermStatus
in interface Term
ts
- the TermStatus
public void setTs(TermStatus ts)
setTermStatus(TermStatus)
.
setTs
in interface Term
ts
- the TermStatus
public String getLui()
getTermIdentifier()
.
getLui
in interface Term
public void setLui(String lui)
setTermIdentifier(String)
.
setLui
in interface Term
lui
- the LUIpublic String getTermIdentifier()
getTermIdentifier
in interface Term
public void setTermIdentifier(String lui)
setTermIdentifier
in interface Term
lui
- the LUIpublic String getName()
getName
in interface Term
public String getStr()
getName()
.
getStr
in interface Term
public void setName(String str)
setName
in interface Term
str
- the namepublic void setStr(String str)
setName(String)
.
setStr
in interface Term
str
- the namepublic StringInfo[] getTermVariants()
StringInfo
term variants.
getTermVariants
in interface Term
StringInfo
objectspublic List getTermVariantsAsList()
StringInfo
term variants as a List
.
getTermVariantsAsList
in interface Term
StringInfo
term variants as a List
public void addTermVariant(StringInfo tv)
addTermVariant
in interface Term
tv
- a StringInfo
term variant to addpublic void clearTermVariants()
clearTermVariants
in interface Term
public void removeTermVariant(StringInfo tv)
removeTermVariant
in interface Term
tv
- a StringInfo
term variant to removepublic void setTermVariants(StringInfo[] tvs)
StringInfo
objects.
setTermVariants
in interface Term
tvs
- an array of StringInfo
objectspublic void setTermVariants(List tvs)
List
setTermVariants
in interface Term
tvs
- a List
of StringInfo
objectspublic TermAttribute[] getTermAttributes()
TermAttribute
s.
getTermAttributes
in interface Term
TermAttribute
objectspublic List getTermAttributesAsList()
TermAttribute
s as a List
.
getTermAttributesAsList
in interface Term
TermAttribute
s as a List
public void addTermAttribute(TermAttribute ta)
TermAttribute
.
addTermAttribute
in interface Term
ta
- a TermAttribute
to addpublic void clearTermAttributes()
TermAttribute
s.
clearTermAttributes
in interface Term
public void removeTermAttribute(TermAttribute ta)
TermAttribute
.
removeTermAttribute
in interface Term
ta
- the TermAttribute
to removepublic void setTermAttributes(TermAttribute[] tas)
TermAttribute
s with the specified TermAttribute
objects.
setTermAttributes
in interface Term
tas
- an array of TermAttribute
objectspublic void setTermAttributes(List tas)
TermAttribute
s with the specified List
setTermAttributes
in interface Term
tas
- a List
of TermAttribute
objectspublic Concept getConcept()
Concept
that holds this Term
.
getConcept
in interface ConceptElement
Concept
that holds this Term
public void setConcept(Concept concept)
Concept
that holds this Term
.
setConcept
in interface ConceptElement
concept
- the Concept
that holds this Term
public String getKeyFields()
String
key which can be used
by equals, compareTo, and hashCode methods.
getKeyFields
in interface Term
String
composed from the cui and lui.public int hashCode()
public boolean equals(Object o)
true
if the specified object is
equal to this object. The specified object must be an
Term
with matching key fields.
o
- an Object
to compare against
true
if Object o is equal
false
otherwisepublic int compareTo(Object o)
Term
to another one. Results
are indeterminate if the specified parameter is not of the
same class.
compareTo
in interface Comparable
o
- the Object
to compare to
int
representing the relative ordering
of this and the compare-to objectpublic boolean hasPreferredTermIdentifier()
Term
is the preferred Term
of the Concept
. In other words, does this Term
have
the same LUI as the preferred Term
of the Concept
.
hasPreferredTermIdentifier
in interface Term
true
if so, false
otherwisepublic boolean hasPreferredLui()
hasPreferredTermIdentifier()
hasPreferredLui
in interface Term
true
if so, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |