本文整理汇总了Java中org.ihtsdo.otf.tcc.api.refex.RefexVersionBI.getRefexType方法的典型用法代码示例。如果您正苦于以下问题:Java RefexVersionBI.getRefexType方法的具体用法?Java RefexVersionBI.getRefexType怎么用?Java RefexVersionBI.getRefexType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ihtsdo.otf.tcc.api.refex.RefexVersionBI
的用法示例。
在下文中一共展示了RefexVersionBI.getRefexType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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");
}
}
}
示例2: 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");
}
}
}
示例3: 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();
}
示例4: createRefsetTooltip
import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入方法依赖的package包/类
protected String createRefsetTooltip(RefexVersionBI<?> annot) throws IOException, ContradictionException {
String refset = OTFUtility.getConPrefTerm(annot.getAssemblageNid());
StringBuffer strBuf = new StringBuffer();
strBuf.append(refset + " is a ");
if (annot.getRefexType() == RefexType.MEMBER) {
strBuf.append("Member Annotation ");
} else {
if (annot.getRefexType() == RefexType.CID) {
strBuf.append("Component Annotation");
} else if (annot.getRefexType() == RefexType.STR) {
strBuf.append("String Annotation");
} else if (annot.getRefexType() == RefexType.LONG) {
strBuf.append("Long Annotation");
}
strBuf.append(" with extension content:\n");
if (annot.getRefexType() == RefexType.CID) {
int nidExt = ((RefexNidVersionBI<?>)annot).getNid1();
String compExt = OTFUtility.getConceptVersion(nidExt).getPreferredDescription().getText();
strBuf.append("Component #1: " + compExt);
} else if (annot.getRefexType() == RefexType.STR) {
String strExt = ((RefexStringVersionBI<?>)annot).getString1();
strBuf.append("String #1: " + strExt);
} else if (annot.getRefexType() == RefexType.LONG) {
String longExt = Long.toString(((RefexLongVersionBI<?>)annot).getLong1());
strBuf.append("String #1: " + longExt);
}
}
strBuf.append(getStampTooltip(annot));
return strBuf.toString();
}
示例5: handleComplexRefset
import org.ihtsdo.otf.tcc.api.refex.RefexVersionBI; //导入方法依赖的package包/类
private void handleComplexRefset(RefexVersionBI<?> member, RefexVersionBI<?> previousMember, ConceptVersionBI refCompCon) {
if (!rth_.isSetupFinished() && member.getRefexType() != RefexType.MEMBER) {
rth_.finishTableSetup(member, isAnnotation, refsetRows, refCompCon, member.getAssemblageNid());
refsetType = member.getRefexType();
}
// Have needed member, add to data
CEMCompositRefestInstance instance = (CEMCompositRefestInstance)RefsetInstanceAccessor.getInstance(refCompCon, member, previousMember, RefexType.UNKNOWN);
data.add(instance);
}
示例6: 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;
}
}
}