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


Java SupportedAssociation类代码示例

本文整理汇总了Java中org.LexGrid.naming.SupportedAssociation的典型用法代码示例。如果您正苦于以下问题:Java SupportedAssociation类的具体用法?Java SupportedAssociation怎么用?Java SupportedAssociation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getPredicateUri

import org.LexGrid.naming.SupportedAssociation; //导入依赖的package包/类
@Override
public String getPredicateUri(
		String codingSchemeUri,
		String codingSchemeVersion, 
		String associationName) {
	CodingScheme codingScheme;
	try {
		codingScheme = this.lexBigService.resolveCodingScheme(
				codingSchemeUri, 
				Constructors.createCodingSchemeVersionOrTagFromVersion(codingSchemeVersion));
	} catch (LBException e) {
		throw new RuntimeException(e);
	}
	
	SupportedAssociation supportedAssociation =  
		this.findSupportedAssociation(
			associationName, 
			codingScheme.getMappings().getSupportedAssociation());
	
	String uri = null;
	if(supportedAssociation != null){
		uri = supportedAssociation.getUri();
	} 
	
	return uri;
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:27,代码来源:LexEvsSupportedPropertiesUriHandler.java

示例2: findSupportedAssociation

import org.LexGrid.naming.SupportedAssociation; //导入依赖的package包/类
private SupportedAssociation findSupportedAssociation(String association, SupportedAssociation[] associations){
	for(SupportedAssociation sa : associations){
		if(sa.getLocalId().equals(association)){
			return sa;
		}
	}
	return null;
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:9,代码来源:LexEvsSupportedPropertiesUriHandler.java

示例3: profileAssociations

import org.LexGrid.naming.SupportedAssociation; //导入依赖的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

示例4: findAssociation

import org.LexGrid.naming.SupportedAssociation; //导入依赖的package包/类
private SupportedAssociation findAssociation(Mappings mappings, String localId){
	return DaoUtility.getURIMap(mappings, SupportedAssociation.class, localId);
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:4,代码来源:LexEvsValueSetDefinitionToCTS2ValueSetDefinitionTransform.java


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