|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.meta.impl.ContextMemberImpl
Default implementation of the ContextMember
interface.
Field Summary | |
protected String |
key_fields
|
protected boolean |
key_fields_flag
|
Constructor Summary | |
ContextMemberImpl()
Instantiates an empty ContextMember . |
|
ContextMemberImpl(ContextMember cm)
Instantiates a ContextMember from the specified ContextMember . |
Method Summary | |
int |
compareTo(Object o)
Compares this ContextMember to another one. |
boolean |
equals(Object o)
Returns true if the specified object is
equal to this object. |
AdditionalRelationshipLabel |
getAdditionalRelationshipLabel()
Returns the AdditionalRelationshipLabel (RELA) from the context member to its parent. |
String |
getCxl()
Shorthand for getLabel() . |
String |
getHcd()
Shorthand for getHierarchicalCode() . |
String |
getHierarchicalCode()
Returns the hierarchical code (HCD). |
String |
getKeyFields()
Returns a String key which can be used
by equals, compareTo, and hashCode methods. |
String |
getLabel()
Returns the label for this ContextMember (CXL). |
int |
getRank()
Returns the rank (RNK) if the member is an ancestor. |
AdditionalRelationshipLabel |
getRela()
Shorthand for getAdditionalRelationshipLabel() . |
Atom |
getRelatedAtom()
Returns the related Atom of the ancestor, sibling, or child. |
Concept |
getRelatedConcept()
Returns the related concept of the ancestor, sibling, or child. |
String |
getXc()
Returns the "has child flag" value (XC). |
boolean |
hasChild()
Indicates whether or not this context member has children. |
int |
hashCode()
Return a hash code based on key fields. |
void |
setAdditionalRelationshipLabel(AdditionalRelationshipLabel rela)
Sets the AdditionalRelationshipLabel (RELA) from the context member to its parent. |
void |
setCxl(String cxl)
Shorthand for setLabel(String) . |
void |
setHasChild(boolean xc)
Sets the flag indicating whether or not this ContextMember has a child. |
void |
setHcd(String hcd)
Shorthand for setHierarchicalCode(String) . |
void |
setHierarchicalCode(String hcd)
Sets the hierarchical code (HCD). |
void |
setLabel(String cxl)
Sets the label for this ContextMember . |
void |
setRank(int rnk)
Sets the rank (RNK) if the member is an ancestor |
void |
setRela(AdditionalRelationshipLabel rela)
Shorthand for setAdditionalRelationshipLabel(AdditionalRelationshipLabel) . |
void |
setRelatedAtom(Atom related_atom)
Sets the related atom of the ancestor, sibling, or child. |
void |
setRelatedConcept(Concept related_concept)
Sets the related concept of the ancestor, sibling, or child. |
void |
setXc(String xc)
Sets the "has child flag" value (XC). |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean key_fields_flag
protected String key_fields
Constructor Detail |
public ContextMemberImpl()
ContextMember
.
public ContextMemberImpl(ContextMember cm)
ContextMember
from the specified ContextMember
.
cm
- ContextMember
to be copiedMethod Detail |
public int getRank()
getRank
in interface ContextMember
int
rankpublic void setRank(int rnk)
setRank
in interface ContextMember
rnk
- the int
rankpublic Concept getRelatedConcept()
getRelatedConcept
in interface RelatedConceptElement
public void setRelatedConcept(Concept related_concept)
setRelatedConcept
in interface RelatedConceptElement
related_concept
- the related concept of the ancestor, sibling, or childpublic Atom getRelatedAtom()
getRelatedAtom
in interface RelatedAtomElement
public void setRelatedAtom(Atom related_atom)
setRelatedAtom
in interface RelatedAtomElement
related_atom
- the related atom of the ancestor, sibling, or childpublic String getHierarchicalCode()
getHierarchicalCode
in interface ContextMember
public String getHcd()
getHierarchicalCode()
.
getHcd
in interface ContextMember
public void setHierarchicalCode(String hcd)
setHierarchicalCode
in interface ContextMember
hcd
- the hierarchical codepublic void setHcd(String hcd)
setHierarchicalCode(String)
.
setHcd
in interface ContextMember
hcd
- the hierarchical codepublic AdditionalRelationshipLabel getAdditionalRelationshipLabel()
AdditionalRelationshipLabel
(RELA) from the context member to its parent.
getAdditionalRelationshipLabel
in interface ContextMember
AdditionalRelationshipLabel
public AdditionalRelationshipLabel getRela()
getAdditionalRelationshipLabel()
.
getRela
in interface ContextMember
AdditionalRelationshipLabel
public void setAdditionalRelationshipLabel(AdditionalRelationshipLabel rela)
AdditionalRelationshipLabel
(RELA) from the context member to its parent.
setAdditionalRelationshipLabel
in interface ContextMember
rela
- the AdditionalRelationshipLabel
public void setRela(AdditionalRelationshipLabel rela)
setAdditionalRelationshipLabel(AdditionalRelationshipLabel)
.
setRela
in interface ContextMember
rela
- the AdditionalRelationshipLabel
public String getXc()
getXc
in interface ContextMember
public void setXc(String xc)
setXc
in interface ContextMember
xc
- the "has child flag" valuepublic boolean hasChild()
hasChild
in interface ContextMember
true
if ContextMember
has a child,
false
if ContextMember
does not have a childpublic void setHasChild(boolean xc)
ContextMember
has a child.
setHasChild
in interface ContextMember
xc
- true
if ContextMember
has a child,
false
if ContextMember
does not have a childpublic String getLabel()
ContextMember
(CXL).
getLabel
in interface ContextMember
ContextMember
public String getCxl()
getLabel()
.
getCxl
in interface ContextMember
ContextMember
public void setLabel(String cxl)
ContextMember
.
setLabel
in interface ContextMember
cxl
- context labelpublic void setCxl(String cxl)
setLabel(String)
.
setCxl
in interface ContextMember
cxl
- the label for this ContextMember
public String getKeyFields()
String
key which can be used
by equals, compareTo, and hashCode methods.
getKeyFields
in interface ContextMember
String
composed from the cxl, rank, str
cui2, and aui2.public int hashCode()
public boolean equals(Object o)
true
if the specified object is
equal to this object. The specified object must be a
ContextMember
with matching key fields.
o
- an Object
to compare against
true
if Object o is equal
false
otherwisepublic int compareTo(Object o)
ContextMember
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 object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |