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 inherited from class 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

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

Returns:
the int context number

setContextNumber

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

Parameters:
cxn - the int context number

getCxn

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

Returns:
cxn context number int

setCxn

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

Parameters:
cxn - int context number

getPaui

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

Returns:
the PAUI

setPaui

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

Parameters:
paui - the PAUI

getParentAtomIdentifier

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

Returns:
the PAUI

setParentAtomIdentifier

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

Parameters:
paui - the PAUI

getPathToRootAsString

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

Returns:
the path to the root

getPathToRootAsList

public 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

public 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

public 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

public 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

public 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

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

Returns:
a sorted array of ContextMembers

getContextMembersAsList

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

Returns:
a sorted List of ContextMembers

addContextMember

public void addContextMember(ContextMember cm)
Adds the specified ContextMember.

Parameters:
cm - the ContextMember to be added

removeContextMember

public void removeContextMember(ContextMember cm)
Removes the specified ContextMember.

Parameters:
cm - the ContextMember to be removed

clearContextMembers

public void clearContextMembers()
Removes all ContextMembers.


setContextMembers

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

Parameters:
cms - a ContextMember[]

setContextMembers

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

Parameters:
cms - a List of ContextMembers

getSelfMembers

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

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

Returns:
the StringContext that holds this SourceContext

setStringContext

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

Parameters:
sc - the StringContext that holds this SourceContext

getKeyFields

public 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