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


Java RefexVersionBI.isActive方法代码示例

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


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

示例1: getAttributeText

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入方法依赖的package包/类
/**
 * Returns the attribute text.
 *
 * @param concept the concept
 * @param type the type
 * @return the attribute text
 * @throws Exception the exception
 */
@SuppressWarnings("unused")
private String getAttributeText(ConceptChronicleBI concept, String type)
  throws Exception {
  for (RefexChronicleBI<?> refex : concept.getAnnotations()) {
    RefexVersionBI<?> refexVersion =
        refex.getVersion(OTFUtility.getViewCoordinate());
    // WARNING:
    // LOINC is created using FSN and not PT for this, the
    // metadata concepts do not have PTs.
    String prefName =
        OTFUtility.getConceptVersion(refexVersion.getAssemblageNid())
            .getFullySpecifiedDescription().getText();
    if (refexVersion.isActive() && refexVersion instanceof StringMember
        && prefName.equals(type)) {
      return ((StringMember) refexVersion).getString1();
    }
  }
  return "";
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:28,代码来源:LoincContentRequestHandler.java

示例2: processMembers

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入方法依赖的package包/类
private void processMembers(RefexVersionBI<?> member, RefexVersionBI<?> previousMember, ConceptVersionBI refCompCon) throws IOException, ContradictionException {
	if (member.getAssemblageNid() == refsetNid_) {
		// Setup if Necessary
		//TODO (artf231876) The current code only works if every member has the same RefexType (and there is _no_ guarantee about that in the APIs.  
		//The entire column display of the tables needs to be reworked, as the columns that are displayed needs to be dynamically detected 
		//from the data in the table, so it can take into account multiple refex types.
		if (!rth_.isSetupFinished() && member.getRefexType() != RefexType.MEMBER) {
			rth_.finishTableSetup(member, isAnnotation, refsetRows, refCompCon, member.getAssemblageNid());
			refsetType = member.getRefexType();
		}

		// Have needed member, add to data
		RefsetInstance instance = RefsetInstanceAccessor.getInstance(refCompCon, member, previousMember, refsetType);
		data.add(instance);
	}

	// Search for member's annotations
	Collection<? extends RefexChronicleBI<?>> refAnnots = (activeOnly_ ? member.getAnnotationsActive(OTFUtility.getViewCoordinate()) : member.getAnnotations());
	for (RefexChronicleBI<?> annot : refAnnots) {
		List<RefexVersionBI<?>> annotVersions = new ArrayList<>();
		if (activeOnly_)
		{
			RefexVersionBI<?> version = (RefexVersionBI<?>) annot.getVersion(OTFUtility.getViewCoordinate());
			if (version.isActive()) {
				annotVersions.add(version);
			}
		}
		else {
			annotVersions.addAll((Collection<? extends RefexVersionBI<?>>) annot.getVersions());
		}
		
		RefexVersionBI<?> prevAnnotVersion = null;
		for (RefexVersionBI<?> annotVersion : annotVersions)
		{
			processMembers(annotVersion, prevAnnotVersion, refCompCon);
			
			prevAnnotVersion = annotVersion;
		}
	}
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:41,代码来源:RefsetViewController.java

示例3: processLangRefsets

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入方法依赖的package包/类
/**
 * Processes a language refex member to determine if the language is English
 * or another language. Only the versions which have a stamp nid in the
 * specified collection of stamp nids will be written.
 *
 * @param refexChronicle refex member to process
 * @throws IOException signals that an I/O exception has occurred
 * @throws ContradictionException the contradiction exception
 */
private void processLangRefsets(RefexChronicleBI<?> refexChronicle)
  throws IOException, ContradictionException {
  if (refexChronicle != null) {
    if (!excludedRefsetIds.contains(refexChronicle.getNid())) {
      Collection<RefexVersionBI<?>> versions = new HashSet<>();
      if (releaseType.equals(ReleaseType.FULL)) {
        for (Object o : refexChronicle.getVersions()) {
          RefexVersionBI<?> r = (RefexVersionBI<?>) o;
          if (r.getPathNid() == pathNid) {
            versions.add(r);
          }
        }
      } else {
        RefexVersionBI<?> version = refexChronicle.getVersion(viewCoordinate);
        if (version != null) {
          versions.add(version);
        }
      }
      boolean write = true;
      for (RefexVersionBI<?> rv : versions) {
        if (!rv.isActive()) {
          if (rv.getPathNid() != pathNid) {
            write = false;
          }
        }
        if (rv.isActive()) { // CHANGE FOR DK, source data incorrect, retired
                             // descriptions should also have retired lang
                             // refsets
          ComponentVersionBI rc =
              dataStore.getComponentVersion(viewCoordinate,
                  rv.getReferencedComponentNid());
          if (rc == null || !rc.isActive()) {
            write = false;
          }
        }
        if (write) {
          if (refexChronicle.getNid() == SnomedMetadataRf2.GB_ENGLISH_REFSET_RF2
              .getNid()) {
            processLang(rv);
          } else if (refexChronicle.getNid() == SnomedMetadataRf2.US_ENGLISH_REFSET_RF2
              .getLenient().getNid()) {
            processLang(rv);
          } else {
            if (otherLangRefsetsWriter != null) {
              processOtherLang(rv);
            }
          }
        }

      }
    }
  }
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:63,代码来源:Rf2Export.java


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