software/test/performance/src/org/LexGrid/LexBIG/example/FindPropsAndAssocForCode.java
/**
	 * Display relations from the given code to other concepts.
	 * @param code
	 * @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 .
@SuppressWarnings("unchecked")
	protected void printTo(String code, EVSApplicationService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
			throws LBException {
		Util.displayMessage("Points to ...");
		/*
		ResolvedConceptReferenceList matches =
			lbSvc.getNodeGraph(scheme, csvt, null)
				.resolveAsList(
					ConvenienceMethods.createConceptReference(code, scheme),
					true, false, 1, 1, new LocalNameList(), null, null, 1024);
		*/
		CodedNodeGraph cng = lbSvc.getNodeGraph(scheme, csvt, null);
		ResolvedConceptReferenceList matches =
				cng.resolveAsList(
					ConvenienceMethods.createConceptReference(code, scheme),
					true, false, 1, 1, new LocalNameList(), null, null, 1024);
		if (matches.getResolvedConceptReferenceCount() > 0) {
			Enumeration<ResolvedConceptReference> refEnum =
				matches .enumerateResolvedConceptReference();
			while (refEnum.hasMoreElements()) {
				ResolvedConceptReference ref = refEnum.nextElement();
				AssociationList sourceof = ref.getSourceOf();
				Association[] associations = sourceof.getAssociation();
				for (int i = 0; i < associations.length; i++) {
					Association assoc = associations[i];
					Util.displayMessage("\t" + assoc.getAssociationName());
					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()));
					}
				}
			}
		}
	}
@ SuppressWarnings ( "unchecked" ) protected void printTo ( String code , EVSApplicationService lbSvc , String scheme , CodingSchemeVersionOrTag csvt ) throws LBException { Util . displayMessage ( "Points to ..." ) ; /*
		ResolvedConceptReferenceList matches =
			lbSvc.getNodeGraph(scheme, csvt, null)
				.resolveAsList(
					ConvenienceMethods.createConceptReference(code, scheme),
					true, false, 1, 1, new LocalNameList(), null, null, 1024);
		*/ CodedNodeGraph cng = lbSvc . getNodeGraph ( scheme , csvt , null ) ; ResolvedConceptReferenceList matches = cng . resolveAsList ( ConvenienceMethods . createConceptReference ( code , scheme ) , true , false , 1 , 1 , new LocalNameList ( ) , null , null , 1024 ) ; if ( matches . getResolvedConceptReferenceCount ( ) > 0 ) { Enumeration < ResolvedConceptReference > refEnum = matches . enumerateResolvedConceptReference ( ) ; while ( refEnum . hasMoreElements ( ) ) { ResolvedConceptReference ref = refEnum . nextElement ( ) ; AssociationList sourceof = ref . getSourceOf ( ) ; Association [ ] associations = sourceof . getAssociation ( ) ; for ( int i = 0 ; i < associations . length ; i ++ ) { Association assoc = associations [ i ] ; Util . displayMessage ( "\t" + assoc . getAssociationName ( ) ) ; 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 .
//protected void printTo(String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
 // Perform the query ...
 // Analyze the result ...
