本文整理汇总了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;
}
示例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;
}
示例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;
}