|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.meta.impl.SourceContextImpl
Default implementation fo the SourceContext
interface.
Nested Class Summary |
Nested classes inherited from class gov.nih.nlm.umls.meta.AtomElement |
AtomElement.ByLanguageRestrictor, AtomElement.BySourceRestrictor |
Constructor Summary | |
SourceContextImpl()
Instantiates an empty SourceContext . |
|
SourceContextImpl(SourceContext sc)
Instantiates a SourceContext from the specified SourceContext . |
Method Summary | |
void |
addContextMember(ContextMember cm)
Adds the specified ContextMember . |
void |
clearContextMembers()
Removes all ContextMember s. |
int |
compareTo(Object o)
Compares this SourceContext to another one. |
boolean |
equals(Object o)
Returns true if the specified object is
equal to this object. |
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 SourceContext 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. |
ContentView |
getContentView()
Returns tbe ContentView definition for this SourceContext (CVF). |
ContextMember[] |
getContextMembers()
Returns the ContextMember s. |
List |
getContextMembersAsList()
Returns the ContextMember s. |
int |
getContextNumber()
Returns the context number (CXN). |
ContentView |
getCvf()
Shorthand for getContentView() . |
int |
getCxn()
This is a shorthand for getContextNumber() |
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() . |
ContextMember[] |
getSelfMembers()
Returns only the ContextMember s that have the context
member label (CXL) of "CCP" or self. |
List |
getSelfMembersAsList()
Returns only the ContextMember s that have 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. |
StringContext |
getStringContext()
Returns the StringContext that holds this SourceContext . |
int |
hashCode()
Return a hash code based on key fields. |
void |
removeContextMember(ContextMember cm)
Removes the specified ContextMember . |
void |
setAtom(Atom atom)
Sets the Atom this SourceContext is connected to. |
void |
setContentView(ContentView cvf)
Sets tbe ContentView definition for this SourceContext (CVF). |
void |
setContextMembers(ContextMember[] cms)
Set the ContextMember s with the ones in the specified array. |
void |
setContextMembers(List cms)
Set 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 |
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 |
setStringContext(StringContext sc)
Sets the StringContext that holds this SourceContext . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SourceContextImpl()
SourceContext
.
public SourceContextImpl(SourceContext sc)
SourceContext
from the specified SourceContext
.
sc
- SourceContext
to be copiedMethod Detail |
public StringContext getStringContext()
StringContext
that holds this SourceContext
.
getStringContext
in interface SourceContext
StringContext
that holds this SourceContext
public void setStringContext(StringContext sc)
StringContext
that holds this SourceContext
.
setStringContext
in interface SourceContext
sc
- the StringContext
that holds this SourceContext
public int getContextNumber()
getContextNumber
in interface SourceContext
int
context numberpublic void setContextNumber(int cxn)
setContextNumber
in interface SourceContext
cxn
- the int
context numberpublic int getCxn()
getContextNumber()
getCxn
in interface SourceContext
int
public void setCxn(int cxn)
setContextNumber(int)
.
setCxn
in interface SourceContext
cxn
- int
context numberpublic String getPaui()
getParentAtomIdentifier()
.
getPaui
in interface SourceContext
public void setPaui(String paui)
setParentAtomIdentifier(String)
.
setPaui
in interface SourceContext
paui
- the PAUIpublic String getParentAtomIdentifier()
getParentAtomIdentifier
in interface SourceContext
public void setParentAtomIdentifier(String paui)
setParentAtomIdentifier
in interface SourceContext
paui
- the PAUIpublic String getPathToRootAsString()
getPathToRootAsString
in interface SourceContext
public List getPathToRootAsList()
List
of AUI values.
getPathToRootAsList
in interface SourceContext
List
of AUI valuespublic String[] getPathToRoot()
String
[]
of AUI values.
getPathToRoot
in interface SourceContext
String
[]
of AUI valuespublic String getPtr()
getPathToRootAsString()
.
getPtr
in interface SourceContext
public void setPathToRoot(String ptr)
setPathToRoot
in interface SourceContext
ptr
- the path to the rootpublic void setPtr(String ptr)
setPathToRoot(String)
.
setPtr
in interface SourceContext
ptr
- the path to the rootpublic ContextMember[] getContextMembers()
ContextMember
s. These are the ancestors,
children, and siblings.
getContextMembers
in interface SourceContext
ContextMember
spublic List getContextMembersAsList()
ContextMember
s. These are the ancestors,
children, and siblings.
getContextMembersAsList
in interface SourceContext
ContextMember
spublic void addContextMember(ContextMember cm)
ContextMember
.
addContextMember
in interface SourceContext
cm
- the ContextMember
to be addedpublic void removeContextMember(ContextMember cm)
ContextMember
.
removeContextMember
in interface SourceContext
cm
- the ContextMember
to be removedpublic void clearContextMembers()
ContextMember
s.
clearContextMembers
in interface SourceContext
public void setContextMembers(ContextMember[] cms)
ContextMember
s with the ones in the specified array.
setContextMembers
in interface SourceContext
cms
- a ContextMember
[]
public void setContextMembers(List cms)
ContextMember
s with the ones in the specified List
.
setContextMembers
in interface SourceContext
cms
- a List
of ContextMember
spublic Atom getAtom()
Atom
this SourceContext
is connected to.
getAtom
in interface AtomElement
Atom
this SourceContext
is connected topublic void setAtom(Atom atom)
Atom
this SourceContext
is connected to.
setAtom
in interface AtomElement
atom
- the Atom
this SourceContext
is connected topublic ContentView getContentView()
ContentView
definition for this SourceContext
(CVF).
getContentView
in interface ContentViewElement
ContentView
definitionpublic void setContentView(ContentView cvf)
ContentView
definition for this SourceContext
(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 ContextMember[] getSelfMembers()
ContextMember
s that have the context
member label (CXL) of "CCP" or self.
getSelfMembers
in interface SourceContext
ContextMember
[] of members with label "CCP"public List getSelfMembersAsList()
ContextMember
s that have the context
member label (CXL) of "CCP" or self.
getSelfMembersAsList
in interface SourceContext
List
of members with label "CCP"public ContextMember[] getChildMembers()
ContextMember
s that have the context
member label (CXL) of "CHD" or child.
getChildMembers
in interface SourceContext
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 SourceContext
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 SourceContext
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 SourceContext
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 SourceContext
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 SourceContext
ContextMember
[] of members with label "SIB"public String getKeyFields()
String
key which can be used
by equals, compareTo, and hashCode methods.
getKeyFields
in interface SourceContext
String
composed from the cui and aui.public int hashCode()
public boolean equals(Object o)
true
if the specified object is
equal to this object. The specified object must be an
SourceContext
with matching key fields.
o
- an Object
to compare against
true
if Object o is equal
false
otherwisepublic int compareTo(Object o)
SourceContext
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 |