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


Java LexBIGService.resolveCodingScheme方法代码示例

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


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

示例1: getListOfCodingSchemeVersionsUsedInResolution

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static AbsoluteCodingSchemeVersionReferenceList getListOfCodingSchemeVersionsUsedInResolution(String codingScheme, CodingSchemeVersionOrTag vt) {
       try {
           LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
           if (lbSvc == null) {
               _logger
                   .warn("WARNING: Unable to connect to instantiate LexBIGService ???");
               return null;
           }
           CodingScheme scheme = lbSvc.resolveCodingScheme(codingScheme, vt);

           //System.out.println("(*) getListOfCodingSchemeVersionsUsedInResolution " + scheme.getFormalName());

           LexEVSResolvedValueSetService service = new LexEVSResolvedValueSetServiceImpl(lbSvc);
           if (service != null) {
			AbsoluteCodingSchemeVersionReferenceList acsvr = service.getListOfCodingSchemeVersionsUsedInResolution(scheme);
			return acsvr;
	    }

	} catch (Exception ex) {
		ex.printStackTrace();
		//System.out.println("getListOfCodingSchemeVersionsUsedInResolution throws exception " + codingScheme);
	}
	return null;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:25,代码来源:DataUtils.java

示例2: getCodingScheme

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static CodingScheme getCodingScheme(String codingScheme,
     CodingSchemeVersionOrTag versionOrTag) throws LBException {

     CodingScheme cs = null;
     try {
         LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
         cs = lbSvc.resolveCodingScheme(codingScheme, versionOrTag);
     } catch (Exception ex) {
         //ex.printStackTrace();
         if (versionOrTag.getVersion() != null) {
         	System.out.println("Unable to resolve coding scheme: " + codingScheme + " version: " + versionOrTag.getVersion());
} else {
         	System.out.println("Unable to resolve coding scheme: " + codingScheme);
}
     }
     return cs;
 }
 
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:18,代码来源:DataUtils.java

示例3: getCodingScheme

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
/**
 * @param codingScheme
 * @param version
 * @return
 */
@SuppressWarnings("unused")
private static CodingScheme getCodingScheme(String codingScheme,
        String version) {
    CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
    if (version != null)
        versionOrTag.setVersion(version);
    CodingScheme cs = null;
    LexBIGService lbSvc =null;
    try {
        lbSvc = RemoteServerUtil.createLexBIGService();
        cs = lbSvc.resolveCodingScheme(codingScheme, versionOrTag);
    } catch (Exception e) {
        _logger.error(e.getStackTrace());
        return null;
    }
    return cs;
}
 
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:23,代码来源:ValueSetSearchUtil.java

示例4: getSupportedHierarchy

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
/**
 * Returns a description of the hierarchy defined by the given coding
 * scheme and matching the specified ID.
 */
protected static SupportedHierarchy getSupportedHierarchy(LexBIGService lbsvc, String scheme,
        CodingSchemeVersionOrTag csvt, String hierarchyID) throws LBException {

    CodingScheme cs = lbsvc.resolveCodingScheme(scheme, csvt);
    if (cs == null) {
        throw new LBResourceUnavailableException("Coding scheme not found: " + scheme);
    }
    for (SupportedHierarchy h : cs.getMappings().getSupportedHierarchy())
        if (h.getLocalId().equals(hierarchyID))
            return h;
    throw new LBResourceUnavailableException("Hierarchy not defined: " + hierarchyID);
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:17,代码来源:BuildTreeForCode.java

示例5: getMappingAssociationNames

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static 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];
		System.out.println(relation.getContainerName());
              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);


				System.out.println("getMappingAssociationNames " + name);
			}
			return navList;
		} else {
			return null;
		}
	}
} catch (Exception ex) {
          ex.printStackTrace();
      }
      return null;
  }
 
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:38,代码来源:DataUtils.java

示例6: getPropertyNameListData

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static Vector<String> getPropertyNameListData(
    String codingSchemeName, String version) {
    CodingSchemeVersionOrTag vt = new CodingSchemeVersionOrTag();
    if (version != null) {
        vt.setVersion(version);
    }
    CodingScheme scheme = null;
    try {
        // RemoteServerUtil rsu = new RemoteServerUtil();
        // EVSApplicationService lbSvc = rsu.createLexBIGService();
        LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();

        scheme = lbSvc.resolveCodingScheme(codingSchemeName, vt);
        if (scheme == null)
            return null;
        Vector<String> propertyNameListData = new Vector<String>();
        SupportedProperty[] properties =
            scheme.getMappings().getSupportedProperty();
        for (int i = 0; i < properties.length; i++) {
            SupportedProperty property = properties[i];
            propertyNameListData.add(property.getLocalId());
        }
        return propertyNameListData;
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return null;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:29,代码来源:DataUtils.java

示例7: getRepresentationalFormListData

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static Vector<String> getRepresentationalFormListData(
    String codingSchemeName, String version) {
    CodingSchemeVersionOrTag vt = new CodingSchemeVersionOrTag();
    if (version != null) {
        vt.setVersion(version);
    }
    CodingScheme scheme = null;
    try {
        // RemoteServerUtil rsu = new RemoteServerUtil();
        // EVSApplicationService lbSvc = rsu.createLexBIGService();
        LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
        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,代码行数:30,代码来源:DataUtils.java

示例8: getSupportedRoleNames

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

    List list = new ArrayList();
    try {
        CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
        Relations[] relations = cs.getRelations();
        for (int i = 0; i < relations.length; i++) {
            Relations relation = relations[i];

            _logger.debug("** getSupportedRoleNames containerName: "
                + relation.getContainerName());

            if (relation.getContainerName().compareToIgnoreCase("roles") == 0
                || relation.getContainerName().compareToIgnoreCase(
                    "relations") == 0) {
                //org.LexGrid.relations.Association[] asso_array =
                org.LexGrid.relations.AssociationPredicate[] asso_array =
                    relation.getAssociationPredicate();
                for (int j = 0; j < asso_array.length; j++) {
                    org.LexGrid.relations.AssociationPredicate association =
                        (org.LexGrid.relations.AssociationPredicate) asso_array[j];
                    // list.add(association.getAssociationName());
                    // KLO, 092209
                    //list.add(association.getForwardName());
                    list.add(association.getAssociationName());
                }
            }
        }
    } catch (Exception ex) {

    }
    return list;
}
 
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:38,代码来源:DataUtils.java

示例9: getHierarchyAssociationId

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public Vector getHierarchyAssociationId(String scheme, String version) {

        Vector association_vec = new Vector();
        try {
            // EVSApplicationService lbSvc = new
            // RemoteServerUtil().createLexBIGService();
            LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();

            // Will handle secured ontologies later.
            CodingSchemeVersionOrTag versionOrTag =
                new CodingSchemeVersionOrTag();
            versionOrTag.setVersion(version);
            CodingScheme cs = lbSvc.resolveCodingScheme(scheme, versionOrTag);
            Mappings mappings = cs.getMappings();
            SupportedHierarchy[] hierarchies = mappings.getSupportedHierarchy();
            java.lang.String[] ids = hierarchies[0].getAssociationNames();

            for (int i = 0; i < ids.length; i++) {
                if (!association_vec.contains(ids[i])) {
                    association_vec.add(ids[i]);
                }
            }

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

示例10: getCodingScheme

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static CodingScheme getCodingScheme(String codingScheme,
    CodingSchemeVersionOrTag versionOrTag) throws LBException {

    CodingScheme cs = null;
    try {
        LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
        cs = lbSvc.resolveCodingScheme(codingScheme, versionOrTag);
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return cs;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:13,代码来源:DataUtils.java

示例11: getSupportedAssociationNames

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static Vector<String> getSupportedAssociationNames(
    String codingSchemeName, String version) {
    CodingSchemeVersionOrTag vt = new CodingSchemeVersionOrTag();
    if (version != null) {
        vt.setVersion(version);
    }

    CodingScheme scheme = null;
    try {
        // RemoteServerUtil rsu = new RemoteServerUtil();
        // EVSApplicationService lbSvc = rsu.createLexBIGService();
        LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
        scheme = lbSvc.resolveCodingScheme(codingSchemeName, vt);
        if (scheme == null) {
            _logger.warn("scheme is NULL");
            return null;
        }

        Vector<String> v = new Vector<String>();
        SupportedAssociation[] assos =
            scheme.getMappings().getSupportedAssociation();
        for (int i = 0; i < assos.length; i++) {
            SupportedAssociation sa = (SupportedAssociation) assos[i];
            v.add(sa.getLocalId());
        }
        return v;
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return null;
}
 
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:32,代码来源:DataUtils.java

示例12: getCodingSchemeDirection

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
/**
 * Determine direction of Coding Scheme
 *
 * @param ref
 * @return
 * @throws LBException
 */
public Direction getCodingSchemeDirection(ResolvedConceptReference ref)
    throws Exception {

	Direction direction = Direction.FORWARD;

	// Create a version object
    CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
    versionOrTag.setVersion(ref.getCodingSchemeVersion());

    // Get Coding Scheme
    LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();

	CodingScheme cs = lbSvc.resolveCodingScheme(ref.getCodingSchemeName(), versionOrTag);
	if (cs == null) {
		throw new Exception("getTreeDirection(): CodingScheme is null!");
	}

	// Get hierarchy
    SupportedHierarchy[] hierarchies = cs.getMappings().getSupportedHierarchy();
    if (hierarchies == null || hierarchies.length < 1) {
    	throw new Exception("getTreeDirection(): hierarchies is null!");
    }

    if (hierarchies[0].isIsForwardNavigable())
    	direction = Direction.REVERSE;
    else
    	direction = Direction.FORWARD;

    _logger.debug("getTreeDirection() = " + direction);

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

示例13: profileAssociations

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
/**
 * @param lbs - service context
 * @param lbscm - convenience methods
 * @param csVorT - coding scheme version or tag (version in this case)
 * @throws LBException
 */
protected void profileAssociations(LexBIGService lbs, LexBIGServiceConvenienceMethods lbscm, String schemeName, CodingSchemeVersionOrTag csVorT) throws LBException {
    // Init frequency for supported properties and qualifiers.  This way
    // we will know if property or qualifier was registered but not used.
    CodingScheme scheme = lbs.resolveCodingScheme(schemeName, csVorT);
    Set<String> assocNames = new TreeSet<String>();
    for (SupportedAssociation supported : scheme.getMappings().getSupportedAssociation()) {
        assocNames.add(supported.getLocalId());
        assoc2srcFreq.put(supported.getLocalId(), 0);
        assoc2tgtFreq.put(supported.getLocalId(), 0);
    }

    // For each association, determine frequencies ...
    int count = 0;
    try {
        // Resolve and evaluate all source to target relationships.
        // Since this step can be extensive provide periodic feedback to the user
        // to indicate the process is still active ...
        CodedNodeSet allCodes = lbs.getCodingSchemeConcepts(schemeName, csVorT);
        LocalNameList noProps = Constructors.createLocalNameList("--no-property--");
        ResolvedConceptReferencesIterator potentialSources =
            allCodes.resolve(null, noProps, null);
        
        // Brute force approach to evaluate each possible source, concept by concept.
        // Time intensive, but scales better and helps avoid possible bottlenecks related
        // to exceeding system-defined search limits.
        while (potentialSources.hasNext()) {
            ResolvedConceptReference potentialSource = potentialSources.next();
            CodedNodeGraph cng = lbs.getNodeGraph(schemeName, csVorT, null);
            ResolvedConceptReferenceList rcrList =
                cng.resolveAsList(potentialSource, true, false, -1, 1, noProps, null, null, null, -1);
            for (ResolvedConceptReference rcr : rcrList.getResolvedConceptReference()) {
                AssociationList assocList = rcr.getSourceOf();
                for (Association assoc : assocList.getAssociation()) {
                    // Bump source count ...
                    String assocName = assoc.getAssociationName();
                    Integer freq = assoc2srcFreq.get(assocName);
                    assoc2srcFreq.put(assocName, (freq == null ? 1 : freq + 1));
                    
                    // Bump target count ...
                    freq = assoc2tgtFreq.get(assocName);
                    int targetCount = assoc.getAssociatedConcepts().getAssociatedConceptCount();
                    assoc2tgtFreq.put(assocName, (freq == null ? targetCount : freq + targetCount));
                }
                if (count++ % 100 == 0) System.out.print('.');
                if (count % 7800 == 0) System.out.println();
            }
        }
    } catch (Exception e) {
        Util.displayMessage(e.getMessage());
    }
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:58,代码来源:ProfileScheme.java

示例14: getMappingDataIterator

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static ResolvedConceptReferencesIterator getMappingDataIterator(String scheme, String version, List<MappingSortOption> sortOptionList) {
	CodingSchemeVersionOrTag versionOrTag =
		new CodingSchemeVersionOrTag();
	if (version != null) {
		versionOrTag.setVersion(version);
	}
	String relationsContainerName = null;

       LexBIGService distributed = RemoteServerUtil.createLexBIGService();
       try {
		CodingScheme cs = distributed.resolveCodingScheme(scheme, versionOrTag);
		if (cs == null) return null;

		java.util.Enumeration<? extends Relations> relations = cs.enumerateRelations();
		while (relations.hasMoreElements()) {
			Relations relation = (Relations) relations.nextElement();
			Boolean isMapping = relation.getIsMapping();
			if (isMapping != null && isMapping.equals(Boolean.TRUE)) {
					relationsContainerName = relation.getContainerName();
				break;
			}
		}
		if (relationsContainerName == null) {
			return null;
		}

		MappingExtension mappingExtension = (MappingExtension)
			distributed.getGenericExtension("MappingExtension");

		ResolvedConceptReferencesIterator itr = mappingExtension.resolveMapping(
				scheme, //"NCIt_to_ICD9CM_Mapping",
				versionOrTag,
				relationsContainerName,//"NCIt_to_ICD9CM_Mappings",
				sortOptionList);

		return itr;

	} catch (Exception ex) {
		ex.printStackTrace();
	}
	return null;

}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:44,代码来源:DataUtils.java

示例15: isMapping

import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入方法依赖的package包/类
public static boolean isMapping(String scheme, String version) {
/*
if (_isMappingHashMap == null) {
	setCodingSchemeMap();
}
*/
if (_isMappingHashMap == null) {
	_isMappingHashMap = new HashMap();
}


if (_isMappingHashMap.containsKey(scheme)) {
	Boolean is_mapping = (Boolean) _isMappingHashMap.get(scheme);
	return is_mapping.booleanValue();
}


      CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
      if (version != null)
          csvt.setVersion(version);

//List list = new ArrayList();
try {
	LexBIGService lbSvc = new RemoteServerUtil().createLexBIGService();
	CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
	Relations[] relations = cs.getRelations();
	if (relations.length == 0) {
		_isMappingHashMap.put(scheme, Boolean.FALSE);
		return false;
	}
	for (int i = 0; i < relations.length; i++) {
		Relations relation = relations[i];
		Boolean bool_obj = relation.isIsMapping();
		if (bool_obj == null || bool_obj.equals(Boolean.FALSE)) {
			_isMappingHashMap.put(scheme, Boolean.FALSE);
			return false;
		}
	}
} catch (Exception ex) {
	_isMappingHashMap.put(scheme, Boolean.FALSE);
          return false;
      }
      _isMappingHashMap.put(scheme, Boolean.TRUE);
      return true;
  }
 
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:46,代码来源:DataUtils.java


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