本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
}
示例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;
}