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


Java CodingSchemeVersionOrTag.setVersion方法代码示例

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


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

示例1: getDistinctNamespacesOfCode

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public List<String> getDistinctNamespacesOfCode(
           String codingScheme,
           String version,
           String code) {

       try {
           CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
           csvt.setVersion(version);

           List<String> list = lbscm.getDistinctNamespacesOfCode(codingScheme, csvt, code);
           return list;
	} catch (Exception ex) {
		ex.printStackTrace();
	}
       return null;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:17,代码来源:TestConceptDetails.java

示例2: getSourceListData

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public Vector<String> getSourceListData(String codingSchemeName, String version) {
    CodingSchemeVersionOrTag vt = new CodingSchemeVersionOrTag();
    if (version != null) {
        vt.setVersion(version);
    }
    CodingScheme scheme = null;
    try {
        scheme = lbSvc.resolveCodingScheme(codingSchemeName, vt);
        if (scheme == null)
            return null;
        Vector<String> sourceListData = new Vector<String>();
        SupportedSource[] sources =
            scheme.getMappings().getSupportedSource();
        for (int i = 0; i < sources.length; i++) {
            SupportedSource source = sources[i];
            sourceListData.add(source.getLocalId());
        }

        return sourceListData;
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return null;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:25,代码来源:CodingSchemeDataUtils.java

示例3: getRepresentationalFormListData

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public Vector<String> getRepresentationalFormListData(
    String codingSchemeName, String version) {
    CodingSchemeVersionOrTag vt = new CodingSchemeVersionOrTag();
    if (version != null) {
        vt.setVersion(version);
    }
    CodingScheme scheme = null;
    try {
        scheme = lbSvc.resolveCodingScheme(codingSchemeName, vt);
        if (scheme == null)
            return null;
        Vector<String> propertyNameListData = new Vector<String>();
        SupportedRepresentationalForm[] forms =
            scheme.getMappings().getSupportedRepresentationalForm();
        if (forms != null) {
            for (int i = 0; i < forms.length; i++) {
                SupportedRepresentationalForm form = forms[i];
                propertyNameListData.add(form.getLocalId());
            }
        }
        return propertyNameListData;
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return null;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:27,代码来源:CodingSchemeDataUtils.java

示例4: getConceptByCode

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
/**
  * Get concept Entity by code
  * @param codingScheme
  * @param code
  * @return
  */
 public ResolvedConceptReference getConceptByCode(String codingScheme, String version,
 		String code) {
     CodedNodeSet cns = null;
     ResolvedConceptReferencesIterator iterator = null;

     try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
         CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
         if (version != null) csvt.setVersion(version);

         cns = lbSvc.getCodingSchemeConcepts(codingScheme, csvt);
         ConceptReferenceList crefs =
             createConceptReferenceList(new String[] { code }, codingScheme);
         cns.restrictToCodes(crefs);
         iterator = cns.resolve(null, null, null);
         if (iterator.numberRemaining() > 0) {
             ResolvedConceptReference ref = (ResolvedConceptReference) iterator.next();
             return ref;
         }
     } catch (LBException e) {
         _logger.info("Error: " + e.getMessage());
     }

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

示例5: run

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public void run(int maxDepth, String sab)throws LBException{
	CodingSchemeSummary css = Util.promptForCodeSystem();
	long ms = System.currentTimeMillis();
	try {
		if (css != null) {
			//LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
			EVSApplicationService lbSvc = RemoteServerUtil2.createLexBIGService();

			String scheme = css.getCodingSchemeURN();
			CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
			csvt.setVersion(css.getRepresentsVersion());
			print(maxDepth, sab, lbSvc, scheme, csvt);
		}
	} finally {
		System.out.println("Run time (ms): " + (System.currentTimeMillis() - ms));
	}
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:18,代码来源:ListHierarchyMetaBySource.java

示例6: getNCImCodes

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public Vector getNCImCodes(String scheme, String version, String code) {
      Vector w = new Vector();
      CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
      if (version != null) {
	csvt.setVersion(version);
}
try {
	ConceptReferenceList crefs = ConvenienceMethods.createConceptReferenceList(new String[] { code }, scheme);
	CodedNodeSet cns = lbSvc.getCodingSchemeConcepts(scheme, csvt);

	if (cns == null) {
		return null;
	}
	cns = cns.restrictToStatus(ActiveOption.ALL, null);
	cns = cns.restrictToCodes(crefs);
	ResolvedConceptReferenceList matches = cns.resolveToList(null, null, null, 1);
	if (matches.getResolvedConceptReferenceCount() > 0) {
		ResolvedConceptReference ref = (ResolvedConceptReference) matches.enumerateResolvedConceptReference()
				.nextElement();
		Entity node = ref.getEntity();
		return getNCImCodes(node);
	}

} catch (Exception ex) {
	ex.printStackTrace();
}
return w;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:29,代码来源:ConceptDetails.java

示例7: getPropertyValues

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public HashMap getPropertyValues(String scheme, String version, String propertyType, String propertyName) {
	HashMap hmap = new HashMap();
	CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
	if (version != null) versionOrTag.setVersion(version);
	try {
		CodedNodeSet cns = getNodeSet(scheme, versionOrTag);
		SortOptionList sortOptions = null;
		LocalNameList filterOptions = null;
		LocalNameList propertyNames = Constructors.createLocalNameList(propertyName);
		CodedNodeSet.PropertyType[] propertyTypes = null;
		boolean resolveObjects = true;

		ResolvedConceptReferencesIterator iterator = cns.resolve(sortOptions, filterOptions, propertyNames,
			propertyTypes, resolveObjects);
		while (iterator != null && iterator.hasNext()) {
			ResolvedConceptReference rcr = iterator.next();
			Entity concept = rcr.getEntity();
   			Vector v = getPropertyValues(concept, propertyType, propertyName);
   			if (v != null) {
				if (v.size() > 0) {
					String key = concept.getEntityCode();
					String value = (String) v.elementAt(0);
					hmap.put(key, value);
				}
			}
		}
	} catch (Exception ex) {
		ex.printStackTrace();
	}
	return hmap;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:32,代码来源:ConceptDetails.java

示例8: getAssociationSources

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public Vector getAssociationSources(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 {
		//EVSApplicationService lbSvc = new RemoteServerUtil().createLexBIGService();
		LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
		CodedNodeGraph cng = lbSvc.getNodeGraph(scheme, csvt, null);
		NameAndValueList nameAndValueList =
			createNameAndValueList(
				new String[] {assocName}, null);

		NameAndValueList nameAndValueList_qualifier = null;
		cng = cng.restrictToAssociations(nameAndValueList, nameAndValueList_qualifier);
           ConceptReference graphFocus = ConvenienceMethods.createConceptReference(code, scheme);

           boolean resolveForward = false;
           boolean resolveBackward = true;

           int resolveAssociationDepth = 1;
           int maxToReturn = 1000;

        ResolvedConceptReferencesIterator iterator = codedNodeGraph2CodedNodeSetIterator(
						cng,
						graphFocus,
						resolveForward,
						resolveBackward,
						resolveAssociationDepth,
						maxToReturn);

		v = resolveIterator(iterator, maxToReturn, code);
	} catch (Exception ex) {
		ex.printStackTrace();
	}
	return v;
   }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:39,代码来源:SearchUtils.java

示例9: getCodingScheme

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public CodingScheme getCodingScheme(String codingScheme, String version) throws LBException {
       CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
       if (version != null) {
		versionOrTag.setVersion(version);
	}
	return getCodingScheme(codingScheme, versionOrTag);
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:8,代码来源:CodingSchemeDataUtils.java

示例10: search_tree

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public String search_tree(String node_id,
        String ontology_display_name, String ontology_version, String namespace) throws Exception {

        if (node_id == null || ontology_display_name == null)
            return null;

        Utils.StopWatch stopWatch = new Utils.StopWatch();
//        String max_tree_level_str =
//            NCItBrowserProperties.getProperty(
//                NCItBrowserProperties.MAXIMUM_TREE_LEVEL);
//        int maxLevel = Integer.parseInt(max_tree_level_str);
        CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
        if (ontology_version != null) {
			versionOrTag.setVersion(ontology_version);
		}

/*
        String jsonString =
            CacheController.getTree(
                ontology_display_name, versionOrTag, node_id, namespace);
*/
        LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
        String jsonString = new ViewInHierarchyUtils(lbSvc).getTree(ontology_display_name, ontology_version, node_id, namespace);

        debugJSONString("Section: search_tree", jsonString);

        _logger.debug("search_tree: " + stopWatch.getResult());
        return jsonString;
    }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:30,代码来源:AjaxServlet.java

示例11: resolveCodingScheme

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public CodingScheme resolveCodingScheme(String codingScheme, String version) {
CodingScheme cs = null;
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
if (version != null) {
	versionOrTag.setVersion(version);
}
      try {
	cs = lbSvc.resolveCodingScheme(codingScheme, versionOrTag);
} catch (Exception ex) {
	ex.printStackTrace();
}
return cs;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:14,代码来源:CodingSchemeDataUtils.java

示例12: getMappingAssociationNames

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public NameAndValueList getMappingAssociationNames(String scheme, String version) {
      CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
      if (version != null)
          csvt.setVersion(version);

NameAndValueList navList = new NameAndValueList();
try {
	//LexBIGService lbSvc = null;
	//lbSvc = new RemoteServerUtil().createLexBIGService();
	CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
	Relations[] relations = cs.getRelations();
	for (int i = 0; i < relations.length; i++) {
		Relations relation = relations[i];
              Boolean isMapping = relation.isIsMapping();
              if (isMapping != null && isMapping.equals(Boolean.TRUE)) {
			AssociationPredicate[] associationPredicates = relation.getAssociationPredicate();
			for (int j=0; j<associationPredicates.length; j++) {
				AssociationPredicate associationPredicate = associationPredicates[j];
				String name = associationPredicate.getAssociationName();
				NameAndValue vNameAndValue = new NameAndValue();
				vNameAndValue.setName(name);
				navList.addNameAndValue(vNameAndValue);
			}
			return navList;
		} else {
			return null;
		}
	}
} catch (Exception ex) {
          ex.printStackTrace();
      }
      return null;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:34,代码来源:SimpleDataUtils.java

示例13: getDistinctNamespacesOfCode

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public List<String> getDistinctNamespacesOfCode(
           String codingScheme,
           String version,
           String code) {

       try {
           CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
           csvt.setVersion(version);
           List<String> list = lbscm.getDistinctNamespacesOfCode(codingScheme, csvt, code);
           return list;
	} catch (Exception ex) {
		ex.printStackTrace();
	}
       return null;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:16,代码来源:EntityExporter.java

示例14: exportEntity

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的package包/类
public void exportEntity(PrintWriter pw, String scheme, String version, String code) throws LBException {
      try {
	if (version == null) {
		version = getVocabularyVersionByTag(scheme, "PRODUCTION");
		System.out.println("version: " + version);
	}
	CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
	if (version != null) csvt.setVersion(version);
	printProps(pw, scheme, csvt, code);
	printFrom(pw,  scheme, csvt, code);
	printTo(pw, scheme, csvt, code);
   } catch (Exception ex) {
	ex.printStackTrace();
}
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:16,代码来源:EntityExporter.java

示例15: resolveOneHit

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag; //导入方法依赖的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


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