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


Java CodingSchemeSummary类代码示例

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


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

示例1: getSchemeVersions

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
/**
 * Returns list of all versions associated with a scheme
 * @param uri
 * @return
 * @throws Exception
 */
public ArrayList<String> getSchemeVersions(String uri) throws Exception {
	ArrayList<String> list = new ArrayList<String>();

	LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();

    CodingSchemeRenderingList csrl = lbSvc.getSupportedCodingSchemes();
    CodingSchemeRendering[] csrs = csrl.getCodingSchemeRendering();

    for (int i = 0; i < csrs.length; i++) {
        CodingSchemeRendering csr = csrs[i];
        String status = csr.getRenderingDetail().getVersionStatus().value();
        CodingSchemeSummary css = csr.getCodingSchemeSummary();
        if (status.equals("active")) {
         if (css.getCodingSchemeURI().equals(uri))
         	list.add(css.getRepresentsVersion());
        }
    }

	return list;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:27,代码来源:CartActionBean.java

示例2: getVersionListData

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public Vector<String> getVersionListData(String codingSchemeName) {
     Vector<String> v = new Vector();
     try {
         CodingSchemeRenderingList csrl = lbSvc.getSupportedCodingSchemes();
         if (csrl == null) {
             return v;
}
         CodingSchemeRendering[] csrs = csrl.getCodingSchemeRendering();
         for (int i = 0; i < csrs.length; i++) {
             CodingSchemeRendering csr = csrs[i];
             Boolean isActive =
                 csr.getRenderingDetail().getVersionStatus().equals(
                     CodingSchemeVersionStatus.ACTIVE);
             CodingSchemeSummary css = csr.getCodingSchemeSummary();
             String formalname = css.getFormalName();
             if (formalname.compareTo(codingSchemeName) == 0 || css.getCodingSchemeURI().compareTo(codingSchemeName) == 0
                 || css.getLocalName().compareTo(codingSchemeName) == 0) {
                 String representsVersion = css.getRepresentsVersion();
                 v.add(representsVersion);
             }
         }
     } catch (Exception ex) {
         ex.printStackTrace();
     }
     return v;
 }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:27,代码来源:CodingSchemeDataUtils.java

示例3: run

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public void run(String s)throws LBException{
	CodingSchemeSummary css = Util.promptForCodeSystem();
	if (css != null) {
		//LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
		EVSApplicationService lbSvc = RemoteServerUtil2.createLexBIGService();
		String scheme = css.getCodingSchemeURN();
		CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
		csvt.setVersion(css.getRepresentsVersion());

		matchSynonyms(s, lbSvc, scheme, csvt);
		matchSpell(s, lbSvc, scheme, csvt);
		matchTermCompletion(s, lbSvc, scheme, csvt);
		matchWordCompletion(s, lbSvc, scheme, csvt);
		matchSubquery(s, lbSvc, scheme, csvt);
	}
	Util.displayMessage("Done.");
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:18,代码来源:MetaMatch.java

示例4: run

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public void run(int maxDepth, String sab)throws LBException{
	CodingSchemeSummary css = Util.promptForCodeSystem();
	long ms = System.currentTimeMillis();
	try {
		if (css != null) {
			//LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
			EVSApplicationService lbSvc = RemoteServerUtil2.createLexBIGService();

			String scheme = css.getCodingSchemeURN();
			CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
			csvt.setVersion(css.getRepresentsVersion());
			print(maxDepth, sab, lbSvc, scheme, csvt);
		}
	} finally {
		System.out.println("Run time (ms): " + (System.currentTimeMillis() - ms));
	}
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:18,代码来源:ListHierarchyMetaBySource.java

示例5: resolveConcepts

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
/**
 * Resolves matching concepts for any word in the given term.
 * @param css The code system to search.
 * @param matchWords The term to match.
 * @return The list of matching references.
 * @throws LBException
 */
protected ResolvedConceptReferencesIterator resolveConcepts(CodingSchemeSummary css, String query) throws LBException {
	// Define a code set over the target terminology and
	// restrict to concepts with matching text based on 
	// the provided term.
	LexBIGService lbs = LexBIGServiceImpl.defaultInstance();
	CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
	csvt.setVersion(css.getRepresentsVersion());
	CodedNodeSet cns = lbs.getCodingSchemeConcepts(css.getLocalName(), csvt);
	
	// Restrict the code set.
	cns.restrictToMatchingDesignations(
			query, SearchDesignationOption.ALL, MatchAlgorithms.LuceneQuery.name(), null);
	
	// Resolve the concepts and assigned text.
	ResolvedConceptReferencesIterator matches = cns.resolve(
			ConvenienceMethods.createSortOptionList(new String[] {SortableProperties.code.name()}),
			null, new PropertyType[] {PropertyType.PRESENTATION});
	return matches;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:27,代码来源:ScoreTerm.java

示例6: run

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public void run(int maxDepth, String hID)throws LBException{
	CodingSchemeSummary css = Util.promptForCodeSystem();
	long ms = System.currentTimeMillis();
	try {
		if (css != null) {
			Util.displayMessage(
				"Displaying " + (maxDepth > 0 ? Integer.toString(maxDepth) : "ALL")
					+ " levels of hierarchy: " + (hID == null ? "ANY" : hID));

			//LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
			EVSApplicationService lbSvc = RemoteServerUtil2.createLexBIGService();

			String scheme = css.getCodingSchemeURN();
			CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
			csvt.setVersion(css.getRepresentsVersion());
			printHierarchies(lbSvc, scheme, csvt, maxDepth, hID);
		}
	} finally {
		System.out.println("Run time (ms): " + (System.currentTimeMillis() - ms));
	}
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:22,代码来源:ListHierarchy.java

示例7: queryReturnsData

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public static <T extends ResourceQuery> boolean queryReturnsData(
		CodingSchemeRenderingList lexCodingSchemeRenderingList,
		QueryData<T> queryData){
	boolean found = false;
	String lexRenderingFormalName, lexRenderingVersion;
	CodingSchemeSummary lexRenderingSummary;
	
	int renderingCount = lexCodingSchemeRenderingList.getCodingSchemeRenderingCount();
	
	for(int index=0; index < renderingCount; index++){
		lexRenderingSummary = lexCodingSchemeRenderingList.getCodingSchemeRendering(index).getCodingSchemeSummary();
		lexRenderingFormalName = lexRenderingSummary.getFormalName() != null ? lexRenderingSummary.getFormalName() : lexRenderingSummary.getLocalName();
		lexRenderingVersion = lexRenderingSummary.getRepresentsVersion();

		if(lexRenderingFormalName.equals(queryData.getLexSchemeName()) && 
			lexRenderingVersion.equals(queryData.getLexVersionOrTag().getVersion())){
			found = true;
		}
	}		
		
	return found;
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:CommonSearchFilterUtils.java

示例8: buildCaches

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
protected void buildCaches() {
	synchronized(this.mutex){
		try {
			for (CodingSchemeRendering csr : this.lexBigService
					.getSupportedCodingSchemes().getCodingSchemeRendering()) {
				CodingSchemeSummary summary = csr.getCodingSchemeSummary();
				
				NameVersionPair nameVersionPair = 
					new NameVersionPair(
						summary.getLocalName(),
						summary.getRepresentsVersion());
				
				String codeSystemVersionUri = 
					this.uriHandler.getCodeSystemVersionUri(summary);
				
				this.uriToNameVersionPair.put(codeSystemVersionUri, nameVersionPair);
			}
		} catch (LBInvocationException e) {
			this.log.warn(e);
		}
	}
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:CodeSystemVersionUriResolver.java

示例9: createFakeCodingSchemeRenderingList

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public CodingSchemeRenderingList createFakeCodingSchemeRenderingList(Service service, boolean withData){
	CodingSchemeRenderingList list = new CodingSchemeRenderingList();

	for (int schemeIndex = 0; schemeIndex < fakeData.size(); schemeIndex++) {
		CodingSchemeRendering render = new CodingSchemeRendering();
		CodingSchemeSummary codingSchemeSummary = new CodingSchemeSummary();

		if (withData) {
			for (ComponentReference property : service
					.getSupportedSearchReferences()) {
				fakeData.setProperty(codingSchemeSummary, schemeIndex,
						property);
			}
		}

		render.setCodingSchemeSummary(codingSchemeSummary);
		list.addCodingSchemeRendering(schemeIndex, render);
	}

	return list;
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:22,代码来源:FakeLexEvsSystem.java

示例10: getVocabularyVersionByTag

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public static String getVocabularyVersionByTag(String codingSchemeName, String ltag)
{
	 if (codingSchemeName == null) return null;
	 try {
		 //EVSApplicationService lbSvc = new RemoteServerUtil().createLexBIGService();
		 LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
		 CodingSchemeRenderingList lcsrl = lbSvc.getSupportedCodingSchemes();
		 CodingSchemeRendering[] csra = lcsrl.getCodingSchemeRendering();
		 for (int i=0; i<csra.length; i++)
		 {
			CodingSchemeRendering csr = csra[i];
			CodingSchemeSummary css = csr.getCodingSchemeSummary();
			if (css.getFormalName().compareTo(codingSchemeName) == 0 || css.getLocalName().compareTo(codingSchemeName) == 0)
			{
				if (ltag == null) return css.getRepresentsVersion();
				RenderingDetail rd = csr.getRenderingDetail();
				CodingSchemeTagList cstl = rd.getVersionTags();
				java.lang.String[] tags = cstl.getTag();
				for (int j=0; j<tags.length; j++)
				{
					String version_tag = (String) tags[j];
					if (version_tag.compareToIgnoreCase(ltag) == 0)
					{
						return css.getRepresentsVersion();
					}
				}
			}
		 }
     } catch (Exception e) {
		 e.printStackTrace();
	 }
	 _logger.debug("Version corresponding to tag " + ltag + " is not found " + " in " + codingSchemeName);
	 return null;
 }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:35,代码来源:SearchUtils.java

示例11: getVersionListData

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public static Vector<String> getVersionListData(String codingSchemeName) {

        Vector<String> v = new Vector();
		try {
        	RemoteServerUtil rsu = new RemoteServerUtil();
			//EVSApplicationService lbSvc = rsu.createLexBIGService();
			LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
			CodingSchemeRenderingList csrl = lbSvc.getSupportedCodingSchemes();
			if(csrl == null) _logger.debug("csrl is NULL");

			CodingSchemeRendering[] csrs = csrl.getCodingSchemeRendering();
			for (int i=0; i<csrs.length; i++)
			{
				CodingSchemeRendering csr = csrs[i];
            	Boolean isActive = csr.getRenderingDetail().getVersionStatus().equals(CodingSchemeVersionStatus.ACTIVE);
				if (isActive != null && isActive.equals(Boolean.TRUE))
				{
					CodingSchemeSummary css = csr.getCodingSchemeSummary();
					String formalname = css.getFormalName();
					if (formalname.compareTo(codingSchemeName) == 0)
					{
						String representsVersion = css.getRepresentsVersion();
						v.add(representsVersion);
					}
				}
			}
	   } catch (Exception ex) {

	   }
	   return v;
   }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:32,代码来源:SearchUtils.java

示例12: run

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public void run(String name) throws LBException{
	CodingSchemeSummary css = Util.promptForCodeSystem();
	if (css != null) {
		CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
		csvt.setVersion(css.getRepresentsVersion());
		EVSApplicationService lbs = RemoteServerUtil2.createLexBIGService();
		//String code = new ConvenienceMethods(LexBIGServiceImpl.defaultInstance()).nameToCode(name, css.getCodingSchemeURN(), csvt);
		String code = new ConvenienceMethods(lbs).nameToCode(name, css.getCodingSchemeURN(), csvt);

		Util.displayMessage(
			code == null ? "Code not found" : "Matching code: " + code);
	}
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:14,代码来源:FindConceptCodeForName.java

示例13: run

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
/**
 * Process the provided code.
 * @param code
 * @throws LBException
 */
public void run(String code) throws LBException {
	CodingSchemeSummary css = Util.promptForCodeSystem();
	if (css != null) {
		//LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
		EVSApplicationService lbSvc = RemoteServerUtil2.createLexBIGService();
		String scheme = css.getCodingSchemeURN();
		CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
		csvt.setVersion(css.getRepresentsVersion());

		printProps(code, lbSvc, scheme, csvt);
		printFrom(code, lbSvc, scheme, csvt);
		printTo(code, lbSvc, scheme, csvt);
	}
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:20,代码来源:FindPropsAndAssocForCode.java

示例14: run

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

示例15: run

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入依赖的package包/类
public void run(String code)throws LBException{
	CodingSchemeSummary css = Util.promptForCodeSystem();
	if (css != null) {
		//LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
		EVSApplicationService lbSvc = RemoteServerUtil2.createLexBIGService();
		String scheme = css.getCodingSchemeURN();
		CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
		csvt.setVersion(css.getRepresentsVersion());

		printFrom(code, lbSvc, scheme, csvt);
		printTo(code, lbSvc, scheme, csvt);
		printPropertyLinks(code, lbSvc, scheme, csvt);
	}
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:15,代码来源:FindRelatedCodesWithPropertyLinks.java


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