当前位置: 首页>>代码示例>>Java>>正文


Java ResolvedConceptReferenceList.enumerateResolvedConceptReference方法代码示例

本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList.enumerateResolvedConceptReference方法的典型用法代码示例。如果您正苦于以下问题:Java ResolvedConceptReferenceList.enumerateResolvedConceptReference方法的具体用法?Java ResolvedConceptReferenceList.enumerateResolvedConceptReference怎么用?Java ResolvedConceptReferenceList.enumerateResolvedConceptReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList的用法示例。


在下文中一共展示了ResolvedConceptReferenceList.enumerateResolvedConceptReference方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printFrom

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
 * Display relations to the given code from other concepts.
 *
 * @param code
 * @param lbSvc
 * @param scheme
 * @param csvt
 * @throws LBException
 */
@SuppressWarnings("unchecked")
protected void printFrom(PrintWriter pw, String scheme, CodingSchemeVersionOrTag csvt, String code)
        throws LBException {
    pw.println("Pointed at by ...");

    // Perform the query ...
    ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
            ConvenienceMethods.createConceptReference(code, scheme), false, true, 1, 1, new LocalNameList(), null,
            null, 1024);

    // Analyze the result ...
    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];
		pw.println("\t" + assoc.getAssociationName());

		AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
		for (int j = 0; j < acl.length; j++) {
			AssociatedConcept ac = acl[j];
				String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
			EntityDescription ed = ac.getEntityDescription();
			pw.println("\t\t" + ac.getConceptCode() + "/"
					+ (ed == null ? "**No Description**" : ed.getContent()) + " --> (" + rela + ") --> " + code);
		}
	}
   }
        }
    }

}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:49,代码来源:EntityExporter.java

示例2: printTo

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
 * Display relations from the given code to other concepts.
 *
 * @param code
 * @param lbSvc
 * @param scheme
 * @param csvt
 * @throws LBException
 */
@SuppressWarnings("unchecked")
protected void printTo(PrintWriter pw, String scheme, CodingSchemeVersionOrTag csvt, String code)
        throws LBException {
    pw.println("Points to ...");

    // Perform the query ...
    ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
            ConvenienceMethods.createConceptReference(code, scheme), true, false, 1, 1, new LocalNameList(), null,
            null, 1024);

    // Analyze the result ...
    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];
                pw.println("\t" + assoc.getAssociationName());

                AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
                for (int j = 0; j < acl.length; j++) {
                    AssociatedConcept ac = acl[j];
                     String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());

                    EntityDescription ed = ac.getEntityDescription();
                    pw.println("\t\t" + code + " --> (" + rela + ") --> " + ac.getConceptCode() + "/"
                            + (ed == null ? "**No Description**" : ed.getContent()));
                }
            }
        }
    }
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:46,代码来源:EntityExporter.java

示例3: run

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
public void run(String text)throws LBException{
	CodingSchemeSummary css = Util.promptForCodeSystem();
	if (css != null) {
		LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
		String scheme = css.getCodingSchemeURN();
		CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
		csvt.setVersion(css.getRepresentsVersion());
		
		CodedNodeSet nodes = lbSvc.getCodingSchemeConcepts(scheme, csvt)
			.restrictToStatus(ActiveOption.ALL, null)
			.restrictToMatchingDesignations(
				text,
				SearchDesignationOption.ALL,
				MatchAlgorithms.DoubleMetaphoneLuceneQuery.toString(),
				null);

		// Sort by search engine recommendation & code ...
		SortOptionList sortCriteria =
		    Constructors.createSortOptionList(new String[]{"matchToQuery", "code"});
		
		// Analyze the result ...
		ResolvedConceptReferenceList matches =
			nodes.resolveToList(sortCriteria, null, null, 10);
		if (matches.getResolvedConceptReferenceCount() > 0) {
			for (Enumeration refs = matches.enumerateResolvedConceptReference(); refs.hasMoreElements(); ) {
				ResolvedConceptReference ref = (ResolvedConceptReference) refs.nextElement();
				Util.displayMessage("Matching code: " + ref.getConceptCode());
				Util.displayMessage("\tDescription: " + ref.getEntityDescription().getContent());
			}
		} else {
			Util.displayMessage("No match found!");
		}
	}
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:35,代码来源:SoundsLike.java

示例4: printFrom

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
 * Display relations to the given code from other concepts.
 *
 * @param code
 * @param lbSvc
 * @param scheme
 * @param csvt
 * @throws LBException
 */
@SuppressWarnings("unchecked")
protected void printFrom(PrintWriter pw, String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
        throws LBException {
    displayMessage(pw, "\n\tPointed at by ...");

    // Perform the query ...
    ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
            ConvenienceMethods.createConceptReference(code, scheme), false, true, 1, 1, new LocalNameList(), null,
            null, 1024);

    // Analyze the result ...
    if (matches.getResolvedConceptReferenceCount() > 0) {
        Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();

        while (refEnum.hasMoreElements()) {
            ResolvedConceptReference ref = refEnum.nextElement();
            AssociationList targetof = ref.getTargetOf();

            if (targetof != null) {
	if (targetof != null) {
		Association[] associations = targetof.getAssociation();
		if (associations != null && associations.length > 0) {
			for (int i = 0; i < associations.length; i++) {
				Association assoc = associations[i];
				//displayMessage(pw, "\t" + assoc.getAssociationName());

				AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
				for (int j = 0; j < acl.length; j++) {
					AssociatedConcept ac = acl[j];
						String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
					EntityDescription ed = ac.getEntityDescription();
					displayMessage(pw, "\t\t" + ac.getConceptCode() + "/"
							+ (ed == null ? "**No Description**" : ed.getContent()) + " --> (" + rela + ") --> " + code);
					if (ac.getAssociationQualifiers() != null && ac.getAssociationQualifiers().getNameAndValue() != null) {
								for(NameAndValue nv: ac.getAssociationQualifiers().getNameAndValue()){
						displayMessage(pw, "\t\t\tAssoc Qualifier - " + nv.getName() + ": " + nv.getContent());
						displayMessage(pw, "\n");
								}

					}
				}
			}
		}
	}
   }
        }
    }

}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:59,代码来源:PropsAndAssocForCode.java

示例5: printTo

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
 * Display relations from the given code to other concepts.
 *
 * @param code
 * @param lbSvc
 * @param scheme
 * @param csvt
 * @throws LBException
 */
@SuppressWarnings("unchecked")
protected void printTo(PrintWriter pw, String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
        throws LBException {
    displayMessage(pw, "\n\tPoints to ...");

    // Perform the query ...
    ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
            ConvenienceMethods.createConceptReference(code, scheme), true, false, 1, 1, new LocalNameList(), null,
            null, 1024);

    // Analyze the result ...
    if (matches.getResolvedConceptReferenceCount() > 0) {
        Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();

        while (refEnum.hasMoreElements()) {
            ResolvedConceptReference ref = refEnum.nextElement();
            AssociationList sourceof = ref.getSourceOf();

            if (sourceof != null) {
	Association[] associations = sourceof.getAssociation();

	if (associations != null && associations.length > 0) {
		for (int i = 0; i < associations.length; i++) {
			Association assoc = associations[i];
			//displayMessage(pw, "\t" + assoc.getAssociationName());

			AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
			for (int j = 0; j < acl.length; j++) {
				AssociatedConcept ac = acl[j];
					String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());

				EntityDescription ed = ac.getEntityDescription();
				displayMessage(pw, "\t\t" + code + " --> (" + rela + ") --> " + ac.getConceptCode() + "/"
						+ (ed == null ? "**No Description**" : ed.getContent()));
				if (ac.getAssociationQualifiers() != null && ac.getAssociationQualifiers().getNameAndValue() != null) {
							for(NameAndValue nv: ac.getAssociationQualifiers().getNameAndValue()){
					displayMessage(pw, "\t\t\tAssoc Qualifier - " + nv.getName() + ": " + nv.getContent());
					displayMessage(pw, "\n");
							}

				}
			}
		}
	}
   }
        }
    }
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:58,代码来源:PropsAndAssocForCode.java

示例6: getAssociationSourceCodes

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
public Vector getAssociationSourceCodes(String scheme, String version,
    String code, String assocName) {
    CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
    if (version != null)
        csvt.setVersion(version);
    ResolvedConceptReferenceList matches = null;
    Vector v = new Vector();
    try {
        CodedNodeGraph cng = lbSvc.getNodeGraph(scheme, csvt, null);
        Boolean restrictToAnonymous = Boolean.FALSE;
        cng = cng.restrictToAnonymous(restrictToAnonymous);
        NameAndValueList nameAndValueList =
            createNameAndValueList(new String[] { assocName }, null);

        NameAndValueList nameAndValueList_qualifier = null;
        cng =
            cng.restrictToAssociations(nameAndValueList,
                nameAndValueList_qualifier);

        matches =
            cng.resolveAsList(ConvenienceMethods.createConceptReference(
                code, scheme), false, true, 1, 1, new LocalNameList(),
                null, null, _maxReturn);

        if (matches.getResolvedConceptReferenceCount() > 0) {
            java.util.Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
            while (refEnum.hasMoreElements()) {
                ResolvedConceptReference ref = (ResolvedConceptReference) refEnum.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];
                        v.add(ac.getReferencedEntry().getEntityCode());
                    }
                }
            }
            SortUtils.quickSort(v);
        }

    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return v;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:52,代码来源:ConceptDetails.java

示例7: printFrom

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
 * Display relations to the given code from other concepts.
 * @param code
 * @param lbSvc
 * @param scheme
 * @param csvt
 * @throws LBException
 */
@SuppressWarnings("unchecked")
//protected void printFrom(String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
protected void printFrom(String code, EVSApplicationService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)

		throws LBException
{
	Util.displayMessage("Pointed at by ...");

	// Perform the query ...
	/*
	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);


	// Analyze the result ...
	if (matches.getResolvedConceptReferenceCount() > 0) {
		Enumeration<ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();

		while (refEnum.hasMoreElements()) {
			ResolvedConceptReference ref = refEnum.nextElement();
			AssociationList targetof = ref.getTargetOf();
			Association[] associations = targetof.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()));
				}
			}
		}
	}

}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:60,代码来源:FindPropsAndAssocForCode.java

示例8: printTo

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
 * Display relations from the given code to other concepts.
 * @param code
 * @param lbSvc
 * @param scheme
 * @param csvt
 * @throws LBException
 */
@SuppressWarnings("unchecked")
//protected void printTo(String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
protected void printTo(String code, EVSApplicationService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)


		throws LBException {
	Util.displayMessage("Points to ...");

	// Perform the query ...
	/*
	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);


	// Analyze the result ...
	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()));
				}
			}
		}
	}
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:59,代码来源:FindPropsAndAssocForCode.java


注:本文中的org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList.enumerateResolvedConceptReference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。