software/browser-util/src/gov/nih/nci/evs/browser/utils/ConceptEntity.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, String scheme, CodingSchemeVersionOrTag csvt)
            throws LBException {
        displayMessage("Points to ...");
        ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
                ConvenienceMethods.createConceptReference(code, scheme), true, false, 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 sourceof = ref.getSourceOf();
                Association[] associations = sourceof.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();
                        displayMessage("\t\t" + code + " --> (" + rela + ") --> " + ac.getConceptCode() + "/"
                                + (ed == null ? "**No Description**" : ed.getContent()));
                    }
                }
            }
        }
    }
@ SuppressWarnings ( "unchecked" ) protected void printTo ( String code , String scheme , CodingSchemeVersionOrTag csvt ) throws LBException { displayMessage ( "Points to ..." ) ; ResolvedConceptReferenceList matches = lbSvc . getNodeGraph ( scheme , csvt , null ) . resolveAsList ( ConvenienceMethods . createConceptReference ( code , scheme ) , true , false , 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 sourceof = ref . getSourceOf ( ) ; Association [ ] associations = sourceof . 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 ( ) ; displayMessage ( "\t\t" + code + " --> (" + rela + ") --> " + 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 ...
