gov.nih.nlm.umls.meta
Interface SourceContext

All Superinterfaces:
AtomElement, Comparable, ContentViewElement
All Known Implementing Classes:
SourceContextImpl

public interface SourceContext
extends AtomElement, Comparable, ContentViewElement

Represents a context associated with a source and a string identifier. A StringContext will have a number of SourceContexts associated with it. The context number differentiates between contexts within the same string and source.

Following is a UML Class diagram showing the neighborhood around SourceContext

Author:
Brian Carlsen, Deborah Shapiro
See Also:
StringContext

Nested Class Summary
 
Nested classes/interfaces inherited from interface gov.nih.nlm.umls.meta.AtomElement
AtomElement.ByLanguageRestrictor, AtomElement.BySourceRestrictor
 
Method Summary
 void addContextMember(ContextMember cm)
          Adds the specified ContextMember.
 void clearContextMembers()
          Removes all ContextMembers.
 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.
 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.
 ContextMember[] getContextMembers()
          Returns the ContextMembers.
 List getContextMembersAsList()
          Returns the ContextMembers.
 int getContextNumber()
          Returns the context number (CXN).
 int getCxn()
          Returns the context number (CXN).
 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()
          Returns the parent atom identifier (PAUI).
 String getPtr()
          Returns the path to the root (PTR) as a "." separated list of AUI values.
 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.
 void removeContextMember(ContextMember cm)
          Removes the specified ContextMember.
 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 setCxn(int cxn)
          Sets the context number (CXN).
 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)
          Sets the parent atom identifier (PAUI).
 void setPtr(String ptr)
          Sets the path to the root (PTR) as a "." separated list of AUI values.
 void setStringContext(StringContext sc)
          Sets the StringContext that holds this SourceContext.
 
Methods inherited from interface gov.nih.nlm.umls.meta.AtomElement
getAtom, setAtom
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface gov.nih.nlm.umls.meta.ContentViewElement
getContentView, getCvf, setContentView, setCvf
 

Method Detail

getContextNumber

int getContextNumber()
Returns the context number (CXN).

Returns:
the int context number

setContextNumber

void setContextNumber(int cxn)
Sets the context number (CXN).

Parameters:
cxn - the int context number

getCxn

int getCxn()
Returns the context number (CXN). This is a shorthand for getContextNumber()

Returns:
cxn context number int

setCxn

void setCxn(int cxn)
Sets the context number (CXN). This is shorthand for setContextNumber(int).

Parameters:
cxn - int context number

getPaui

String getPaui()
Returns the parent atom identifier (PAUI). This is shorthand for getParentAtomIdentifier().

Returns:
the PAUI

setPaui

void setPaui(String paui)
Sets the parent atom identifier (PAUI). This is shorthand for setParentAtomIdentifier(String).

Parameters:
paui - the PAUI

getParentAtomIdentifier

String getParentAtomIdentifier()
Returns the parent atom identifier (PAUI).

Returns:
the PAUI

setParentAtomIdentifier

void setParentAtomIdentifier(String paui)
Sets the parent atom identifier (PAUI).

Parameters:
paui - the PAUI

getPathToRootAsString

String getPathToRootAsString()
Returns the path to the root (PTR) as a "." separated list of AUI values.

Returns:
the path to the root

getPathToRootAsList

List getPathToRootAsList()
Returns the path to the root (PTR) as a List of AUI values.

Returns:
the path to the root as a List of AUI values

getPathToRoot

String[] getPathToRoot()
Returns the path to the root (PTR) as a String[] of AUI values.

Returns:
the path to the root as a String[] of AUI values

getPtr

String getPtr()
Returns the path to the root (PTR) as a "." separated list of AUI values. This is shorthand for getPathToRootAsString().

Returns:
the path to the root

setPathToRoot

void setPathToRoot(String ptr)
Sets the path to the root (PTR) as a "." separated list of AUI values.

Parameters:
ptr - the path to the root

setPtr

void setPtr(String ptr)
Sets the path to the root (PTR) as a "." separated list of AUI values. This is shorthand for setPathToRoot(String).

Parameters:
ptr - the path to the root

getContextMembers

ContextMember[] getContextMembers()
Returns the ContextMembers. These are the ancestors, children, and siblings.

Returns:
a sorted array of ContextMembers

getContextMembersAsList

List getContextMembersAsList()
Returns the ContextMembers. These are the ancestors, children, and siblings.

Returns:
a sorted List of ContextMembers

addContextMember

void addContextMember(ContextMember cm)
Adds the specified ContextMember.

Parameters:
cm - the ContextMember to be added

removeContextMember

void removeContextMember(ContextMember cm)
Removes the specified ContextMember.

Parameters:
cm - the ContextMember to be removed

clearContextMembers

void clearContextMembers()
Removes all ContextMembers.


setContextMembers

void setContextMembers(ContextMember[] cms)
Set the ContextMembers with the ones in the specified array.

Parameters:
cms - a ContextMember[]

setContextMembers

void setContextMembers(List cms)
Set the ContextMembers with the ones in the specified List.

Parameters:
cms - a List of ContextMembers

getSelfMembers

ContextMember[] getSelfMembers()
Returns only the ContextMembers that have the context member label (CXL) of "CCP" or self.

Returns:
ContextMember[] of members with label "CCP"

getSelfMembersAsList

List getSelfMembersAsList()
Returns only the ContextMembers that have the context member label (CXL) of "CCP" or self.

Returns:
List of members with label "CCP"

getChildMembers

ContextMember[] getChildMembers()
Returns only the ContextMembers that have the context member label (CXL) of "CHD" or child.

Returns:
ContextMember[] of members with label "CHD"

getChildMembersAsList

List getChildMembersAsList()
Returns only the ContextMembers that have the context member label (CXL) of "CHD" or child.

Returns:
ContextMember[] of members with label "CHD"

getAncestorMembers

ContextMember[] getAncestorMembers()
Returns only the ContextMembers that have the context member label (CXL) of "ANC" or self.

Returns:
ContextMember[] of members with label "ANC"

getAncestorMembersAsList

List getAncestorMembersAsList()
Returns only the ContextMembers that have the context member label (CXL) of "ANC" or self.

Returns:
ContextMember[] of members with label "ANC"

getSiblingMembers

ContextMember[] getSiblingMembers()
Returns only the ContextMembers that have the context member label (CXL) of "SIB" or self.

Returns:
ContextMember[] of members with label "SIB"

getSiblingMembersAsList

List getSiblingMembersAsList()
Returns only the ContextMembers that have the context member label (CXL) of "SIB" or self.

Returns:
ContextMember[] of members with label "SIB"

getStringContext

StringContext getStringContext()
Returns the StringContext that holds this SourceContext.

Returns:
the StringContext that holds this SourceContext

setStringContext

void setStringContext(StringContext sc)
Sets the StringContext that holds this SourceContext.

Parameters:
sc - the StringContext that holds this SourceContext

getKeyFields

String getKeyFields()
Returns a String key which can be used by equals, compareTo, and hashCode methods.

Returns:
a String composed from key SourceContext fields


Copyright ©2005