gov.nih.nlm.umls.meta
Interface StringContext

All Superinterfaces:
AtomElement, Comparable, SourceElement
All Known Implementing Classes:
StringContextImpl

public interface StringContext
extends Comparable, AtomElement, SourceElement

Represents grouping of SourceContexts which share the same Source abbreviation and code.

Following is a UML Class diagram showing the neighborhood around StringContext

Author:
Brian Carlsen, Deborah Shapiro
See Also:
ContextGroup

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
 
Method Summary
 void addSourceContext(SourceContext sc)
          Adds the specified SourceContext.
 void clearSourceContexts()
          Removes all SourceContexts.
 ContextGroup getContextGroup()
          Returns the ContextGroup that holds this StringContext.
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 SourceContext[] getSourceContexts()
          Returns all SourceContexts.
 List getSourceContextsAsList()
          Returns all SourceContexts as a List.
 void removeSourceContext(SourceContext sc)
          Removes the specified SourceContext.
 void setContextGroup(ContextGroup cg)
          Sets the ContextGroup that holds this StringContext.
 void setSourceContexts(List scs)
          Replace the SourceContexts with the ones in the specified List.
 void setSourceContexts(SourceContext[] scs)
          Replace the SourceContexts with the ones in the specified array.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface gov.nih.nlm.umls.meta.AtomElement
getAtom, setAtom
 
Methods inherited from interface gov.nih.nlm.umls.meta.SourceElement
getSource, setSource
 

Method Detail

getSourceContexts

public SourceContext[] getSourceContexts()
Returns all SourceContexts.

Returns:
an array of SourceContexts

getSourceContextsAsList

public List getSourceContextsAsList()
Returns all SourceContexts as a List.

Returns:
a List of SourceContexts

addSourceContext

public void addSourceContext(SourceContext sc)
Adds the specified SourceContext.

Parameters:
sc - the SourceContext to be added

removeSourceContext

public void removeSourceContext(SourceContext sc)
Removes the specified SourceContext.

Parameters:
sc - the SourceContext to be removed

clearSourceContexts

public void clearSourceContexts()
Removes all SourceContexts.


setSourceContexts

public void setSourceContexts(SourceContext[] scs)
Replace the SourceContexts with the ones in the specified array.

Parameters:
scs - a SourceContext[]

setSourceContexts

public void setSourceContexts(List scs)
Replace the SourceContexts with the ones in the specified List.

Parameters:
scs - a List of SourceContexts

getContextGroup

public ContextGroup getContextGroup()
Returns the ContextGroup that holds this StringContext.

Returns:
the ContextGroup that holds this StringContext

setContextGroup

public void setContextGroup(ContextGroup cg)
Sets the ContextGroup that holds this StringContext.

Parameters:
cg - the ContextGroup that holds this StringContext

getKeyFields

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

Returns:
a String composed from key Atom fields


Copyright ©2005