|
||||||||||
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
Default implementation of the Context
interface.
Nested Class Summary |
Nested classes inherited from class gov.nih.nlm.umls.meta.AtomElement |
AtomElement.ByLanguageRestrictor, AtomElement.BySourceRestrictor |
Nested classes inherited from class 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 ContextMember s. |
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 ContextMember s that have the context
member label (CXL) of "ANC" or self. |
List |
getAncestorMembersAsList()
Returns only the ContextMember s 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 ContextMember s that have the context
member label (CXL) of "CHD" or child. |
List |
getChildMembersAsList()
Returns only the ContextMember s 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 ContextMember s. |
List |
getContextMembersAsList()
Returns all ContextMember s 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 ContextMember s that have the context
member label (CXL) of "SIB" or self. |
List |
getSiblingMembersAsList()
Returns only the ContextMember s 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 ContextMember s with the ones in the specified array. |
void |
setContextMembers(List cms)
Replaces the ContextMember s 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 copiedMethod Detail |
public Atom getAtom()
Atom
this Context
is connected to.
getAtom
in interface AtomElement
Atom
this Context
is connected topublic void setAtom(Atom atom)
Atom
this Context
is connected to.
setAtom
in interface AtomElement
atom
- the Atom
this Context
is connected topublic int getContextNumber()
getContextNumber
in interface Context
int
context numberpublic void setContextNumber(int cxn)
setContextNumber
in interface Context
cxn
- the int
context numberpublic int getCxn()
getContextNumber()
getCxn
in interface Context
int
public void setCxn(int cxn)
setContextNumber(int)
.
setCxn
in interface Context
cxn
- int
context numberpublic String getPaui()
getParentAtomIdentifier()
.
getPaui
in interface Context
public void setPaui(String paui)
setParentAtomIdentifier(String)
.
setPaui
in interface Context
paui
- the PAUIpublic String getParentAtomIdentifier()
getParentAtomIdentifier
in interface Context
public void setParentAtomIdentifier(String paui)
setParentAtomIdentifier
in interface Context
paui
- the PAUIpublic String getPathToRootAsString()
getPathToRootAsString
in interface Context
public List getPathToRootAsList()
List
of AUI values.
getPathToRootAsList
in interface Context
List
of AUI valuespublic String[] getPathToRoot()
String
[]
of AUI values.
getPathToRoot
in interface Context
String
[]
of AUI valuespublic String getPtr()
getPathToRootAsString()
.
getPtr
in interface Context
public void setPathToRoot(String ptr)
setPathToRoot
in interface Context
ptr
- the path to the rootpublic void setPtr(String ptr)
setPathToRoot(String)
.
setPtr
in interface Context
ptr
- the path to the rootpublic ContextMember[] getContextMembers()
ContextMember
s. These are the ancestors,
children, and siblings.
getContextMembers
in interface Context
ContextMember
spublic List getContextMembersAsList()
ContextMember
s as a List
. These are the ancestors,
children, and siblings.
getContextMembersAsList
in interface Context
List
of ContextMember
spublic void addContextMember(ContextMember cm)
ContextMember
.
addContextMember
in interface Context
cm
- the ContextMember
to be addedpublic void removeContextMember(ContextMember cm)
ContextMember
.
removeContextMember
in interface Context
cm
- the ContextMember
to be removedpublic void clearContextMembers()
ContextMember
s.
clearContextMembers
in interface Context
public void setContextMembers(ContextMember[] cms)
ContextMember
s with the ones in the specified array.
setContextMembers
in interface Context
cms
- a ContextMember
[]
public void setContextMembers(List cms)
ContextMember
s with the ones in the specified List
.
setContextMembers
in interface Context
cms
- a List
of ContextMember
spublic Concept getConcept()
Concept
that holds this Context
getConcept
in interface ConceptElement
Concept
that holds this Context
public void setConcept(Concept concept)
Concept
that holds this Context
setConcept
in interface ConceptElement
concept
- the Concept
that holds this Context
public Source getSource()
Context
.
getSource
in interface SourceElement
Source
public void setSource(Source source)
Context
.
setSource
in interface SourceElement
source
- Source
public ContentView getContentView()
ContentView
definition for this Context
(CVF).
getContentView
in interface ContentViewElement
ContentView
definitionpublic void setContentView(ContentView cvf)
ContentView
definition for this Context
(CVF).
setContentView
in interface ContentViewElement
cvf
- the ContentView
definitionpublic ContentView getCvf()
getContentView()
.
getCvf
in interface ContentViewElement
ContentView
definitionpublic void setCvf(ContentView cvf)
setContentView(ContentView)
.
setCvf
in interface ContentViewElement
cvf
- the ContentView
definitionpublic String getHierarchicalCode()
getHierarchicalCode
in interface Context
public String getHcd()
getHierarchicalCode()
.
getHcd
in interface Context
public void setHierarchicalCode(String hcd)
setHierarchicalCode
in interface Context
hcd
- the hierarchical codepublic void setHcd(String hcd)
setHierarchicalCode(String)
.
setHcd
in interface Context
hcd
- the hierarchical codepublic AdditionalRelationshipLabel getAdditionalRelationshipLabel()
AdditionalRelationshipLabel
(RELA) from the context member to its parent.
getAdditionalRelationshipLabel
in interface Context
AdditionalRelationshipLabel
public AdditionalRelationshipLabel getRela()
getAdditionalRelationshipLabel()
.
getRela
in interface Context
AdditionalRelationshipLabel
public void setAdditionalRelationshipLabel(AdditionalRelationshipLabel rela)
AdditionalRelationshipLabel
(RELA) from the context member to its parent.
setAdditionalRelationshipLabel
in interface Context
rela
- the AdditionalRelationshipLabel
public void setRela(AdditionalRelationshipLabel rela)
setAdditionalRelationshipLabel(AdditionalRelationshipLabel)
.
setRela
in interface Context
rela
- the AdditionalRelationshipLabel
public ContextMember getSelfMember()
ContextMember
that has the context
member label (CXL) of "CCP" or self.
getSelfMember
in interface Context
ContextMember
with label "CCP"public ContextMember[] getChildMembers()
ContextMember
s that have the context
member label (CXL) of "CHD" or child.
getChildMembers
in interface Context
ContextMember
[] of members with label "CHD"public List getChildMembersAsList()
ContextMember
s that have the context
member label (CXL) of "CHD" or child.
getChildMembersAsList
in interface Context
ContextMember
[] of members with label "CHD"public ContextMember[] getAncestorMembers()
ContextMember
s that have the context
member label (CXL) of "ANC" or self.
getAncestorMembers
in interface Context
ContextMember
[] of members with label "ANC"public List getAncestorMembersAsList()
ContextMember
s that have the context
member label (CXL) of "ANC" or self.
getAncestorMembersAsList
in interface Context
ContextMember
[] of members with label "ANC"public ContextMember[] getSiblingMembers()
ContextMember
s that have the context
member label (CXL) of "SIB" or self.
getSiblingMembers
in interface Context
ContextMember
[] of members with label "SIB"public List getSiblingMembersAsList()
ContextMember
s that have the context
member label (CXL) of "SIB" or self.
getSiblingMembersAsList
in interface Context
ContextMember
[] of members with label "SIB"public boolean isTopLevel()
isTopLevel
in interface Context
boolean
true if top level
false if otherwisepublic String getKeyFields()
String
key which can be used
by equals, compareTo, and hashCode methods.
getKeyFields
in interface Context
String
composed from the cui, aui, sui,
versioned source, cxn, and code.public int hashCode()
public 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.
o
- 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 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 |