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


Java ConceptReference类代码示例

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


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

示例1: codedNodeGraph2CodedNodeSetIterator

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
/**
 * Return Iterator for codedNodeGraph
 *
 * @param cng
 * @param graphFocus
 * @param resolveForward
 * @param resolveBackward
 * @param resolveAssociationDepth
 * @param maxToReturn
 * @return
 */
public ResolvedConceptReferencesIterator codedNodeGraph2CodedNodeSetIterator(
        CodedNodeGraph cng, ConceptReference graphFocus,
        boolean resolveForward, boolean resolveBackward,
        int resolveAssociationDepth, int maxToReturn) {
    CodedNodeSet cns = null;

    try {
        cns = cng.toNodeList(graphFocus, resolveForward, resolveBackward,
                resolveAssociationDepth, maxToReturn);
        if (cns == null) return null;
        return cns.resolve(null, null, null);
    } catch (Exception ex) {
        _logger.warn(ex.getMessage());
    }

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

示例2: createConceptReferenceList

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public ConceptReferenceList createConceptReferenceList(
     String[] codes, String codingSchemeName, String ns) {
     if (codes == null) {
         return null;
     }
     ConceptReferenceList list = new ConceptReferenceList();
     for (int i = 0; i < codes.length; i++) {
         ConceptReference cr = new ConceptReference();
         cr.setCodingSchemeName(codingSchemeName);
         cr.setConceptCode(codes[i]);
         if (ns != null) {
	cr.setCodeNamespace(ns);
}

         list.addConceptReference(cr);
     }
     return list;
 }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:19,代码来源:TestConceptDetails.java

示例3: createConceptReferenceList

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public static ConceptReferenceList createConceptReferenceList(String[] codes, String codingSchemeName)
{
	if (codes == null)
	{
		return null;
	}
	ConceptReferenceList list = new ConceptReferenceList();
	for (int i = 0; i < codes.length; i++)
	{
		ConceptReference cr = new ConceptReference();
		cr.setCodingScheme(codingSchemeName);
		cr.setConceptCode(codes[i]);
		list.addConceptReference(cr);
	}
	return list;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:17,代码来源:SearchUtils.java

示例4: createConceptReferenceList

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public static ConceptReferenceList createConceptReferenceList(String[] codes, String codingSchemeName)
{
    if (codes == null)
    {
        return null;
    }
    ConceptReferenceList list = new ConceptReferenceList();
    for (int i = 0; i < codes.length; i++)
    {
        ConceptReference cr = new ConceptReference();
        cr.setCodingSchemeName(codingSchemeName);
        cr.setConceptCode(codes[i]);
        list.addConceptReference(cr);
    }
    return list;
}
 
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:17,代码来源:MappingUtils.java

示例5: createConceptReferenceList

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
/**
 * @param codes
 * @param codingSchemeName
 * @return
 */
private ConceptReferenceList createConceptReferenceList(String[] codes,
        String codingSchemeName) {
    if (codes == null)
        return null;
    ConceptReferenceList list = new ConceptReferenceList();
    for (int i = 0; i < codes.length; i++) {
        ConceptReference cr = new ConceptReference();
        cr.setCodingSchemeName(codingSchemeName);
        cr.setConceptCode(codes[i]);
        list.addConceptReference(cr);
    }
    return list;
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:19,代码来源:SearchCart.java

示例6: createConceptReferenceList

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public static ConceptReferenceList createConceptReferenceList(
     Vector codes, String codingSchemeName) {
     if (codes == null) {
         return null;
     }
     ConceptReferenceList list = new ConceptReferenceList();
     for (int i = 0; i < codes.size(); i++) {
String code = (String) codes.elementAt(i);
         ConceptReference cr = new ConceptReference();
         if (codingSchemeName != null) cr.setCodingSchemeName(codingSchemeName);
         cr.setConceptCode(code);
         list.addConceptReference(cr);
     }
     return list;
 }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:16,代码来源:CartActionBean.java

示例7: createConceptReferenceList

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public ConceptReferenceList createConceptReferenceList(
    String[] codes, String codingSchemeName) {
    if (codes == null) {
        return null;
    }
    ConceptReferenceList list = new ConceptReferenceList();
    for (int i = 0; i < codes.length; i++) {
        ConceptReference cr = new ConceptReference();
        cr.setCodingSchemeName(codingSchemeName);
        cr.setConceptCode(codes[i]);
        list.addConceptReference(cr);
    }
    return list;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:15,代码来源:ViewInHierarchyUtils.java

示例8: getAssociationSources

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的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: getAssociationTargets

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public Vector getAssociationTargets(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 = true;
           boolean resolveBackward = false;

           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

示例10: isCodeInValueSet

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public static Boolean isCodeInValueSet(String code, String codingScheme, String vsd_uri) {
 try {
	String URL = "http://ncias-q541-v.nci.nih.gov:29080/lexevsapi60";
	URL = "http://localhost:19280/lexevsapi60";
	LexEVSDistributed distributed =
		(LexEVSDistributed)
		ApplicationServiceProvider.getApplicationServiceFromUrl(URL, "EvsServiceInfo");

	LexEVSValueSetDefinitionServices vds = distributed.getLexEVSValueSetDefinitionServices();

             java.lang.String valueSetDefinitionRevisionId = null;
             AbsoluteCodingSchemeVersionReferenceList csVersionList = getEntireAbsoluteCodingSchemeVersionReferenceList();
             java.lang.String csVersionTag = null;

             ResolvedValueSetCodedNodeSet rvs_cns = vds.getCodedNodeSetForValueSetDefinition(
		 new URI(vsd_uri),
                  valueSetDefinitionRevisionId,
                  csVersionList,
                  csVersionTag);

             if (rvs_cns == null) return false;
             CodedNodeSet cns = rvs_cns.getCodedNodeSet();
             ConceptReference conceptReference = new ConceptReference();
             conceptReference.setConceptCode(code);
             if (codingScheme != null) {
		conceptReference.setCodingSchemeName(codingScheme);
	}
             java.lang.Boolean bool_obj = cns.isCodeInSet(conceptReference);
             return bool_obj;

 } catch (Exception ex) {
	ex.printStackTrace();
 }
 Boolean retval = null;
       return retval;
}
 
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:37,代码来源:ValueSetUtils.java

示例11: matchesEntities

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public boolean matchesEntities(CodingScheme cs,
		Set<EntityNameOrURI> entities) throws LBException {
	if (entities == null || entities.isEmpty()) {
		return true;
	}
	ConceptReferenceList conceptReferenceList = new ConceptReferenceList();
	for (EntityNameOrURI entity : entities) {
		if (entity.getEntityName() != null) {
			ConceptReference conceptRef = new ConceptReference();
			conceptRef.setCode(entity.getEntityName().getName());
			conceptRef.setCodeNamespace(entity.getEntityName()
					.getNamespace());
			conceptReferenceList.addConceptReference(conceptRef);
		}

	}

	CodingSchemeVersionOrTag version = Constructors
			.createCodingSchemeVersionOrTagFromVersion(cs
					.getRepresentsVersion());
	CodedNodeSet cns = lexBIGService.getNodeSet(cs.getCodingSchemeURI(),
			version, null).restrictToCodes(conceptReferenceList);
	ResolvedConceptReferenceList rcrl = cns.resolveToList(null, null, null,
			null, false, -1);
	if (rcrl.getResolvedConceptReferenceCount() < 1) {
		return false;
	} else {
		return true;
	}
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:31,代码来源:CommonResolvedValueSetUtils.java

示例12: codes2CodedNodeSet

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public CodedNodeSet codes2CodedNodeSet() {
	if (_codes == null) return null;
	CodedNodeSet cns = null;
	CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
	if (this._version != null)
		csvt.setVersion(this._version);

	try {
		LexBIGService lbSvc = null;
		lbSvc = new RemoteServerUtil().createLexBIGService();

		LocalNameList entityTypes = new LocalNameList();
		entityTypes.addEntry("concept");

		cns = lbSvc.getNodeSet(this._vocabulary, csvt, entityTypes);
		//ResolvedConceptReferencesIterator iterator = toIterator();
		ConceptReferenceList codeList = new ConceptReferenceList();

		String codes = _codes;

		codes = codes.trim();
		if (codes.compareTo("") == 0) {
			return null;
		}

		String lines[] = codes.split("\\n");
		for(int i = 0; i < lines.length; i++) {
			String t = lines[i];
			ConceptReference cr = new ConceptReference();
			cr.setConceptCode(t);
			codeList.addConceptReference(cr);
		}
		cns.restrictToCodes(codeList);
	} catch (Exception ex) {

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

示例13: getAssociatedConcepts

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
/**
 * Returns Associated Concepts
 *
 * @param scheme
 * @param version
 * @param code
 * @param assocName
 * @param forward
 * @return
 */
public Vector<Entity> getAssociatedConcepts(String scheme, String version,
        String code, Vector<String> assocNames, boolean forward) {

        CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
        if (version != null) csvt.setVersion(version);
        boolean resolveForward = true;
        boolean resolveBackward = false;

        // Set backward direction
        if (!forward) {
            resolveForward = false;
            resolveBackward = true;
        }

        Vector<Entity> v = new Vector<Entity>();

        try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();

            CodedNodeGraph cng = lbSvc.getNodeGraph(scheme, csvt, null);

            // Restrict coded node graph to the given association
            NameAndValueList nameAndValueList = createNameAndValueList(
                    assocNames, null);
            cng = cng.restrictToAssociations(nameAndValueList, null);

            ConceptReference graphFocus =
                ConvenienceMethods.createConceptReference(code, scheme);

            ResolvedConceptReferencesIterator iterator =
                codedNodeGraph2CodedNodeSetIterator(cng, graphFocus,
                    resolveForward, resolveBackward, RESOLVEASSOCIATIONDEPTH,
                    MAXTORETURN);
            v = resolveIterator(iterator, MAXTORETURN, code);

        } catch (Exception ex) {
            _logger.warn(ex.getMessage());
        }
        return v;
    }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:51,代码来源:CartActionBean.java

示例14: resolveOneHit

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

示例15: codedNodeGraph2CodedNodeSetIterator

import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入依赖的package包/类
public ResolvedConceptReferencesIterator codedNodeGraph2CodedNodeSetIterator(
						CodedNodeGraph cng,
						ConceptReference graphFocus,
						boolean resolveForward,
						boolean resolveBackward,
						int resolveAssociationDepth,
						int maxToReturn) {
        CodedNodeSet cns = null;
        try {
		 cns = cng.toNodeList(graphFocus,
						 resolveForward,
						 resolveBackward,
						 resolveAssociationDepth,
						 maxToReturn);

		 if (cns == null)
		 {
			 _logger.warn("cng.toNodeList returns null???");
			 return null;
		 }


	     SortOptionList sortCriteria = null;
		    //Constructors.createSortOptionList(new String[]{"matchToQuery", "code"});

		 LocalNameList propertyNames = null;
		 CodedNodeSet.PropertyType[] propertyTypes = null;
		 ResolvedConceptReferencesIterator iterator = null;
		 try {
			 iterator = cns.resolve(sortCriteria, propertyNames, propertyTypes);
		 } catch (Exception e) {
			 e.printStackTrace();
		 }

 		 if(iterator == null)
 		 {
			 _logger.warn("cns.resolve returns null???");
		 }
 		 return iterator;

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


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