本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList.enumerateResolvedConceptReference方法的典型用法代码示例。如果您正苦于以下问题:Java ResolvedConceptReferenceList.enumerateResolvedConceptReference方法的具体用法?Java ResolvedConceptReferenceList.enumerateResolvedConceptReference怎么用?Java ResolvedConceptReferenceList.enumerateResolvedConceptReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList
的用法示例。
在下文中一共展示了ResolvedConceptReferenceList.enumerateResolvedConceptReference方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printFrom
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
* Display relations to the given code from other concepts.
*
* @param code
* @param lbSvc
* @param scheme
* @param csvt
* @throws LBException
*/
@SuppressWarnings("unchecked")
protected void printFrom(PrintWriter pw, String scheme, CodingSchemeVersionOrTag csvt, String code)
throws LBException {
pw.println("Pointed at by ...");
// Perform the query ...
ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme), false, true, 1, 1, new LocalNameList(), null,
null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = refEnum.nextElement();
AssociationList targetof = ref.getTargetOf();
if (targetof != null) {
Association[] associations = targetof.getAssociation();
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
pw.println("\t" + assoc.getAssociationName());
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
EntityDescription ed = ac.getEntityDescription();
pw.println("\t\t" + ac.getConceptCode() + "/"
+ (ed == null ? "**No Description**" : ed.getContent()) + " --> (" + rela + ") --> " + code);
}
}
}
}
}
}
示例2: printTo
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
* Display relations from the given code to other concepts.
*
* @param code
* @param lbSvc
* @param scheme
* @param csvt
* @throws LBException
*/
@SuppressWarnings("unchecked")
protected void printTo(PrintWriter pw, String scheme, CodingSchemeVersionOrTag csvt, String code)
throws LBException {
pw.println("Points to ...");
// Perform the query ...
ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme), true, false, 1, 1, new LocalNameList(), null,
null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = refEnum.nextElement();
AssociationList sourceof = ref.getSourceOf();
Association[] associations = sourceof.getAssociation();
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
pw.println("\t" + assoc.getAssociationName());
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
EntityDescription ed = ac.getEntityDescription();
pw.println("\t\t" + code + " --> (" + rela + ") --> " + ac.getConceptCode() + "/"
+ (ed == null ? "**No Description**" : ed.getContent()));
}
}
}
}
}
示例3: run
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的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!");
}
}
}
示例4: printFrom
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
* Display relations to the given code from other concepts.
*
* @param code
* @param lbSvc
* @param scheme
* @param csvt
* @throws LBException
*/
@SuppressWarnings("unchecked")
protected void printFrom(PrintWriter pw, String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
throws LBException {
displayMessage(pw, "\n\tPointed at by ...");
// Perform the query ...
ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme), false, true, 1, 1, new LocalNameList(), null,
null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = refEnum.nextElement();
AssociationList targetof = ref.getTargetOf();
if (targetof != null) {
if (targetof != null) {
Association[] associations = targetof.getAssociation();
if (associations != null && associations.length > 0) {
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
//displayMessage(pw, "\t" + assoc.getAssociationName());
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
EntityDescription ed = ac.getEntityDescription();
displayMessage(pw, "\t\t" + ac.getConceptCode() + "/"
+ (ed == null ? "**No Description**" : ed.getContent()) + " --> (" + rela + ") --> " + code);
if (ac.getAssociationQualifiers() != null && ac.getAssociationQualifiers().getNameAndValue() != null) {
for(NameAndValue nv: ac.getAssociationQualifiers().getNameAndValue()){
displayMessage(pw, "\t\t\tAssoc Qualifier - " + nv.getName() + ": " + nv.getContent());
displayMessage(pw, "\n");
}
}
}
}
}
}
}
}
}
}
示例5: printTo
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
* Display relations from the given code to other concepts.
*
* @param code
* @param lbSvc
* @param scheme
* @param csvt
* @throws LBException
*/
@SuppressWarnings("unchecked")
protected void printTo(PrintWriter pw, String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
throws LBException {
displayMessage(pw, "\n\tPoints to ...");
// Perform the query ...
ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme), true, false, 1, 1, new LocalNameList(), null,
null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = refEnum.nextElement();
AssociationList sourceof = ref.getSourceOf();
if (sourceof != null) {
Association[] associations = sourceof.getAssociation();
if (associations != null && associations.length > 0) {
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
//displayMessage(pw, "\t" + assoc.getAssociationName());
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
EntityDescription ed = ac.getEntityDescription();
displayMessage(pw, "\t\t" + code + " --> (" + rela + ") --> " + ac.getConceptCode() + "/"
+ (ed == null ? "**No Description**" : ed.getContent()));
if (ac.getAssociationQualifiers() != null && ac.getAssociationQualifiers().getNameAndValue() != null) {
for(NameAndValue nv: ac.getAssociationQualifiers().getNameAndValue()){
displayMessage(pw, "\t\t\tAssoc Qualifier - " + nv.getName() + ": " + nv.getContent());
displayMessage(pw, "\n");
}
}
}
}
}
}
}
}
}
示例6: getAssociationSourceCodes
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
public Vector getAssociationSourceCodes(String scheme, String version,
String code, String assocName) {
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null)
csvt.setVersion(version);
ResolvedConceptReferenceList matches = null;
Vector v = new Vector();
try {
CodedNodeGraph cng = lbSvc.getNodeGraph(scheme, csvt, null);
Boolean restrictToAnonymous = Boolean.FALSE;
cng = cng.restrictToAnonymous(restrictToAnonymous);
NameAndValueList nameAndValueList =
createNameAndValueList(new String[] { assocName }, null);
NameAndValueList nameAndValueList_qualifier = null;
cng =
cng.restrictToAssociations(nameAndValueList,
nameAndValueList_qualifier);
matches =
cng.resolveAsList(ConvenienceMethods.createConceptReference(
code, scheme), false, true, 1, 1, new LocalNameList(),
null, null, _maxReturn);
if (matches.getResolvedConceptReferenceCount() > 0) {
java.util.Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = (ResolvedConceptReference) refEnum.nextElement();
AssociationList targetof = ref.getTargetOf();
Association[] associations = targetof.getAssociation();
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
AssociatedConcept[] acl =
assoc.getAssociatedConcepts()
.getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
v.add(ac.getReferencedEntry().getEntityCode());
}
}
}
SortUtils.quickSort(v);
}
} catch (Exception ex) {
ex.printStackTrace();
}
return v;
}
示例7: printFrom
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
* Display relations to the given code from other concepts.
* @param code
* @param lbSvc
* @param scheme
* @param csvt
* @throws LBException
*/
@SuppressWarnings("unchecked")
//protected void printFrom(String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
protected void printFrom(String code, EVSApplicationService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
throws LBException
{
Util.displayMessage("Pointed at by ...");
// Perform the query ...
/*
ResolvedConceptReferenceList matches =
lbSvc.getNodeGraph(scheme, csvt, null)
.resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme),
false, true, 1, 1, new LocalNameList(), null, null, 1024);
*/
CodedNodeGraph cng = lbSvc.getNodeGraph(scheme, csvt, null);
ResolvedConceptReferenceList matches =
cng.resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme),
false, true, 1, 1, new LocalNameList(), null, null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
Enumeration<ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = refEnum.nextElement();
AssociationList targetof = ref.getTargetOf();
Association[] associations = targetof.getAssociation();
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
Util.displayMessage("\t" + assoc.getAssociationName());
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
EntityDescription ed = ac.getEntityDescription();
Util.displayMessage(
"\t\t" + ac.getConceptCode() + "/"
+ (ed == null?
"**No Description**":ed.getContent()));
}
}
}
}
}
示例8: printTo
import org.LexGrid.LexBIG.DataModel.Collections.ResolvedConceptReferenceList; //导入方法依赖的package包/类
/**
* Display relations from the given code to other concepts.
* @param code
* @param lbSvc
* @param scheme
* @param csvt
* @throws LBException
*/
@SuppressWarnings("unchecked")
//protected void printTo(String code, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
protected void printTo(String code, EVSApplicationService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
throws LBException {
Util.displayMessage("Points to ...");
// Perform the query ...
/*
ResolvedConceptReferenceList matches =
lbSvc.getNodeGraph(scheme, csvt, null)
.resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme),
true, false, 1, 1, new LocalNameList(), null, null, 1024);
*/
CodedNodeGraph cng = lbSvc.getNodeGraph(scheme, csvt, null);
ResolvedConceptReferenceList matches =
cng.resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme),
true, false, 1, 1, new LocalNameList(), null, null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
Enumeration<ResolvedConceptReference> refEnum =
matches .enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = refEnum.nextElement();
AssociationList sourceof = ref.getSourceOf();
Association[] associations = sourceof.getAssociation();
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
Util.displayMessage("\t" + assoc.getAssociationName());
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
EntityDescription ed = ac.getEntityDescription();
Util.displayMessage(
"\t\t" + ac.getConceptCode() + "/"
+ (ed == null?
"**No Description**":ed.getContent()));
}
}
}
}
}