本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList.addResolvedConceptReference方法的典型用法代码示例。如果您正苦于以下问题:Java ResolvedConceptReferenceList.addResolvedConceptReference方法的具体用法?Java ResolvedConceptReferenceList.addResolvedConceptReference怎么用?Java ResolvedConceptReferenceList.addResolvedConceptReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList
的用法示例。
在下文中一共展示了ResolvedConceptReferenceList.addResolvedConceptReference方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateMappingTestCases
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
public ResolvedConceptReferenceList generateMappingTestCases(String codingScheme, String version, int number) {
if (version == null) {
version = codingSchemeDataUtils.getVocabularyVersionByTag(codingScheme, gov.nih.nci.evs.browser.common.Constants.PRODUCTION);
}
ResolvedConceptReferenceList rcrl = new ResolvedConceptReferenceList();
ResolvedConceptReferencesIterator rcri = mappingUtils.getMappingDataIterator(codingScheme, version);
int knt = 0;
try {
while (rcri.hasNext()) {
ResolvedConceptReference rcr = (ResolvedConceptReference) rcri.next();
rcrl.addResolvedConceptReference(rcr);
knt++;
if (knt == number) break;
}
} catch (Exception ex) {
ex.printStackTrace();
}
return rcrl;
}
示例2: selectRandomTestCases
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
public ResolvedConceptReferenceList selectRandomTestCases(ResolvedConceptReferenceList list, int number) {
ResolvedConceptReferenceList samples = new ResolvedConceptReferenceList();
if (list.getResolvedConceptReferenceCount() == 0) return samples;
int max_to_return = number;
if (max_to_return > list.getResolvedConceptReferenceCount()) {
max_to_return = list.getResolvedConceptReferenceCount();
}
List selected_list = rvGenerator.selectWithNoReplacement(max_to_return, list.getResolvedConceptReferenceCount()-1);
for (int i=0; i<selected_list.size(); i++) {
Integer int_obj = (Integer) selected_list.get(i);
ResolvedConceptReference rcr = list.getResolvedConceptReference(int_obj.intValue());
samples.addResolvedConceptReference(rcr);
}
return samples;
}
示例3: buildResolvedConceptReference
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
public ResolvedConceptReferenceList buildResolvedConceptReference(List<CodeToReturn> codesToReturn,
LocalNameList restrictToProperties, PropertyType[] restrictToPropertyTypes, Filter[] filters,
boolean resolve) throws LBInvocationException {
ResolvedConceptReferenceList returnList = new ResolvedConceptReferenceList();
for(CodeToReturn codeToReturn : codesToReturn){
returnList.addResolvedConceptReference(
doBuildResolvedConceptReference(
codeToReturn,
restrictToProperties,
restrictToPropertyTypes,
filters,
resolve));
}
if(resolve) {
return this.addEntities(returnList, codesToReturn, restrictToProperties, restrictToPropertyTypes);
} else {
return returnList;
}
}
示例4: get
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
@Override
public ResolvedConceptReferenceList get(int start, int end)
throws LBResourceUnavailableException, LBInvocationException,
LBParameterException {
ResolvedConceptReferenceList list = new ResolvedConceptReferenceList();
if(start > 0 && start <= this.codedNodeList.size()){
if(end > 0 && end <= this.codedNodeList.size()){
for(int i=start; i < end; i++){
ResolvedConceptReference resolvedConceptReference = new ResolvedConceptReference();
String codingSchemeName = this.codedNodeList.get(i).getCodingScheme();
String codingSchemeVersion = this.codedNodeList.get(i).getVersion();
resolvedConceptReference.setCodingSchemeName(codingSchemeName);
resolvedConceptReference.setCodingSchemeVersion(codingSchemeVersion);
list.addResolvedConceptReference(resolvedConceptReference );
}
}
}
return list;
}
示例5: generateResolvedConceptReferences
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
public ResolvedConceptReferenceList generateResolvedConceptReferences(String codingScheme, String version, int number) {
if (version == null) {
version = codingSchemeDataUtils.getVocabularyVersionByTag(codingScheme, gov.nih.nci.evs.browser.common.Constants.PRODUCTION);
}
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null) {
csvt.setVersion(version);
}
ResolvedConceptReferenceList rcrl = new ResolvedConceptReferenceList();
try {
LocalNameList entityTypes = new LocalNameList();
entityTypes.addEntry("concept");
CodedNodeSet cns = lbSvc.getNodeSet(codingScheme, csvt, entityTypes);
SortOptionList sortOptions = null;
LocalNameList filterOptions = null;
LocalNameList propertyNames = null;
CodedNodeSet.PropertyType[] propertyTypes = null;
boolean resolveObjects = false;
int maxToReturn = number;
ResolvedConceptReferenceList rvrlist = cns.resolveToList(sortOptions, filterOptions, propertyNames, propertyTypes, resolveObjects, maxToReturn);
for (int i=0; i<rvrlist.getResolvedConceptReferenceCount(); i++) {
ResolvedConceptReference rcr = rvrlist.getResolvedConceptReference(i);
rcrl.addResolvedConceptReference(rcr);
}
} catch (Exception ex) {
ex.printStackTrace();
}
return rcrl;
}
示例6: generateNCImResolvedConceptReferenceList
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的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;
}
示例7: get
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
* Returns a specific range of items without altering cursor position.
*/
public ResolvedConceptReferenceList get(int start, int end) throws LBResourceUnavailableException,
LBInvocationException, LBParameterException {
verifyResources();
ResolvedConceptReferenceList result = new ResolvedConceptReferenceList();
int stop = Math.max(0, Math.min(scoredTerms.length, end));
if (start < 0 || stop < start)
throw new LBParameterException("Index out of bounds.");
for (int i = start; i < stop; i++)
result.addResolvedConceptReference(scoredTerms[i].ref);
return result;
}