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


Java ResolvedConceptReference.getCodingSchemeVersion方法代码示例

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


在下文中一共展示了ResolvedConceptReference.getCodingSchemeVersion方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
     }
 }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:33,代码来源:CacheController.java

示例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;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:17,代码来源:CartActionBean.java

示例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;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:16,代码来源:CartActionBean.java

示例4: addToCart

import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
/**
 * Add concept to the Cart
 * @return
 * @throws Exception
 */
public String addToCart() throws Exception {
    String code = null;
    String codingScheme = null;
    String nameSpace = null;
    String name = null;
    String url = null;
    String version = null;
    String semanticType = null;

    _messageflag = false;
    SearchCart search = new SearchCart();

    // Get concept information from the Entity item passed in
    HttpServletRequest request =
        (HttpServletRequest) FacesContext.getCurrentInstance()
            .getExternalContext().getRequest();

    // Get Entity object
    Entity curr_concept = (Entity) request.getSession().getAttribute(_entity);
    if (curr_concept == null) {
    	// Called from a non search area
    	_logger.error("*** Cart error: Entity object is null!");
    	return null;
    }
    code = curr_concept.getEntityCode(); // Store identifier

    // Get coding scheme
    codingScheme = (String)request.getSession().getAttribute(_codingScheme);

    // Get concept name space
    nameSpace = curr_concept.getEntityCodeNamespace();

    // Get concept name
    name = curr_concept.getEntityDescription().getContent();

    // Get scheme version
    ResolvedConceptReference ref = null;
    ref = search.getConceptByCode(codingScheme, code);
    version = ref.getCodingSchemeVersion();

    // Get concept URL
    String protocol = request.getScheme();
    String domain = request.getServerName();
    String port = Integer.toString(request.getServerPort());
    if (port.equals("80")) port = ""; else port = ":" + port;
    String path = request.getContextPath();
    url = protocol + "://" + domain
        + port + path
        + "/pages/concept_details.jsf?dictionary=" + codingScheme
        + "&version=" + version
        + "&code=" + code;

    // Get Semantic type
    semanticType = search.getSemanticType(curr_concept.getEntityCode());

    // Add concept to cart
    if (_cart == null) _init();
    Concept item = new Concept();
    item.setCode(code);
    item.setCodingScheme(codingScheme);
    item.setNameSpace(nameSpace);
    item.setName(name);
    item.setVersion(version);
    item.setUrl(url);
    item.setSemanticType(semanticType);

    if (!_cart.containsKey(code))
        _cart.put(code,item);

    return null;
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:77,代码来源:CartActionBean.java

示例5: 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;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:81,代码来源:SearchByAssociationIteratorDecorator.java

示例6: extract

import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; //导入方法依赖的package包/类
@Override
public String extract(ResolvedConceptReference ref) {
	return ref.getCodingSchemeVersion();
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:5,代码来源:MappingExtensionBulkDownloader.java

示例7: 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;
}
 
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:65,代码来源:SearchByAssociationIteratorDecorator.java


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