org.LexGrid.LexBIG.example
Class ListHierarchyMetaBySource

java.lang.Object
  extended by org.LexGrid.LexBIG.example.ListHierarchyMetaBySource

public class ListHierarchyMetaBySource
extends java.lang.Object

Example showing how to determine and display an unsorted list of root and subsumed nodes, up to a specified depth, for hierarchical relationships. It is written specifically to handle display of relationships for a designated source within the NCI Metathesaurus. This program accepts two parameters. The first indicates the depth to display hierarchical relations. If 0, only the root nodes are displayed. If 1, nodes immediately subsumed by the root are also displayed, etc. If < 0, a default depth of 0 is assumed. The second parameter must provide the source abbreviation (SAB) of the Metathesaurus source to be evaluated (e.g. ICD9CM, MDR, SNOMEDCT).


Constructor Summary
ListHierarchyMetaBySource()
           
 
Method Summary
static void main(java.lang.String[] args)
          Entry point for processing.
protected  void print(int depth, java.lang.String sab, LexBIGService lbSvc, java.lang.String scheme, CodingSchemeVersionOrTag csvt)
          Handle one level of the tree, and recurse up to the indicated depth.
protected  void printChain(LexBIGServiceConvenienceMethods lbscm, java.lang.String scheme, java.lang.String sab, CodingSchemeVersionOrTag csvt, ResolvedConceptReferenceList rootNodes, int maxDepth)
          Handles recursive display of hierarchical relations for the given set of nodes, up to the maximum specified depth.
protected  void printChainForNode(LexBIGServiceConvenienceMethods lbscm, java.lang.String scheme, java.lang.String sab, CodingSchemeVersionOrTag csvt, ResolvedConceptReference ref, int currentDepth, int maxDepth, java.lang.String assocName)
          Handles recursive display of hierarchy for an individual node, up to the maximum specified depth.
 void run(int maxDepth, java.lang.String sab)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListHierarchyMetaBySource

public ListHierarchyMetaBySource()
Method Detail

main

public static void main(java.lang.String[] args)
Entry point for processing.

Parameters:
args -

run

public void run(int maxDepth,
                java.lang.String sab)
         throws LBException
Throws:
LBException

print

protected void print(int depth,
                     java.lang.String sab,
                     LexBIGService lbSvc,
                     java.lang.String scheme,
                     CodingSchemeVersionOrTag csvt)
              throws LBException
Handle one level of the tree, and recurse up to the indicated depth.

Parameters:
depth -
sab -
lbSvc -
csvt -
scheme -
tagOrVersion -
Throws:
LBException

printChain

protected void printChain(LexBIGServiceConvenienceMethods lbscm,
                          java.lang.String scheme,
                          java.lang.String sab,
                          CodingSchemeVersionOrTag csvt,
                          ResolvedConceptReferenceList rootNodes,
                          int maxDepth)
                   throws LBException
Handles recursive display of hierarchical relations for the given set of nodes, up to the maximum specified depth.

Parameters:
lbscm -
scheme -
sab -
csvt - ,
rootNodes -
maxDepth -
Throws:
LBException

printChainForNode

protected void printChainForNode(LexBIGServiceConvenienceMethods lbscm,
                                 java.lang.String scheme,
                                 java.lang.String sab,
                                 CodingSchemeVersionOrTag csvt,
                                 ResolvedConceptReference ref,
                                 int currentDepth,
                                 int maxDepth,
                                 java.lang.String assocName)
                          throws LBException
Handles recursive display of hierarchy for an individual node, up to the maximum specified depth.

Parameters:
lbscm -
scheme -
sab -
csvt -
ref -
currentDepth -
maxDepth -
assocName -
Throws:
LBException

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.