software/test/performance/src/org/LexGrid/LexBIG/example/ListHierarchy.java
/**
	 * Discovers all registered hierarchies for the coding scheme and
	 * display each in turn.
	 * @param lbSvc
	 * @param scheme
	 * @param csvt
	 * @param maxDepth
	 * @param hierarchyID
	 * @throws LBException
	 */
Discovers all registered hierarchies for the coding scheme and
display each in turn.
Discovers all registered hierarchies for the coding scheme and display each in turn .
protected void printHierarchies(
		EVSApplicationService lbSvc,
		String scheme,
		CodingSchemeVersionOrTag csvt,
		int maxDepth,
		String hierarchyID) throws LBException
	{
		LexBIGServiceConvenienceMethods lbscm = (LexBIGServiceConvenienceMethods) lbSvc.getGenericExtension("LexBIGServiceConvenienceMethods");
		lbscm.setLexBIGService(lbSvc);
		if (hierarchyID != null) {
			String[] supportedIDs = lbscm.getHierarchyIDs(scheme, csvt);
			Arrays.sort(supportedIDs);
			if (Arrays.binarySearch(supportedIDs, hierarchyID) < 0) {
				Util.displayMessage(
					"The specified hierarchy identifier is not supported by the selected code system.");
				Util.displayMessage("Supported values: ");
				for (String id: supportedIDs)
					Util.displayMessage("    " + id);
				return;
			}
		}
		ResolvedConceptReferenceList roots = lbscm.getHierarchyRoots(scheme, csvt, hierarchyID);
		for (int j = 0; j < roots.getResolvedConceptReferenceCount(); j++) {
			ResolvedConceptReference root = roots.getResolvedConceptReference(j);
			printHierarchyBranch(lbscm, scheme, csvt, null, root, 1, maxDepth, null);
		}
	}
protected void printHierarchies ( EVSApplicationService lbSvc , String scheme , CodingSchemeVersionOrTag csvt , int maxDepth , String hierarchyID ) throws LBException { LexBIGServiceConvenienceMethods lbscm = ( LexBIGServiceConvenienceMethods ) lbSvc . getGenericExtension ( "LexBIGServiceConvenienceMethods" ) ; lbscm . setLexBIGService ( lbSvc ) ; if ( hierarchyID != null ) { String [ ] supportedIDs = lbscm . getHierarchyIDs ( scheme , csvt ) ; Arrays . sort ( supportedIDs ) ; if ( Arrays . binarySearch ( supportedIDs , hierarchyID ) < 0 ) { Util . displayMessage ( "The specified hierarchy identifier is not supported by the selected code system." ) ; Util . displayMessage ( "Supported values: " ) ; for ( String id : supportedIDs ) Util . displayMessage ( "    " + id ) ; return ; } } ResolvedConceptReferenceList roots = lbscm . getHierarchyRoots ( scheme , csvt , hierarchyID ) ; for ( int j = 0 ; j < roots . getResolvedConceptReferenceCount ( ) ; j ++ ) { ResolvedConceptReference root = roots . getResolvedConceptReference ( j ) ; printHierarchyBranch ( lbscm , scheme , csvt , null , root , 1 , maxDepth , null ) ; } }
Discovers all registered hierarchies for the coding scheme and
 display each in turn.
Discovers all registered hierarchies for the coding scheme and display each in turn .
//LexBIGService lbSvc,
 //EVSApplicationService lbSvc = new RemoteServerUtil2().createLexBIGService();
 // Validate the ID, if specified ...
 // Print all branches from root ...
