software/browser-util/src/gov/nih/nci/evs/browser/utils/ConceptEntity.java
/**
     * Display relations to the given code from other concepts.
     *
     * @param code
     * @param lbSvc
     * @param scheme
     * @param csvt
     * @throws LBException
     */
Display relations to the given code from other concepts.


Display relations to the given code from other concepts .
@SuppressWarnings("unchecked")
    public void printFrom(String code, String scheme, CodingSchemeVersionOrTag csvt)
            throws LBException {
        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);
        if (matches.getResolvedConceptReferenceCount() > 0) {
            Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
            while (refEnum.hasMoreElements()) {
                ResolvedConceptReference ref = refEnum.nextElement();
                AssociationList targetof = ref.getTargetOf();
                if (targetof != null) {
					Association[] associations = targetof.getAssociation();
					for (int i = 0; i < associations.length; i++) {
						Association assoc = associations[i];
						displayMessage("\t" + assoc.getAssociationName());
						AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
						if (acl == null) return;
						for (int j = 0; j < acl.length; j++) {
							AssociatedConcept ac = acl[j];
							String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
							EntityDescription ed = ac.getEntityDescription();
							String concept_code = ac.getConceptCode();
							if (concept_code == null) return;
							if (!concept_code.startsWith("@")) {
								displayMessage("\t\t" + ac.getConceptCode() + "/"
									+ (ed == null ? "**No Description**" : ed.getContent()) + " --> (" + rela + ") --> " + code);
						    }
						}
					}
			    }
            }
        }
    }
@ SuppressWarnings ( "unchecked" ) public void printFrom ( String code , String scheme , CodingSchemeVersionOrTag csvt ) throws LBException { 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 ) ; if ( matches . getResolvedConceptReferenceCount ( ) > 0 ) { Enumeration < ? extends ResolvedConceptReference > refEnum = matches . enumerateResolvedConceptReference ( ) ; while ( refEnum . hasMoreElements ( ) ) { ResolvedConceptReference ref = refEnum . nextElement ( ) ; AssociationList targetof = ref . getTargetOf ( ) ; if ( targetof != null ) { Association [ ] associations = targetof . getAssociation ( ) ; for ( int i = 0 ; i < associations . length ; i ++ ) { Association assoc = associations [ i ] ; displayMessage ( "\t" + assoc . getAssociationName ( ) ) ; AssociatedConcept [ ] acl = assoc . getAssociatedConcepts ( ) . getAssociatedConcept ( ) ; if ( acl == null ) return ; for ( int j = 0 ; j < acl . length ; j ++ ) { AssociatedConcept ac = acl [ j ] ; String rela = replaceAssociationNameByRela ( ac , assoc . getAssociationName ( ) ) ; EntityDescription ed = ac . getEntityDescription ( ) ; String concept_code = ac . getConceptCode ( ) ; if ( concept_code == null ) return ; if ( ! concept_code . startsWith ( "@" ) ) { displayMessage ( "\t\t" + ac . getConceptCode ( ) + "/" + ( ed == null ? "**No Description**" : ed . getContent ( ) ) + " --> (" + rela + ") --> " + code ) ; } } } } } } }
Display relations to the given code from other concepts.
Display relations to the given code from other concepts .
// Perform the query ...
 // Analyze the result ...
