software/test/performance/src/org/LexGrid/LexBIG/example/BuildTreeForCode.java
/**
     * Displays the given concept chain, taking into account any branches that
     * might be imbedded.
     *
     * @param assoc
     * @param depth
     * @throws LBException
     */
Displays the given concept chain, taking into account any branches that
might be imbedded.

@param assoc
@param depth
@throws LBException
Displays the given concept chain taking into account any branches that might be imbedded . @param assoc @param depth @throws LBException
protected void printChain(Association assoc, int depth) throws LBException {
        StringBuffer indent = new StringBuffer();
        for (int i = 0; i <= depth; i++)
            indent.append("    ");
        AssociatedConceptList concepts = assoc.getAssociatedConcepts();
        for (int i = 0; i < concepts.getAssociatedConceptCount(); i++) {
            AssociatedConcept concept = concepts.getAssociatedConcept(i);
            Util_displayMessage(new StringBuffer(indent).append(assoc.getAssociationName()).append("->").append(
                    concept.getConceptCode()).append(':').append(
                    concept.getEntityDescription() == null ? "NO DESCRIPTION" : concept.getEntityDescription()
                            .getContent()).toString());
            AssociationList nextLevel = concept.getSourceOf();
            if (nextLevel != null && nextLevel.getAssociationCount() != 0)
                for (int j = 0; j < nextLevel.getAssociationCount(); j++)
                    printChain(nextLevel.getAssociation(j), depth + 1);
        }
    }
protected void printChain ( Association assoc , int depth ) throws LBException { StringBuffer indent = new StringBuffer ( ) ; for ( int i = 0 ; i <= depth ; i ++ ) indent . append ( "    " ) ; AssociatedConceptList concepts = assoc . getAssociatedConcepts ( ) ; for ( int i = 0 ; i < concepts . getAssociatedConceptCount ( ) ; i ++ ) { AssociatedConcept concept = concepts . getAssociatedConcept ( i ) ; Util_displayMessage ( new StringBuffer ( indent ) . append ( assoc . getAssociationName ( ) ) . append ( "->" ) . append ( concept . getConceptCode ( ) ) . append ( ':' ) . append ( concept . getEntityDescription ( ) == null ? "NO DESCRIPTION" : concept . getEntityDescription ( ) . getContent ( ) ) . toString ( ) ) ; AssociationList nextLevel = concept . getSourceOf ( ) ; if ( nextLevel != null && nextLevel . getAssociationCount ( ) != 0 ) for ( int j = 0 ; j < nextLevel . getAssociationCount ( ) ; j ++ ) printChain ( nextLevel . getAssociation ( j ) , depth + 1 ) ; } }
Displays the given concept chain, taking into account any branches that
 might be imbedded.
Displays the given concept chain taking into account any branches that might be imbedded .
// Print focus of this branch ...
 // Find and recurse printing for next batch ...
