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


Java RefexVersionBI类代码示例

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


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

示例1: computePossibleComponents

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
@Override
public NativeIdSetBI computePossibleComponents(NativeIdSetBI incomingPossibleComponents) throws IOException, ValidationException, ContradictionException {
    if (this.viewCoordinateKey.equals(this.enclosingQuery.currentViewCoordinateKey)) {
        this.viewCoordinate = (ViewCoordinate) this.enclosingQuery.getVCLetDeclarations().get(viewCoordinateKey);
    } else {
        this.viewCoordinate = (ViewCoordinate) this.enclosingQuery.getLetDeclarations().get(viewCoordinateKey);
    }
    int conceptNid = this.conceptSpec.getNid();
    int refsetNid = this.refsetSpec.getNid();
    ConceptVersionBI conceptVersion = Ts.get().getConceptVersion(viewCoordinate, refsetNid);
    for (RefexVersionBI<?> rm : conceptVersion.getCurrentRefsetMembers(viewCoordinate)) {
        if (rm.getReferencedComponentNid() == conceptNid) {
            getResultsCache().add(refsetNid);
        }
    }

    return getResultsCache();

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

示例2: computePossibleComponents

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
@Override
public NativeIdSetBI computePossibleComponents(NativeIdSetBI incomingPossibleComponents) throws IOException, ValidationException, ContradictionException {
    if (this.viewCoordinateKey.equals(this.enclosingQuery.currentViewCoordinateKey)) {
        this.viewCoordinate = (ViewCoordinate) this.enclosingQuery.getVCLetDeclarations().get(viewCoordinateKey);
    } else {
        this.viewCoordinate = (ViewCoordinate) this.enclosingQuery.getLetDeclarations().get(viewCoordinateKey);
    }

    int parentNid = this.conceptSpec.getNid();
    NativeIdSetBI kindOfSet = Ts.get().isKindOfSet(parentNid, viewCoordinate);
    int refsetNid = this.refsetSpec.getNid();
    ConceptVersionBI conceptVersion = Ts.get().getConceptVersion(viewCoordinate, refsetNid);
    for (RefexVersionBI<?> rm : conceptVersion.getCurrentRefsetMembers(viewCoordinate)) {
        if (kindOfSet.contains(rm.getReferencedComponentNid())) {
            getResultsCache().add(refsetNid);
        }
    }

    return getResultsCache();
}
 
开发者ID:Apelon-VA,项目名称:OTF-Query-Services,代码行数:21,代码来源:RefsetContainsKindOfConcept.java

示例3: getRefsetMember

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
public static RefexVersionBI<?> getRefsetMember(int nid) {
	try {
		RefexChronicleBI<?> refexChron = (RefexChronicleBI<?>) dataStore.getComponent(nid);

		if (refexChron != null) {
			ViewCoordinate tempVc = getViewCoordinate();
			tempVc.getAllowedStatus().add(Status.INACTIVE);
			RefexVersionBI<?> refexChronVersion = refexChron.getVersion(tempVc);
			
			return refexChronVersion;
		}
	} catch (Exception ex) {
		LOG.warn("perhaps unexpected?", ex);
	}

	return null;
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:18,代码来源:OTFUtility.java

示例4: isAcceptableTerm

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
private static boolean isAcceptableTerm(DescriptionVersionBI<?> d) {
	try {
        for (RefexVersionBI<?> refex : d.getRefexMembersActive(OTFUtility.getViewCoordinate())) {
            if (refex.getAssemblageNid() == langDropDown.getSelectionModel().getSelectedItem().getNid()) {
                RefexNidVersionBI<?> langRefex = (RefexNidVersionBI<?>) refex;

                if ((langRefex.getNid1() == ReferenceConcepts.ACCEPTABLE_ACCEPTABILITY.getNid()) || 
            		(langRefex.getNid1() == SnomedMetadataRf2.ACCEPTABLE_RF2.getNid())) {
					acceptRefexMap .put(d.getNid(), langRefex);
                	return true;
                }
            }
        }
	} catch (Exception e) {
		AppContext.getCommonDialogs().showErrorDialog("Can't identify Preferred/Acceptable value for description: " + d.getText(), e);
	}
       return false;
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:19,代码来源:PreferredAcceptabilityPrompt.java

示例5: gertPrefMember

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
private static RefexNidVersionBI<?> gertPrefMember(DescriptionVersionBI<?> d) {
	try {
        for (RefexVersionBI<?> refex : d.getRefexMembersActive(OTFUtility.getViewCoordinate())) {
            if (refex.getAssemblageNid() == langDropDown.getSelectionModel().getSelectedItem().getNid()) {
                RefexNidVersionBI<?> langRefex = (RefexNidVersionBI<?>) refex;

                if ((langRefex.getNid1() == ReferenceConcepts.PREFERRED_ACCEPTABILITY_RF1.getNid()) || 
            		(langRefex.getNid1() == SnomedMetadataRf2.PREFERRED_RF2.getNid())) {
                	return langRefex;
                }
            }
        }
	} catch (Exception e) {
		AppContext.getCommonDialogs().showErrorDialog("Can't identify Preferred/Acceptable value for description: " + d.getText(), e);
	}
       return null;
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:18,代码来源:PreferredAcceptabilityPrompt.java

示例6: 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

示例7: StrExtRefsetInstance

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
private StrExtRefsetInstance(ConceptVersionBI refCompCon, RefexVersionBI<?> member, RefexVersionBI<?> previousMember) {
	super(refCompCon, member, previousMember);
	RefexStringVersionBI<?> ext = (RefexStringVersionBI<?>) member;
	
	boolean updateString = true;
	
	if (previousMember != null) {
		RefexStringVersionBI<?> prevExt = (RefexStringVersionBI<?>) previousMember;
		
		if (prevExt.getString1().equals(ext.getString1())) {
			updateString = false;
		}
	}
	
	if (updateString) {
		strExt = new SimpleStringProperty(ext.getString1());
	} else {
		strExt = new SimpleStringProperty("");
	}
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:21,代码来源:RefsetInstanceAccessor.java

示例8: NidStrExtRefsetInstance

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
private NidStrExtRefsetInstance(ConceptVersionBI refCompCon, RefexVersionBI<?> member, RefexVersionBI<?> previousMember) {
	super(refCompCon, member, previousMember);

	RefexNidStringVersionBI<?> ext = (RefexNidStringVersionBI<?>)member;
	this.strExt = new SimpleStringProperty(ext.getString1());
	boolean updateString = true;
	
	if (previousMember != null) {
		RefexStringVersionBI<?> prevExt = (RefexStringVersionBI<?>) previousMember;
		
		if (prevExt.getString1().equals(ext.getString1())) {
			updateString = false;
		}
	}
	
	if (updateString) {
		strExt = new SimpleStringProperty(ext.getString1());
	} else {
		strExt = new SimpleStringProperty("");
	}
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:22,代码来源:RefsetInstanceAccessor.java

示例9: getInstance

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
public static RefsetInstance getInstance(ConceptVersionBI refCompCon,
		RefexVersionBI<?> member, RefexVersionBI<?> previousMember, RefexType refsetType) {
	if (refsetType == RefexType.MEMBER) {
		return new MemberRefsetInstance(refCompCon, member, previousMember);
	} else if (refsetType == RefexType.STR) {
		return new StrExtRefsetInstance(refCompCon, member, previousMember);
	} else if (refsetType == RefexType.CID) {
		return new NidExtRefsetInstance(refCompCon, member, previousMember);
	} else if (refsetType == RefexType.CID_STR) {
		return new NidStrExtRefsetInstance(refCompCon, member, previousMember);
	} else if (refsetType == RefexType.UNKNOWN) {
		return new CEMCompositRefestInstance(refCompCon, member, previousMember);
	}

	return null;
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:17,代码来源:RefsetInstanceAccessor.java

示例10: printAllVersionsOfMember

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
public void printAllVersionsOfMember(RefexChronicleBI refsetChron) throws Exception {
	for (int i = 0; i < refsetChron.getVersions().size(); i++) {
		System.out.println("Version #: " + (i + 1));
		RefexVersionBI member = (RefexVersionBI)refsetChron.getVersions().toArray()[i];
		ConceptVersionBI con = appDb.getDB().getConcept(member.getReferencedComponentNid()).getVersion(appDb.getVC());
		 
		if (member.getRefexType() == RefexType.MEMBER) {
			System.out.println(con.getPreferredDescription().getText() + " with Status: " + member.getStatus() + "\n");
		} else if (member.getRefexType() == RefexType.CID_STR) {
			RefexNidStringVersionBI extensionMember = (RefexNidStringVersionBI)member;
			String strExt = extensionMember.getString1();
			int cidExtNid = extensionMember.getNid1();
	        DescriptionVersionBI cidExtCon = (DescriptionVersionBI) appDb.getDB().getComponent(cidExtNid).getVersion(appDb.getVC());

			System.out.println(con.getPreferredDescription().getText() + " of Member Type with Status: " + member.getStatus());
			System.out.println("Is extended with CID: " + cidExtCon.getText() + " and String: " + strExt+ "\n");
		} 
	}
}
 
开发者ID:IHTSDO,项目名称:example-OTF-code,代码行数:20,代码来源:RefsetPrinter.java

示例11: printAllVersionsOfAnnotated

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
public void printAllVersionsOfAnnotated(RefexChronicleBI refsetChron) throws Exception {
	for (int i = 0; i < refsetChron.getVersions().size(); i++) {
		System.out.println("Version #: " + (i + 1));
		RefexVersionBI member = (RefexVersionBI)refsetChron.getVersions().toArray()[i];
		
		ConceptVersionBI refCon = appDb.getDB().getConcept(member.getAssemblageNid()).getVersion(appDb.getVC());
		
		if (member.getRefexType() == RefexType.MEMBER) {
			System.out.println(refCon.getPreferredDescription().getText() + " with Status: " + member.getStatus() + "\n");
		} else if (member.getRefexType() == RefexType.CID_STR) {
			RefexNidStringVersionBI extensionMember = (RefexNidStringVersionBI)member;
			String strExt = extensionMember.getString1();
			int cidExtNid = extensionMember.getNid1();
			DescriptionVersionBI cidExtCon = (DescriptionVersionBI) appDb.getDB().getComponent(cidExtNid).getVersion(appDb.getVC());

			System.out.println(refCon.getPreferredDescription().getText() + " of CID_STR Type with Status: " + member.getStatus());
			System.out.println("Is extended with CID: " + cidExtCon.getText() + " and String: " + strExt);
			System.out.println("\n");
		} 
	} 
}
 
开发者ID:IHTSDO,项目名称:example-OTF-code,代码行数:22,代码来源:RefsetPrinter.java

示例12: modifyExtensionAnnotatedRefset

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
private void modifyExtensionAnnotatedRefset(RefexChronicleBI<?> memberChron) throws ContradictionException, InvalidCAB, IOException {
	RefexVersionBI<?> mem = memberChron.getVersion(vc);
	RefexCAB bp = mem.makeBlueprint(vc,  IdDirective.PRESERVE, RefexDirective.INCLUDE);
	if (bp.getMemberUUID() == null) {
		bp.setMemberUuid(mem.getPrimordialUuid());
	}
	
	// Change String
	bp.put(ComponentProperty.STRING_EXTENSION_1, "Modified Testing String");

	
	// Change Description to Pref Term
	int parentRefsetPT = appDb.getRefsetIdentity().getVersion(vc).getPreferredDescription().getNid();
	bp.put(ComponentProperty.COMPONENT_EXTENSION_1_ID, parentRefsetPT);
	
	RefexChronicleBI<?> cabi = appDb.getBuilder().constructIfNotCurrent(bp);
	ConceptVersionBI refCon = appDb.getDB().getConcept(mem.getReferencedComponentNid()).getVersion(appDb.getVC());

	appDb.getDB().addUncommitted(refCon);
}
 
开发者ID:IHTSDO,项目名称:example-OTF-code,代码行数:21,代码来源:RefsetModify.java

示例13: modifyExtensionRefsetMember

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
private void modifyExtensionRefsetMember(RefexChronicleBI<?> memberChron) throws ContradictionException, InvalidCAB, IOException {
	RefexVersionBI<?> mem = memberChron.getVersion(vc);
	RefexCAB bp = mem.makeBlueprint(vc,  IdDirective.PRESERVE, RefexDirective.INCLUDE);
	if (bp.getMemberUUID() == null) {
		bp.setMemberUuid(mem.getPrimordialUuid());
	}
	
	// Change String
	bp.put(ComponentProperty.STRING_EXTENSION_1, "Modified Testing String");

	
	// Change Description to Pref Term
	int parentRefsetPT = appDb.getRefsetIdentity().getVersion(vc).getPreferredDescription().getNid();
	bp.put(ComponentProperty.COMPONENT_EXTENSION_1_ID, parentRefsetPT);
	
	RefexChronicleBI<?> cabi = appDb.getBuilder().constructIfNotCurrent(bp);
	ConceptVersionBI refCon = appDb.getDB().getConcept(mem.getAssemblageNid()).getVersion(appDb.getVC());

	appDb.getDB().addUncommitted(refCon);
}
 
开发者ID:IHTSDO,项目名称:example-OTF-code,代码行数:21,代码来源:RefsetModify.java

示例14: computePossibleComponents

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
@Override
public NativeIdSetBI computePossibleComponents(NativeIdSetBI incomingPossibleComponents) throws IOException, ValidationException, ContradictionException {
    if (this.viewCoordinateKey.equals(this.enclosingQuery.currentViewCoordinateKey)) {
        this.viewCoordinate = (ViewCoordinate) this.enclosingQuery.getVCLetDeclarations().get(viewCoordinateKey);
    } else {
        this.viewCoordinate = (ViewCoordinate) this.enclosingQuery.getLetDeclarations().get(viewCoordinateKey);
    }
    int refsetNid = this.refsetSpec.getNid();
    ConceptVersionBI conceptVersion = Ts.get().getConceptVersion(viewCoordinate, refsetNid);

    for (RefexVersionBI<?> rm : conceptVersion.getCurrentRefsetMembers(viewCoordinate)) {
        switch (rm.getRefexType()) {
            case CID_STR:
            case CID_CID_CID_STRING:
            case CID_CID_STR:
            case STR:
                RefexStringVersionBI rsv = (RefexStringVersionBI) rm;
                if (rsv.getString1().toLowerCase().contains(queryText.toLowerCase())) {
                    getResultsCache().add(refsetNid);
                }
            default:
            //do nothing

        }
    }

    return getResultsCache();
}
 
开发者ID:Apelon-VA,项目名称:OTF-Query-Services,代码行数:29,代码来源:RefsetContainsString.java

示例15: isUSLanguageRefex

import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入依赖的package包/类
/**
 * Indicates whether or not US language refex is the case.
 *
 * @param desc the desc
 * @return <code>true</code> if so, <code>false</code> otherwise
 * @throws Exception the exception
 */
private boolean isUSLanguageRefex(DescriptionVersionBI<?> desc)
  throws Exception {
  for (RefexVersionBI<?> annotation : desc.getAnnotationsActive(OTFUtility
      .getViewCoordinate())) {
    if (annotation.getAssemblageNid() == Snomed.US_LANGUAGE_REFEX.getNid()) {
      return true;
    }
  }
  return false;
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:18,代码来源:OWLExporter.java


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