public class FindUMLSContextsForCUI
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
FindUMLSContextsForCUI.TreeItem
Inner class to hold tree items for printout.
|
Constructor and Description |
---|
FindUMLSContextsForCUI() |
Modifier and Type | Method and Description |
---|---|
protected FindUMLSContextsForCUI.TreeItem[] |
buildPaths(ResolvedConceptReference rcr,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt,
java.lang.String hcd,
CodedNodeSet hcdConceptMatch)
Build and return a tree item that represents the
hierarchical entries for the given concept reference and
hierarchical context identifier (HCD).
|
protected void |
buildPathsToLowerNodes(FindUMLSContextsForCUI.TreeItem ti,
ResolvedConceptReference rcr,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt,
java.lang.String hcd,
CodedNodeSet hcdConceptMatch,
java.util.Map<java.lang.String,FindUMLSContextsForCUI.TreeItem> code2Tree)
Add all hierarchical relationships that start from the
referenced concept and move forward in the tree.
|
protected void |
buildPathsToUpperNodes(FindUMLSContextsForCUI.TreeItem ti,
ResolvedConceptReference rcr,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt,
java.lang.String hcd,
CodedNodeSet hcdConceptMatch,
java.util.Map<java.lang.String,FindUMLSContextsForCUI.TreeItem> code2Tree,
java.util.Set<FindUMLSContextsForCUI.TreeItem> roots)
Add all hierarchical relationships that start from the
referenced concept and move backward in the tree.
|
protected LexBIGServiceConvenienceMethods |
getConvenienceMethods()
Returns a cached instance of convenience methods.
|
protected java.lang.String |
getDetailedText(ResolvedConceptReference rcr,
java.lang.String hcd,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt)
Returns contextual text for the given item in the format
[CUI]:[AUI]:[SAB]:[Text].
|
protected java.lang.String |
getDirectionalLabel(java.lang.String scheme,
CodingSchemeVersionOrTag csvt,
Association assoc,
boolean navigatedFwd)
Returns the label to display for the given association and directional
indicator.
|
protected java.lang.String |
getHCDText(ResolvedConceptReference rcr,
java.lang.String hcd)
Returns text for an assigned presentation matching the given
context identifier (HCD).
|
protected LexBIGService |
getLexBIGService()
Returns a cached instance of a LexBIG service.
|
protected java.lang.String |
getSourceText(AssociatedConcept ac)
Returns a string containing the names of all sources
asserted on the association to the concept delimited
by '|'.
|
protected boolean |
isValidForHCD(AssociatedConcept ac,
java.lang.String hcd)
Indicates whether the given associated concept contains
a qualifier for the given hierarchical context (HCD).
|
protected boolean |
isValidForSAB(AssociatedConcept ac,
java.lang.String sab)
Indicates whether the given associated concept contains
a qualifier for the given source abbreviation (SAB).
|
static void |
main(java.lang.String[] args)
Entry point for processing.
|
protected ResolvedConceptReference |
printCode(java.lang.String cui,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt)
Display name and description information for the given CUI.
|
protected void |
printContext(ResolvedConceptReference rcr,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt)
Recursively display each source-asserted hierarchy that the code
participates in, based on tagging by HCD qualifier, with
additional information.
|
protected void |
printPath(FindUMLSContextsForCUI.TreeItem ti,
java.lang.String focusCode,
int depth,
java.util.Map<FindUMLSContextsForCUI.TreeItem,java.lang.Integer> item2Depth)
Prints the given item, recursing to print all children.
|
void |
run(java.lang.String cui)
Process the provided code.
|
public static void main(java.lang.String[] args)
args
- public void run(java.lang.String cui) throws LBException
LBException
protected ResolvedConceptReference printCode(java.lang.String cui, java.lang.String scheme, CodingSchemeVersionOrTag csvt) throws LBException
LBException
protected void printContext(ResolvedConceptReference rcr, java.lang.String scheme, CodingSchemeVersionOrTag csvt) throws LBException
LBException
protected FindUMLSContextsForCUI.TreeItem[] buildPaths(ResolvedConceptReference rcr, java.lang.String scheme, CodingSchemeVersionOrTag csvt, java.lang.String hcd, CodedNodeSet hcdConceptMatch) throws LBException
LBException
protected void buildPathsToLowerNodes(FindUMLSContextsForCUI.TreeItem ti, ResolvedConceptReference rcr, java.lang.String scheme, CodingSchemeVersionOrTag csvt, java.lang.String hcd, CodedNodeSet hcdConceptMatch, java.util.Map<java.lang.String,FindUMLSContextsForCUI.TreeItem> code2Tree) throws LBException
LBException
protected void buildPathsToUpperNodes(FindUMLSContextsForCUI.TreeItem ti, ResolvedConceptReference rcr, java.lang.String scheme, CodingSchemeVersionOrTag csvt, java.lang.String hcd, CodedNodeSet hcdConceptMatch, java.util.Map<java.lang.String,FindUMLSContextsForCUI.TreeItem> code2Tree, java.util.Set<FindUMLSContextsForCUI.TreeItem> roots) throws LBException
LBException
protected LexBIGService getLexBIGService() throws LBException
LBException
protected LexBIGServiceConvenienceMethods getConvenienceMethods() throws LBException
LBException
protected java.lang.String getDetailedText(ResolvedConceptReference rcr, java.lang.String hcd, java.lang.String scheme, CodingSchemeVersionOrTag csvt) throws LBException
LBException
protected java.lang.String getDirectionalLabel(java.lang.String scheme, CodingSchemeVersionOrTag csvt, Association assoc, boolean navigatedFwd) throws LBException
LBException
protected java.lang.String getHCDText(ResolvedConceptReference rcr, java.lang.String hcd)
rcr
- Concept resolved from a query.hcd
- The hierarchical context identifier.protected java.lang.String getSourceText(AssociatedConcept ac)
protected void printPath(FindUMLSContextsForCUI.TreeItem ti, java.lang.String focusCode, int depth, java.util.Map<FindUMLSContextsForCUI.TreeItem,java.lang.Integer> item2Depth)
protected boolean isValidForHCD(AssociatedConcept ac, java.lang.String hcd)
protected boolean isValidForSAB(AssociatedConcept ac, java.lang.String sab)