|
|||||||||
| 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
public class SourceContextImpl
Default implementation fo the SourceContext interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface 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 ContextMembers. |
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 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 SourceContext 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. |
ContentView |
getContentView()
Returns tbe ContentView definition for this SourceContext (CVF). |
ContextMember[] |
getContextMembers()
Returns the ContextMembers. |
List |
getContextMembersAsList()
Returns the ContextMembers. |
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 ContextMembers that have the context
member label (CXL) of "CCP" or self. |
List |
getSelfMembersAsList()
Returns only the ContextMembers that have 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. |
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 ContextMembers with the ones in the specified array. |
void |
setContextMembers(List cms)
Set 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 |
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 copied| Method Detail |
|---|
public StringContext getStringContext()
StringContext that holds this SourceContext.
getStringContext in interface SourceContextStringContext that holds this SourceContextpublic void setStringContext(StringContext sc)
StringContext that holds this SourceContext.
setStringContext in interface SourceContextsc - the StringContext that holds this SourceContextpublic int getContextNumber()
getContextNumber in interface SourceContextint context numberpublic void setContextNumber(int cxn)
setContextNumber in interface SourceContextcxn - the int context numberpublic int getCxn()
getContextNumber()
getCxn in interface SourceContextintpublic void setCxn(int cxn)
setContextNumber(int).
setCxn in interface SourceContextcxn - int context numberpublic String getPaui()
getParentAtomIdentifier().
getPaui in interface SourceContextpublic void setPaui(String paui)
setParentAtomIdentifier(String).
setPaui in interface SourceContextpaui - the PAUIpublic String getParentAtomIdentifier()
getParentAtomIdentifier in interface SourceContextpublic void setParentAtomIdentifier(String paui)
setParentAtomIdentifier in interface SourceContextpaui - the PAUIpublic String getPathToRootAsString()
getPathToRootAsString in interface SourceContextpublic List getPathToRootAsList()
List of AUI values.
getPathToRootAsList in interface SourceContextList of AUI valuespublic String[] getPathToRoot()
String[]
of AUI values.
getPathToRoot in interface SourceContextString[]
of AUI valuespublic String getPtr()
getPathToRootAsString().
getPtr in interface SourceContextpublic void setPathToRoot(String ptr)
setPathToRoot in interface SourceContextptr - the path to the rootpublic void setPtr(String ptr)
setPathToRoot(String).
setPtr in interface SourceContextptr - the path to the rootpublic ContextMember[] getContextMembers()
ContextMembers. These are the ancestors,
children, and siblings.
getContextMembers in interface SourceContextContextMemberspublic List getContextMembersAsList()
ContextMembers. These are the ancestors,
children, and siblings.
getContextMembersAsList in interface SourceContextContextMemberspublic void addContextMember(ContextMember cm)
ContextMember.
addContextMember in interface SourceContextcm - the ContextMember to be addedpublic void removeContextMember(ContextMember cm)
ContextMember.
removeContextMember in interface SourceContextcm - the ContextMember to be removedpublic void clearContextMembers()
ContextMembers.
clearContextMembers in interface SourceContextpublic void setContextMembers(ContextMember[] cms)
ContextMembers with the ones in the specified array.
setContextMembers in interface SourceContextcms - a ContextMember[]public void setContextMembers(List cms)
ContextMembers with the ones in the specified List.
setContextMembers in interface SourceContextcms - a List of ContextMemberspublic Atom getAtom()
Atom this SourceContext is connected to.
getAtom in interface AtomElementAtom this SourceContext is connected topublic void setAtom(Atom atom)
Atom this SourceContext is connected to.
setAtom in interface AtomElementatom - the Atom this SourceContext is connected topublic ContentView getContentView()
ContentView definition for this SourceContext (CVF).
getContentView in interface ContentViewElementContentView definitionpublic void setContentView(ContentView cvf)
ContentView definition for this SourceContext (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 ContextMember[] getSelfMembers()
ContextMembers that have the context
member label (CXL) of "CCP" or self.
getSelfMembers in interface SourceContextContextMember[] of members with label "CCP"public List getSelfMembersAsList()
ContextMembers that have the context
member label (CXL) of "CCP" or self.
getSelfMembersAsList in interface SourceContextList of members with label "CCP"public ContextMember[] getChildMembers()
ContextMembers that have the context
member label (CXL) of "CHD" or child.
getChildMembers in interface SourceContextContextMember[] of members with label "CHD"public List getChildMembersAsList()
ContextMembers that have the context
member label (CXL) of "CHD" or child.
getChildMembersAsList in interface SourceContextContextMember[] of members with label "CHD"public ContextMember[] getAncestorMembers()
ContextMembers that have the context
member label (CXL) of "ANC" or self.
getAncestorMembers in interface SourceContextContextMember[] of members with label "ANC"public List getAncestorMembersAsList()
ContextMembers that have the context
member label (CXL) of "ANC" or self.
getAncestorMembersAsList in interface SourceContextContextMember[] of members with label "ANC"public ContextMember[] getSiblingMembers()
ContextMembers that have the context
member label (CXL) of "SIB" or self.
getSiblingMembers in interface SourceContextContextMember[] of members with label "SIB"public List getSiblingMembersAsList()
ContextMembers that have the context
member label (CXL) of "SIB" or self.
getSiblingMembersAsList in interface SourceContextContextMember[] of members with label "SIB"public String getKeyFields()
String key which can be used
by equals, compareTo, and hashCode methods.
getKeyFields in interface SourceContextString composed from the cui and aui.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 an
SourceContext 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)
SourceContext 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 | ||||||||