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


Java ResolvedConceptReference.setEntity方法代码示例

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


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

示例1: addEntities

import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
private ResolvedConceptReferenceList addEntities(
        ResolvedConceptReferenceList unresolvedList,
        List<CodeToReturn> codesToReturn,
        LocalNameList restrictToProperties, PropertyType[] restrictToPropertyTypes) throws LBInvocationException {
    Map<String,Entity> entityMap = this.buildCodedEntry(
            codesToReturn,
            restrictToProperties,
            restrictToPropertyTypes);
    
    for(ResolvedConceptReference ref : unresolvedList.getResolvedConceptReference()) {
        if(ref == null) {continue;}
        
        String refKey = this.getKey(ref);
        ref.setEntity(entityMap.get(refKey));
    }
    
    return unresolvedList;
}
 
开发者ID:NCIP,项目名称:cadsr-semantic-tools,代码行数:19,代码来源:DefaultCodeToReturnResolver.java

示例2: generateNCImResolvedConceptReferenceList

import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
ResolvedConceptReferenceList generateNCImResolvedConceptReferenceList(int number) {
  String scheme = gov.nih.nci.evs.browser.common.Constants.NCI_THESAURUS;
  String version = null;
  ResolvedConceptReferenceList rcrl = testUtils.generateTestCases(scheme, version, number, TestCaseGenerator.TYPE_TERMINOLOGY);
//Generate NCI Thesaurus
// map NCI Thesaurus to NCIm Metahesaurus
  String ncim_scheme = gov.nih.nci.evs.browser.common.Constants.NCI_METATHESAURUS;
  String ncim_version = NCIm_PROD_Version;
  ResolvedConceptReferenceList testCases = new ResolvedConceptReferenceList();
     if (rcrl != null) {
   for (int i=0; i<rcrl.getResolvedConceptReferenceCount(); i++) {
	   ResolvedConceptReference rcr = (ResolvedConceptReference) rcrl.getResolvedConceptReference(i);
	   String code = rcr.getConceptCode();
	   Vector v = metathesaurusUtils.getMatchedMetathesaurusCUIs(scheme, version, null, code);
	   if (v != null && v.size() > 0) {
		   ResolvedConceptReference ncim_rcr = new ResolvedConceptReference();
		   //Entity entity = conceptDetails.getConceptByCode(ncim_scheme, ncim_version, code);

		   Entity entity = new Entity();
		   String cui = (String) v.elementAt(0);
		   entity.setEntityCodeNamespace(ncim_scheme);
		   entity.setEntityCode(cui);

		   ncim_rcr.setEntity(entity);
		   ncim_rcr.setConceptCode(code);
		   ncim_rcr.setCodingSchemeName(ncim_scheme);
		   //ncim_rcr.setEntityDescription(entity.getEntityDescription());
		   testCases.addResolvedConceptReference(ncim_rcr);
		   if (testCases.getResolvedConceptReferenceCount() == NCIM_TEST_CASES) break;
       }
   }

  } else {
  		System.out.println("WARNING: generateNCImResolvedConceptReferenceList rcrl returns null???");
     }
  return testCases;
 }
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:38,代码来源:NCImUITestGenerator.java

示例3: doBuildResolvedConceptReference

import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
protected ResolvedConceptReference doBuildResolvedConceptReference(CodeToReturn codeToReturn,
        LocalNameList restrictToProperties,
        PropertyType[] restrictToPropertyTypes,
        Filter[] filters,
        boolean resolve) throws LBInvocationException {
    SystemResourceService resourceManager = LexEvsServiceLocator.getInstance().getSystemResourceService();
    
    // Always assign the basics...
    ResolvedConceptReference rcr = new ResolvedConceptReference();
    try {
        
        rcr.setCodingSchemeURI(codeToReturn.getUri());
        rcr.setCodingSchemeVersion(codeToReturn.getVersion());
        rcr.setCode(codeToReturn.getCode());
        rcr.setCodeNamespace(codeToReturn.getNamespace());
        EntityDescription ed = new EntityDescription();
        ed.setContent(codeToReturn.getEntityDescription());
        rcr.setEntityDescription(ed);
        rcr.setEntityType(codeToReturn.getEntityTypes());
        rcr.setCodingSchemeName(
                resourceManager.getInternalCodingSchemeNameForUserCodingSchemeName(codeToReturn.getUri(), codeToReturn.getVersion()));

    } catch (LBParameterException e) {
        // this should only happen when the codedNodeSet was constructed
        // from a graph -
        // and if a source or target concept in the graph is not available
        // in the system.
        rcr.setEntity(null);
    }

    // these (two) stay null by design
    rcr.setSourceOf(null);
    rcr.setTargetOf(null);

    // these (two) stay null by design
    rcr.setSourceOf(null);
    rcr.setTargetOf(null);

    if (filters != null && filters.length > 0) {
        for (int i = 0; i < filters.length; i++) {
            if (!filters[i].match(rcr)) {
                return null;
            }
        }
    }

    return rcr;
}
 
开发者ID:NCIP,项目名称:cadsr-semantic-tools,代码行数:49,代码来源:DefaultCodeToReturnResolver.java


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