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


Java ResolvedConceptReferenceList类代码示例

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


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

示例1: printTestCases

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
public void printTestCases(ResolvedConceptReferenceList rcrl) {
	if (rcrl == null) return;
	for (int i=0; i<rcrl.getResolvedConceptReferenceCount(); i++) {
		int j = i+1;
		ResolvedConceptReference rcr = rcrl.getResolvedConceptReference(i);
		StringBuffer buf = new StringBuffer();
		buf.append("(" + j + ") " + rcr.getEntityDescription().getContent() + " (" + rcr.getCode() + ")");
		buf.append("\n\tcoding scheme: " + rcr.getCodingSchemeName());
		buf.append("\n\tversion: " + rcr.getCodingSchemeVersion());
		if (rcr.getCodeNamespace() != null && rcr.getCodeNamespace().length() > 0) {
			buf.append("\n\tnamespace: " + rcr.getCodeNamespace());
		}
		buf.append("\n");
		System.out.println(buf.toString());
	}
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:17,代码来源:TestCaseGenerator.java

示例2: dumpMappingCodingSchemes

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
public void dumpMappingCodingSchemes() {
	int sample_size = 5;
	Vector v = getMappingCodingSchemes();
       for (int i=0; i<v.size(); i++) {
		String t = (String) v.elementAt(i);
		int j = i+1;
		System.out.println("\n" + " (" + j + ") " + t);
		String cs_name = getMappingCodingSchemeName(t);
		String cs_version = getMappingCodingSchemeVersion(t);
		System.out.println("\t" + cs_name + " (" + cs_version + ")");

		ResolvedConceptReferenceList samples = generateTestCases(cs_name, cs_version, sample_size, TestCaseGenerator.TYPE_MAPPING);
		for (int k=0; k<samples.getResolvedConceptReferenceCount(); k++) {
			ResolvedConceptReference rcr = (ResolvedConceptReference) samples.getResolvedConceptReference(k);
			System.out.println("\t" + rcr.getEntityDescription().getContent() + " (" + rcr.getCode() + ")");
		}
	}
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:19,代码来源:TestUtils.java

示例3: dumpResolvedValueSetCodingSchemes

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
public void dumpResolvedValueSetCodingSchemes() {
	int sample_size = 5;
	Vector v = getResolvedValueSetCodingSchemes();
	System.out.println("\nNumber of Resolved Value Set coding schemes: " + v.size());
       for (int i=0; i<5; i++) {
		String t = (String) v.elementAt(i);
		int j = i+1;
		System.out.println("\n" + " (" + j + ") " + t);

		String cs_name = getValueSetCodingSchemeName(t);
		String cs_version = getValueSetCodingSchemeVersion(t);
		System.out.println("\t" + cs_name + " (" + cs_version + ")");

		ResolvedConceptReferenceList samples = generateTestCases(cs_name, cs_version, sample_size, TestCaseGenerator.TYPE_VALUE_SET);
		for (int k=0; k<samples.getResolvedConceptReferenceCount(); k++) {
			ResolvedConceptReference rcr = (ResolvedConceptReference) samples.getResolvedConceptReference(k);
			System.out.println("\t" + rcr.getEntityDescription().getContent() + " (" + rcr.getCode() + ")");
		}
	}
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:21,代码来源:TestUtils.java

示例4: 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;
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:17,代码来源:TestUtils.java

示例5: generateSourceViewInHierarchyTests

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
public void generateSourceViewInHierarchyTests(int number) {
 String scheme = gov.nih.nci.evs.browser.common.Constants.NCI_METATHESAURUS;
 String version = NCIm_PROD_Version;
 ResolvedConceptReferenceList rcrl = testUtils.generateTestCases(scheme, version, 10, number);
 int n = rvGenerator.uniform(0, rcrl.getResolvedConceptReferenceCount()-1);
 ResolvedConceptReference rcr = (ResolvedConceptReference) rcrl.getResolvedConceptReference(n);
 String code = rcr.getConceptCode();
 String name = rcr.getEntityDescription().getContent();

 // code search
 test_counter++;
 int testNumber = test_counter;
 String browserLink = null;
 String algorithm = "exactMatch";
 String matchText = code;
 String target = "codes";

 TestCase testCase = testCaseWriter.createTestCase(testNumber, TestCase.VIEW_IN_HIERARCHY,
								  browserLink,
								  scheme, version, algorithm, target, matchText);
 testCaseWriter.writeTestCase(testCase);
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:23,代码来源:NCImUITestGenerator.java

示例6: main

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
    args = parse(args);
    LexBIGService lbs = RemoteServerUtil.createLexBIGService();
    
    CodedNodeSet cns =
        lbs.getCodingSchemeConcepts("NCI MetaThesaurus", null);
    cns =
        cns.restrictToMatchingDesignations("single dose",
            SearchDesignationOption.ALL, "LuceneQuery", null);

    CodedNodeGraph cng = lbs.getNodeGraph("NCI MetaThesaurus", null, null);
    cng = cng.restrictToTargetCodes(cns);
    ResolvedConceptReferenceList list =
        cng.resolveAsList(null, true, false, 0, 0, null, null, null, null,
            500);

    for (ResolvedConceptReference ref : list.getResolvedConceptReference()) {
        System.out.println("Code: " + ref.getCode());
        System.out.println(" Entity Description"
            + ref.getEntityDescription().getContent());
    }
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:23,代码来源:KevinTest.java

示例7: addEntities

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的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

示例8: 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;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:21,代码来源:TestCaseGenerator.java

示例9: 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;
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:FakeResolvedConceptReferencesIteratorImpl.java

示例10: getHierarchyRoots

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
public ResolvedConceptReferenceList getHierarchyRoots(
     String codingScheme, String version) {
     CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
     if (version != null)
         versionOrTag.setVersion(version);
     try {
         LexBIGServiceConvenienceMethods lbscm =
             (LexBIGServiceConvenienceMethods) lbSvc
                 .getGenericExtension("LexBIGServiceConvenienceMethods");

         lbscm.setLexBIGService(lbSvc);
         String hierarchyID = getHierarchyID(codingScheme, version);

         ResolvedConceptReferenceList rcrl = lbscm.getHierarchyRoots(codingScheme, versionOrTag,
             hierarchyID);

         return rcrl;

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

示例11: getRoots

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
public Vector getRoots(String codingScheme, String version) {
      ResolvedConceptReferenceList rcrl = getHierarchyRoots(
           codingScheme, version);

      if (rcrl == null) {
    System.out.println("Unable to find roots for "  + codingScheme + " (version: " + version + ")");
    return null;
}

      Vector v = new Vector();
      for(int i=0; i<rcrl.getResolvedConceptReferenceCount(); i++) {
	ResolvedConceptReference rcr = rcrl.getResolvedConceptReference(i);
	v.add(rcr);
}

v = SortUtils.quickSort(v);
return v;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:19,代码来源:CodingSchemeDataUtils.java

示例12: 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;
    }
}
 
开发者ID:NCIP,项目名称:cadsr-semantic-tools,代码行数:22,代码来源:DefaultCodeToReturnResolver.java

示例13: print

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
/**
 * Prints the.
 *
 * @param cng the cng
 */
public static void print(CodedNodeGraph cng) {

	ResolvedConceptReferenceList rcrl;
	try {
		rcrl = cng.resolveAsList(null, false, true, 0, 0, null, null, null,
				-1);
		ResolvedConceptReference[] rcrArray = rcrl
				.getResolvedConceptReference();
		for (ResolvedConceptReference rcr : rcrArray) {
			print(rcr);
		}
	} catch (Exception e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:NCIP,项目名称:camod,代码行数:21,代码来源:PrintUtility.java

示例14: numOfChildren

import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入依赖的package包/类
protected int numOfChildren(String code) throws LBException {
    ResolvedConceptReferenceList list = getMatches(code, HAS_SUBTYPE, false);
    if (list.getResolvedConceptReferenceCount() <= 0)
        return 0;
    
    ResolvedConceptReference ref = (ResolvedConceptReference) 
        list.enumerateResolvedConceptReference().nextElement();

    AssociationList aList = ref.getSourceOf();
    Association[] associations = aList.getAssociation();
    int n = 0;
    for (int i = 0; i < associations.length; i++) {
        Association assoc = associations[i];
        AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
        n += acl.length;
    }
    return n;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:19,代码来源:FindRelatedCodes2.java

示例15: 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;
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:34,代码来源:TestCaseGenerator.java


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