本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference.getCodingSchemeName方法的典型用法代码示例。如果您正苦于以下问题:Java ResolvedConceptReference.getCodingSchemeName方法的具体用法?Java ResolvedConceptReference.getCodingSchemeName怎么用?Java ResolvedConceptReference.getCodingSchemeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference
的用法示例。
在下文中一共展示了ResolvedConceptReference.getCodingSchemeName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: activeCacheTree
import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
public void activeCacheTree(ResolvedConceptReference ref) {
_logger.debug("Actively caching tree.");
String codingScheme = ref.getCodingSchemeName();
String codingSchemeVersion = ref.getCodingSchemeVersion();
String code = ref.getCode();
if (!CacheController.getInstance()
.containsKey(getTreeKey(codingScheme, code))) {
_logger.debug("Tree Not Found In Cache.");
TreeService treeService =
TreeServiceFactory.getInstance().getTreeService(
RemoteServerUtil.createLexBIGService());
//LexEvsTree tree = treeService.getTree(codingScheme, null, code);
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
if (codingSchemeVersion != null) {
versionOrTag.setVersion(codingSchemeVersion);
}
LexEvsTree tree = treeService.getTree(codingScheme, versionOrTag, code);
if (tree == null) return;
String json =
treeService.getJsonConverter().buildJsonPathFromRootTree(
tree.getCurrentFocus());
// _cache.put(new Element(getTreeKey(tree), json));
String treeKey = getTreeKey(tree, codingSchemeVersion);
//if (treeKey == null) return;
_cache.put(new Element(treeKey, json));
}
}
示例2: getParentConcepts
import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
/**
* Returns list of Parent Concepts
* @param ref
* @return
* @throws LBException
*/
public Vector<Entity> getParentConcepts(ResolvedConceptReference ref) throws Exception {
String scheme = ref.getCodingSchemeName();
String version = ref.getCodingSchemeVersion();
String code = ref.getCode();
Direction dir = getCodingSchemeDirection(ref);
Vector<String> assoNames = getAssociationNames(scheme, version);
Vector<Entity> superconcepts = getAssociatedConcepts(scheme, version,
code, assoNames, dir.test());
return superconcepts;
}
示例3: getChildConcepts
import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
/**
* Returns list of Child Concepts
* @param ref
* @return
*/
public Vector<Entity> getChildConcepts(ResolvedConceptReference ref) throws Exception {
String scheme = ref.getCodingSchemeName();
String version = ref.getCodingSchemeVersion();
String code = ref.getCode();
Direction dir = getCodingSchemeDirection(ref);
Vector<String> assoNames = getAssociationNames(scheme, version);
Vector<Entity> supconcepts = getAssociatedConcepts(scheme, version,
code, assoNames, !dir.test());
return supconcepts;
}
示例4: resolveOneHit
import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
protected List<? extends ResolvedConceptReference> resolveOneHit(ResolvedConceptReference hit) throws LBException{
List<ResolvedConceptReference> returnList = new ArrayList<ResolvedConceptReference>();
CodingSchemeVersionOrTag tagOrVersion = new CodingSchemeVersionOrTag();
if (hit.getCodingSchemeVersion() != null) tagOrVersion.setVersion(hit.getCodingSchemeVersion());
CodedNodeGraph cng = null;
if (lbSvc == null) {
return null;
}
cng = lbSvc.getNodeGraph(
hit.getCodingSchemeName(),
tagOrVersion,
null);
Boolean restrictToAnonymous = Boolean.FALSE;
cng = cng.restrictToAnonymous(restrictToAnonymous);
LocalNameList localNameList = new LocalNameList();
localNameList.addEntry("concept");
cng = cng.restrictToEntityTypes(localNameList);
if (_associationNameAndValueList != null) {
cng =
cng.restrictToAssociations(
_associationNameAndValueList,
_associationQualifierNameAndValueList);
}
else {
String scheme = hit.getCodingSchemeName();
SimpleDataUtils simpleDataUtils = new SimpleDataUtils(lbSvc);
boolean isMapping = simpleDataUtils.isMapping(scheme, null);
if (isMapping) {
NameAndValueList navl = simpleDataUtils.getMappingAssociationNames(scheme, null);
if (navl != null) {
cng = cng.restrictToAssociations(navl, null);
}
}
}
ConceptReference focus = new ConceptReference();
focus.setCode(hit.getCode());
focus.setCodingSchemeName(hit.getCodingSchemeName());
focus.setCodeNamespace(hit.getCodeNamespace());
LocalNameList propertyNames = new LocalNameList();
CodedNodeSet.PropertyType[] propertyTypes = null;
SortOptionList sortCriteria = null;
ResolvedConceptReferenceList list =
cng.resolveAsList(focus,
_resolveForward, _resolveBackward, 0,
_resolveAssociationDepth, propertyNames, propertyTypes, sortCriteria,
_maxToReturn);
for(ResolvedConceptReference ref : list.getResolvedConceptReference()){
if (ref.getSourceOf() != null && this.getAssociations(ref.getSourceOf()).size() > 0) {
returnList.addAll(this.getAssociations(ref.getSourceOf()));
}
//if(ref.getSourceOf() != null){
// returnList.addAll(this.getAssociations(ref.getSourceOf()));
//}
if (ref.getTargetOf() != null && this.getAssociations(ref.getTargetOf()).size() > 0) {
returnList.addAll(this.getAssociations(ref.getTargetOf()));
}
//if(ref.getTargetOf() != null){
//returnList.addAll(this.getAssociations(ref.getTargetOf()));
//}
}
return returnList;
}
示例5: extract
import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
@Override
public String extract(ResolvedConceptReference ref) {
return ref.getCodingSchemeName();
}
示例6: resolveOneHit
import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
protected List<? extends ResolvedConceptReference> resolveOneHit(ResolvedConceptReference hit) throws LBException{
List<ResolvedConceptReference> returnList = new ArrayList<ResolvedConceptReference>();
CodingSchemeVersionOrTag tagOrVersion = new CodingSchemeVersionOrTag();
if (hit.getCodingSchemeVersion() != null) tagOrVersion.setVersion(hit.getCodingSchemeVersion());
CodedNodeGraph cng = null;
cng = lbs.getNodeGraph(
hit.getCodingSchemeName(),
tagOrVersion,
null);
Boolean restrictToAnonymous = Boolean.FALSE;
cng = cng.restrictToAnonymous(restrictToAnonymous);
LocalNameList localNameList = new LocalNameList();
localNameList.addEntry("concept");
cng = cng.restrictToEntityTypes(localNameList);
if (_associationNameAndValueList != null) {
cng =
cng.restrictToAssociations(
_associationNameAndValueList,
_associationQualifierNameAndValueList);
}
else {
String scheme = hit.getCodingSchemeName();
boolean isMapping = DataUtils.isMapping(scheme, null);
if (isMapping) {
NameAndValueList navl = DataUtils.getMappingAssociationNames(scheme, null);
if (navl != null) {
cng = cng.restrictToAssociations(navl, null);
}
}
}
ConceptReference focus = new ConceptReference();
focus.setCode(hit.getCode());
focus.setCodingSchemeName(hit.getCodingSchemeName());
focus.setCodeNamespace(hit.getCodeNamespace());
LocalNameList propertyNames = new LocalNameList();
CodedNodeSet.PropertyType[] propertyTypes = null;
SortOptionList sortCriteria = null;
ResolvedConceptReferenceList list =
cng.resolveAsList(focus,
_resolveForward, _resolveBackward, 0,
_resolveAssociationDepth, propertyNames, propertyTypes, sortCriteria,
_maxToReturn);
for(ResolvedConceptReference ref : list.getResolvedConceptReference()){
if(ref.getSourceOf() != null){
returnList.addAll(this.getAssociations(ref.getSourceOf()));
}
if(ref.getTargetOf() != null){
returnList.addAll(this.getAssociations(ref.getTargetOf()));
}
}
return returnList;
}