|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.umls.meta.impl.ContextImpl
public class ContextImpl
Default implementation of the Context interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface gov.nih.nlm.umls.meta.AtomElement |
|---|
AtomElement.ByLanguageRestrictor, AtomElement.BySourceRestrictor |
| Nested classes/interfaces inherited from interface gov.nih.nlm.umls.meta.SourceElement |
|---|
SourceElement.BySourceComparator, SourceElement.BySourceRestrictor |
| Constructor Summary | |
|---|---|
ContextImpl()
Instantiates an empty Context. |
|
ContextImpl(Context cxt)
Instantiates a Context from the specified Context. |
|
| Method Summary | |
|---|---|
void |
addContextMember(ContextMember cm)
Adds the specified ContextMember. |
void |
clearContextMembers()
Removes all ContextMembers. |
int |
compareTo(Object o)
Compares this Source 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. |
ContextMember[] |
getAncestorMembers()
Returns only the ContextMembers that have the context
member label (CXL) of "ANC" or self. |
List |
getAncestorMembersAsList()
Returns only the ContextMembers that have the context
member label (CXL) of "ANC" or self. |
Atom |
getAtom()
Returns the Atom this Context is connected to. |
ContextMember[] |
getChildMembers()
Returns only the ContextMembers that have the context
member label (CXL) of "CHD" or child. |
List |
getChildMembersAsList()
Returns only the ContextMembers that have the context
member label (CXL) of "CHD" or child. |
Concept |
getConcept()
Returns the Concept that holds this Context |
ContentView |
getContentView()
Returns tbe ContentView definition for this Context (CVF). |
ContextMember[] |
getContextMembers()
Returns all ContextMembers. |
List |
getContextMembersAsList()
Returns all ContextMembers as a List. |
int |
getContextNumber()
Returns the context number (CXN). |
ContentView |
getCvf()
Shorthand for getContentView(). |
int |
getCxn()
This is a Shorthand for getContextNumber() |
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 |
getParentAtomIdentifier()
Returns the parent atom identifier (PAUI). |
String[] |
getPathToRoot()
Returns the path to the root (PTR) as a String[]
of AUI values. |
List |
getPathToRootAsList()
Returns the path to the root (PTR) as a List of AUI values. |
String |
getPathToRootAsString()
Returns the path to the root (PTR) as a "." separated list of AUI values. |
String |
getPaui()
Shorthand for getParentAtomIdentifier(). |
String |
getPtr()
Shorthand for getPathToRootAsString(). |
AdditionalRelationshipLabel |
getRela()
Shorthand for getAdditionalRelationshipLabel(). |
ContextMember |
getSelfMember()
Returns the ContextMember that has the context
member label (CXL) of "CCP" or self. |
ContextMember[] |
getSiblingMembers()
Returns only the ContextMembers that have the context
member label (CXL) of "SIB" or self. |
List |
getSiblingMembersAsList()
Returns only the ContextMembers that have the context
member label (CXL) of "SIB" or self. |
Source |
getSource()
Returns the source for this Context. |
int |
hashCode()
Return a hash code based on key fields. |
boolean |
isTopLevel()
Indicates if context is of the top level. |
void |
removeContextMember(ContextMember cm)
Removes the specified ContextMember. |
void |
setAdditionalRelationshipLabel(AdditionalRelationshipLabel rela)
Sets the AdditionalRelationshipLabel (RELA) from the context member to its parent. |
void |
setAtom(Atom atom)
Sets the Atom this Context is connected to. |
void |
setConcept(Concept concept)
Sets the Concept that holds this Context |
void |
setContentView(ContentView cvf)
Sets tbe ContentView definition for this Context (CVF). |
void |
setContextMembers(ContextMember[] cms)
Replaces the ContextMembers with the ones in the specified array. |
void |
setContextMembers(List cms)
Replaces the ContextMembers with the ones in the specified List. |
void |
setContextNumber(int cxn)
Sets the context number (CXN). |
void |
setCvf(ContentView cvf)
Shorthand for setContentView(ContentView). |
void |
setCxn(int cxn)
Shorthand for setContextNumber(int). |
void |
setHcd(String hcd)
Shorthand for setHierarchicalCode(String). |
void |
setHierarchicalCode(String hcd)
Sets the hierarchical code (HCD). |
void |
setParentAtomIdentifier(String paui)
Sets the parent atom identifier (PAUI). |
void |
setPathToRoot(String ptr)
Sets the path to the root (PTR) as a "." separated list of AUI values. |
void |
setPaui(String paui)
Shorthand for setParentAtomIdentifier(String). |
void |
setPtr(String ptr)
Shorthand for setPathToRoot(String). |
void |
setRela(AdditionalRelationshipLabel rela)
Shorthand for setAdditionalRelationshipLabel(AdditionalRelationshipLabel). |
void |
setSource(Source source)
Sets the source for this Context. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContextImpl()
Context.
public ContextImpl(Context cxt)
Context from the specified Context.
cxt - Context to be copied| Method Detail |
|---|
public Atom getAtom()
Atom this Context is connected to.
getAtom in interface AtomElementAtom this Context is connected topublic void setAtom(Atom atom)
Atom this Context is connected to.
setAtom in interface AtomElementatom - the Atom this Context is connected topublic int getContextNumber()
getContextNumber in interface Contextint context numberpublic void setContextNumber(int cxn)
setContextNumber in interface Contextcxn - the int context numberpublic int getCxn()
getContextNumber()
getCxn in interface Contextintpublic void setCxn(int cxn)
setContextNumber(int).
setCxn in interface Contextcxn - int context numberpublic String getPaui()
getParentAtomIdentifier().
getPaui in interface Contextpublic void setPaui(String paui)
setParentAtomIdentifier(String).
setPaui in interface Contextpaui - the PAUIpublic String getParentAtomIdentifier()
getParentAtomIdentifier in interface Contextpublic void setParentAtomIdentifier(String paui)
setParentAtomIdentifier in interface Contextpaui - the PAUIpublic String getPathToRootAsString()
getPathToRootAsString in interface Contextpublic List getPathToRootAsList()
List of AUI values.
getPathToRootAsList in interface ContextList of AUI valuespublic String[] getPathToRoot()
String[]
of AUI values.
getPathToRoot in interface ContextString[]
of AUI valuespublic String getPtr()
getPathToRootAsString().
getPtr in interface Contextpublic void setPathToRoot(String ptr)
setPathToRoot in interface Contextptr - the path to the rootpublic void setPtr(String ptr)
setPathToRoot(String).
setPtr in interface Contextptr - the path to the rootpublic ContextMember[] getContextMembers()
ContextMembers. These are the ancestors,
children, and siblings.
getContextMembers in interface ContextContextMemberspublic List getContextMembersAsList()
ContextMembers as a List. These are the ancestors,
children, and siblings.
getContextMembersAsList in interface ContextList of ContextMemberspublic void addContextMember(ContextMember cm)
ContextMember.
addContextMember in interface Contextcm - the ContextMember to be addedpublic void removeContextMember(ContextMember cm)
ContextMember.
removeContextMember in interface Contextcm - the ContextMember to be removedpublic void clearContextMembers()
ContextMembers.
clearContextMembers in interface Contextpublic void setContextMembers(ContextMember[] cms)
ContextMembers with the ones in the specified array.
setContextMembers in interface Contextcms - a ContextMember[]public void setContextMembers(List cms)
ContextMembers with the ones in the specified List.
setContextMembers in interface Contextcms - a List of ContextMemberspublic Concept getConcept()
Concept that holds this Context
getConcept in interface ConceptElementConcept that holds this Contextpublic void setConcept(Concept concept)
Concept that holds this Context
setConcept in interface ConceptElementconcept - the Concept that holds this Contextpublic Source getSource()
Context.
getSource in interface SourceElementSourcepublic void setSource(Source source)
Context.
setSource in interface SourceElementsource - Sourcepublic ContentView getContentView()
ContentView definition for this Context (CVF).
getContentView in interface ContentViewElementContentView definitionpublic void setContentView(ContentView cvf)
ContentView definition for this Context (CVF).
setContentView in interface ContentViewElementcvf - the ContentView definitionpublic ContentView getCvf()
getContentView().
getCvf in interface ContentViewElementContentView definitionpublic void setCvf(ContentView cvf)
setContentView(ContentView).
setCvf in interface ContentViewElementcvf - the ContentView definitionpublic String getHierarchicalCode()
getHierarchicalCode in interface Contextpublic String getHcd()
getHierarchicalCode().
getHcd in interface Contextpublic void setHierarchicalCode(String hcd)
setHierarchicalCode in interface Contexthcd - the hierarchical codepublic void setHcd(String hcd)
setHierarchicalCode(String).
setHcd in interface Contexthcd - the hierarchical codepublic AdditionalRelationshipLabel getAdditionalRelationshipLabel()
AdditionalRelationshipLabel (RELA) from the context member to its parent.
getAdditionalRelationshipLabel in interface ContextAdditionalRelationshipLabelpublic AdditionalRelationshipLabel getRela()
getAdditionalRelationshipLabel().
getRela in interface ContextAdditionalRelationshipLabelpublic void setAdditionalRelationshipLabel(AdditionalRelationshipLabel rela)
AdditionalRelationshipLabel (RELA) from the context member to its parent.
setAdditionalRelationshipLabel in interface Contextrela - the AdditionalRelationshipLabelpublic void setRela(AdditionalRelationshipLabel rela)
setAdditionalRelationshipLabel(AdditionalRelationshipLabel).
setRela in interface Contextrela - the AdditionalRelationshipLabelpublic ContextMember getSelfMember()
ContextMember that has the context
member label (CXL) of "CCP" or self.
getSelfMember in interface ContextContextMember with label "CCP"public ContextMember[] getChildMembers()
ContextMembers that have the context
member label (CXL) of "CHD" or child.
getChildMembers in interface ContextContextMember[] of members with label "CHD"public List getChildMembersAsList()
ContextMembers that have the context
member label (CXL) of "CHD" or child.
getChildMembersAsList in interface ContextContextMember[] of members with label "CHD"public ContextMember[] getAncestorMembers()
ContextMembers that have the context
member label (CXL) of "ANC" or self.
getAncestorMembers in interface ContextContextMember[] of members with label "ANC"public List getAncestorMembersAsList()
ContextMembers that have the context
member label (CXL) of "ANC" or self.
getAncestorMembersAsList in interface ContextContextMember[] of members with label "ANC"public ContextMember[] getSiblingMembers()
ContextMembers that have the context
member label (CXL) of "SIB" or self.
getSiblingMembers in interface ContextContextMember[] of members with label "SIB"public List getSiblingMembersAsList()
ContextMembers that have the context
member label (CXL) of "SIB" or self.
getSiblingMembersAsList in interface ContextContextMember[] of members with label "SIB"public boolean isTopLevel()
isTopLevel in interface Contextboolean true if top level
false if otherwisepublic String getKeyFields()
String key which can be used
by equals, compareTo, and hashCode methods.
getKeyFields in interface ContextString composed from the cui, aui, sui,
versioned source, cxn, and code.public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
true if the specified object is
equal to this object. The specified object must be a
Context with matching key fields.
equals in class Objecto - an Object to compare against
true if Object o is equal
false otherwisepublic int compareTo(Object o)
Source to another one. Results
are indeterminate if the specified parameter is not of the
same class.
compareTo in interface Comparableo - 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 | ||||||||