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


Java DescriptionChronicleBI.getVersions方法代码示例

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


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

示例1: addFields

import org.ihtsdo.otf.tcc.api.description.DescriptionChronicleBI; //导入方法依赖的package包/类
@Override
protected void addFields(ComponentChronicleBI chronicle, Document doc) {
    if (chronicle instanceof DescriptionChronicleBI) {
        DescriptionChronicleBI desc = (DescriptionChronicleBI) chronicle;
        String lastDescText = null;

        for (DescriptionVersionBI descriptionVersion : desc.getVersions()) {
            if ((lastDescText == null) || 
                    (lastDescText.equals(descriptionVersion.getText()) == false)) {
                doc.add(new TextField(ComponentProperty.DESCRIPTION_TEXT.name(), 
                        descriptionVersion.getText(), Field.Store.NO));
                lastDescText = descriptionVersion.getText();
            } 
        }
    }
}
 
开发者ID:Apelon-VA,项目名称:OTF-Query-Services,代码行数:17,代码来源:LuceneDescriptionIndexer.java

示例2: threeE

import org.ihtsdo.otf.tcc.api.description.DescriptionChronicleBI; //导入方法依赖的package包/类
private String threeE(ConceptChronicleBI concept) throws ValidationException, IOException, ContradictionException {
 
 StringBuilder sb = new StringBuilder();
		
 boolean ihdFound = false;
 int versionCount = 1;
 for (RelationshipChronicleBI rel : concept.getRelationshipsOutgoing()) { //Each Relationship
	 Collection<? extends RelationshipVersionBI<?>> relVersions = rel.getVersions();
	 for(RelationshipVersionBI<?> version : relVersions) { //Each Relationship Version
		 ConceptChronicleBI versionConcept = OTFUtility.getConceptVersion(version.getDestinationNid());
		 Collection<? extends DescriptionChronicleBI> descriptions = versionConcept.getDescriptions();
		 	for(DescriptionChronicleBI desc : descriptions) { //Each Description Chronicle
		 		Collection<? extends DescriptionVersionBI<?>> descVersions =	(Collection<? extends DescriptionVersionBI<?>>) desc.getVersions();
		 		for(DescriptionVersionBI<?> descVersion : descVersions) {
		 		if(descVersion.getText().equals("Ischemic heart disease")) {
						sb.append("Version " + versionCount++ + ": " + descVersion.toString());
						sb.append("\r\n");
						}
		 		}
				}
	 }
}
 return sb.toString();
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:25,代码来源:VasTestCodeRunner.java

示例3: getQueryMatches

import org.ihtsdo.otf.tcc.api.description.DescriptionChronicleBI; //导入方法依赖的package包/类
@Override
public void getQueryMatches(ConceptVersionBI conceptVersion) throws IOException, ContradictionException {
    for (DescriptionChronicleBI dc : conceptVersion.getDescriptions()) {
        for (DescriptionVersionBI dv : dc.getVersions()) {
            if (dv.getText().matches(regex) && Ts.get().getComponentVersion(viewCoordinate, dv.getNid()).isActive()) {
                addToResultsCache((dv.getNid()));
            }
        }
    }
}
 
开发者ID:Apelon-VA,项目名称:OTF-Query-Services,代码行数:11,代码来源:DescriptionActiveRegexMatch.java

示例4: getQueryMatches

import org.ihtsdo.otf.tcc.api.description.DescriptionChronicleBI; //导入方法依赖的package包/类
@Override
public void getQueryMatches(ConceptVersionBI conceptVersion) throws IOException, ContradictionException {
    for (DescriptionChronicleBI dc : conceptVersion.getDescriptions()) {
        if (cache.contains(dc.getNid())) {
            for (DescriptionVersionBI dv : dc.getVersions()) {
                if (dv.getText().matches(regex)) {
                    addToResultsCache((dv.getNid()));
                }
            }
        }
    }

}
 
开发者ID:Apelon-VA,项目名称:OTF-Query-Services,代码行数:14,代码来源:DescriptionRegexMatch.java

示例5: getDescriptionOnly

import org.ihtsdo.otf.tcc.api.description.DescriptionChronicleBI; //导入方法依赖的package包/类
private String getDescriptionOnly(ConceptChronicleBI concept) throws IOException, ContradictionException {
	StringBuilder sb = new StringBuilder();
	
	sb.append("\r\n");
	int count = 1;
	for (DescriptionChronicleBI desc : concept.getDescriptions()) {
		for(DescriptionVersionBI<?> thisDescVersion : desc.getVersions()) {
			sb.append("Description Term " + count++ + ": " + thisDescVersion.getNid() + " - ");
			sb.append(thisDescVersion.getText());
			sb.append("\r\n");
		}
	}
	return sb.toString();
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:15,代码来源:VasTestCodeRunner.java

示例6: printAllVersions

import org.ihtsdo.otf.tcc.api.description.DescriptionChronicleBI; //导入方法依赖的package包/类
public void printAllVersions(DescriptionChronicleBI fullDesc) throws IOException {
	int i = 0;
	
	for (DescriptionVersionBI desc : fullDesc.getVersions()) {
		System.out.println("Version #" + i++);
		printDescription(desc);

		System.out.println("\n\n");
	}
}
 
开发者ID:IHTSDO,项目名称:example-OTF-code,代码行数:11,代码来源:ConceptPrinter.java

示例7: getLoincConceptNid

import org.ihtsdo.otf.tcc.api.description.DescriptionChronicleBI; //导入方法依赖的package包/类
private int getLoincConceptNid(SelectionCriteria sc) throws IOException, ParseException, PropertyVetoException
{
	if (sc.getValueId() != null && sc.getValueId().length() > 0)
	{
		ConceptChronicleBI cc;
		if (Utility.isUUID(sc.getValueId()))
		{
			cc = ts_.getConcept(UUID.fromString(sc.getValueId()));
		}
		else
		{
			LuceneDynamicRefexIndexer refexIndexer = AppContext.getService(LuceneDynamicRefexIndexer.class);
			
			if (refexIndexer == null)
			{
				throw new RuntimeException("No sememe indexer found, aborting.");
			}
			List<SearchResult> searchResults = refexIndexer.query(new RefexDynamicString("\"" + sc.getValueId() + "\""), getNid(LOINC_NUM), false, 
					new Integer[] {0}, 5, null);
			if (searchResults.size() != 1)
			{
				throw new RuntimeException("Unexpected - multiple hits on ID " + sc.getValueId());
			}
			else
			{
				cc = ts_.getComponent(searchResults.get(0).getNid()).getEnclosingConcept();
			}
		}
		for (DescriptionChronicleBI dc : cc.getDescriptions())
		{
			for (DescriptionVersionBI<?> dv : dc.getVersions())
			{
				if (dv.getText().equals(sc.getValue()))
				{
					return cc.getNid();
				}
			}
		}
		//TODO maybe fail?
		System.err.println("ERROR -------------------");
		System.err.println("ERROR - The concept '" + cc + "' did not have a description that matched the expected value of '" + sc.getValue() + "' from the spreadsheet");
		System.err.println("ERROR -------------------");
		return cc.getNid();
	}
	else
	{
		throw new RuntimeException("Not yet handeled");
	}
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:50,代码来源:LOINCSpreadsheetRules.java


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