software/test/performance/src/org/LexGrid/LexBIG/example/FindRelatedCodesWithPropertyLinks.java
/**
	 * Display relations from the given code to other concepts.
	 * @param code
	 * @param relation
	 * @param lbSvc
	 * @param scheme
	 * @param csvt
	 * @throws LBException
	 */
Display relations from the given code to other concepts.
Display relations from the given code to other concepts .
protected void printFrom(String code, EVSApplicationService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
		throws LBException
	{
		Util.displayMessage("Pointed at by ...");
/*
		ResolvedConceptReferenceList matches =
			lbSvc.getNodeGraph(scheme, csvt, null)
				.resolveAsList(
					ConvenienceMethods.createConceptReference(code, scheme),
					false, true, 1, 1, new LocalNameList(), null, null, 1024);
*/
        CodedNodeGraph cng = lbSvc.getNodeGraph(scheme, csvt, null);
		ResolvedConceptReferenceList matches =
			cng.resolveAsList(
					ConvenienceMethods.createConceptReference(code, scheme),
					false, true, 1, 1, new LocalNameList(), null, null, 1024);
		if (matches.getResolvedConceptReferenceCount() > 0) {
			ResolvedConceptReference ref =
				(ResolvedConceptReference) matches.enumerateResolvedConceptReference().nextElement();
			AssociationList targetof = ref.getTargetOf();
			Association[] associations = targetof.getAssociation();
			for (int i = 0; i < associations.length; i++) {
				Association assoc = associations[i];
				AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
				for (int j = 0; j < acl.length; j++) {
					AssociatedConcept ac = acl[j];
					EntityDescription ed = ac.getEntityDescription();
					Util.displayMessage(
						"\t\t" + ac.getConceptCode() + "/"
							+ (ed == null?
									"**No Description**":ed.getContent()));
				}
			}
		}
	}
protected void printFrom ( String code , EVSApplicationService lbSvc , String scheme , CodingSchemeVersionOrTag csvt ) throws LBException { Util . displayMessage ( "Pointed at by ..." ) ; /*
		ResolvedConceptReferenceList matches =
			lbSvc.getNodeGraph(scheme, csvt, null)
				.resolveAsList(
					ConvenienceMethods.createConceptReference(code, scheme),
					false, true, 1, 1, new LocalNameList(), null, null, 1024);
*/ CodedNodeGraph cng = lbSvc . getNodeGraph ( scheme , csvt , null ) ; ResolvedConceptReferenceList matches = cng . resolveAsList ( ConvenienceMethods . createConceptReference ( code , scheme ) , false , true , 1 , 1 , new LocalNameList ( ) , null , null , 1024 ) ; if ( matches . getResolvedConceptReferenceCount ( ) > 0 ) { ResolvedConceptReference ref = ( ResolvedConceptReference ) matches . enumerateResolvedConceptReference ( ) . nextElement ( ) ; AssociationList targetof = ref . getTargetOf ( ) ; Association [ ] associations = targetof . getAssociation ( ) ; for ( int i = 0 ; i < associations . length ; i ++ ) { Association assoc = associations [ i ] ; AssociatedConcept [ ] acl = assoc . getAssociatedConcepts ( ) . getAssociatedConcept ( ) ; for ( int j = 0 ; j < acl . length ; j ++ ) { AssociatedConcept ac = acl [ j ] ; EntityDescription ed = ac . getEntityDescription ( ) ; Util . displayMessage ( "\t\t" + ac . getConceptCode ( ) + "/" + ( ed == null ? "**No Description**" : ed . getContent ( ) ) ) ; } } } }
Display relations from the given code to other concepts.
Display relations from the given code to other concepts .
// Perform the query ...
 // Analyze the result ...
 // Print the associations
