software/test/performance/src/org/LexGrid/LexBIG/example/FindUMLSContextsForCUI.java
/**
	 * Add text to the given string buffer by recursing the hierarchy and
	 * appending text for each included concept.
	 * @param sb StringBuffer to receive the text for the entire list.
	 * @param hcd The hierarchical code to reflect in printed output.
	 * @param al The list to process.
	 * @param depth Current depth of recursion (0=no recursion yet).
	 * @param fwd True if processing relations in a forward direction
	 * (source to target); False otherwise (target to source).
	 */
Add text to the given string buffer by recursing the hierarchy and
appending text for each included concept.
@param sb StringBuffer to receive the text for the entire list.
@param hcd The hierarchical code to reflect in printed output.
@param al The list to process.
@param depth Current depth of recursion (0=no recursion yet).
@param fwd True if processing relations in a forward direction
(source to target); False otherwise (target to source).
Add text to the given string buffer by recursing the hierarchy and appending text for each included concept . @param sb StringBuffer to receive the text for the entire list . @param hcd The hierarchical code to reflect in printed output . @param al The list to process . @param depth Current depth of recursion ( 0 = no recursion yet ) . @param fwd True if processing relations in a forward direction ( source to target ) ; False otherwise ( target to source ) .
protected void printAssociationList(StringBuffer sb, String hcd, AssociationList al, int depth, boolean fwd) {
		if (al != null && al.getAssociationCount() > 0) {
			Association[] aList = al.getAssociation();
			for (int i = 0; i < aList.length; i++) {
				AssociatedConcept[] acList = aList[i].getAssociatedConcepts().getAssociatedConcept();
				for (int j = 0; j < acList.length; j++) {
					AssociatedConcept ac = acList[j];
					sb.append('\n');
					for (int d = 0; d < depth; d++)
						sb.append("  ");
					sb.append("->").append(getItemText(ac, hcd));
					printAssociationList(sb, hcd, fwd ? ac.getSourceOf() : ac.getTargetOf(), depth+1, fwd);
				}
			}
		}
	}
protected void printAssociationList ( StringBuffer sb , String hcd , AssociationList al , int depth , boolean fwd ) { if ( al != null && al . getAssociationCount ( ) > 0 ) { Association [ ] aList = al . getAssociation ( ) ; for ( int i = 0 ; i < aList . length ; i ++ ) { AssociatedConcept [ ] acList = aList [ i ] . getAssociatedConcepts ( ) . getAssociatedConcept ( ) ; for ( int j = 0 ; j < acList . length ; j ++ ) { AssociatedConcept ac = acList [ j ] ; sb . append ( '\n' ) ; for ( int d = 0 ; d < depth ; d ++ ) sb . append ( "  " ) ; sb . append ( "->" ) . append ( getItemText ( ac , hcd ) ) ; printAssociationList ( sb , hcd , fwd ? ac . getSourceOf ( ) : ac . getTargetOf ( ) , depth + 1 , fwd ) ; } } } }
Add text to the given string buffer by recursing the hierarchy and
 appending text for each included concept.
Add text to the given string buffer by recursing the hierarchy and appending text for each included concept .
// Indent on new line according to depth ...
 // Add the code and text for this link ...
 // Recurse to get the entire chain
