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


Java Presentation.getSource方法代码示例

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


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

示例1: toDesignation

import org.LexGrid.concepts.Presentation; //导入方法依赖的package包/类
protected List<Designation> toDesignation(Presentation... presentations){
	List<Designation> returnList = new ArrayList<Designation>();
	
	for(Presentation presentation : presentations){
		Designation designation = new Designation();

		DesignationRole role;
		if(BooleanUtils.toBoolean(presentation.isIsPreferred())){
			role = DesignationRole.PREFERRED;
		} else {
			role = DesignationRole.ALTERNATIVE;
		}
		
		designation.setValue(
			ModelUtils.toTsAnyType(presentation.getValue().getContent()));
		
		designation.setDesignationRole(role);
		LanguageReference lref = new LanguageReference();
		lref.setContent(presentation.getLanguage());
		designation.setLanguage(lref);
		if(presentation.getSource().length > 0){
			designation.setAssertedInCodeSystemVersion(presentation.getSource()[0].getContent());
		}

		returnList.add(designation);
	}
	
	return returnList;
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:30,代码来源:EntityTransform.java

示例2: getSynonyms

import org.LexGrid.concepts.Presentation; //导入方法依赖的package包/类
public Vector getSynonyms(String scheme, Entity concept) {
    if (concept == null)
        return null;
    Vector v = new Vector();
    Presentation[] properties = concept.getPresentation();
    int n = 0;
    boolean inclusion = true;
    for (int i = 0; i < properties.length; i++) {
        Presentation p = properties[i];
        // for NCI Thesaurus or Pre-NCI Thesaurus, show FULL_SYNs only
        if (scheme != null && (scheme.indexOf("NCI_Thesaurus") != -1 || scheme.indexOf("NCI Thesaurus") != -1)) {
            inclusion = false;
            if (p.getPropertyName().compareTo("FULL_SYN") == 0) {
                inclusion = true;
            }
        }
        if (inclusion) {
            String term_name = p.getValue().getContent();
            String term_type = "null";
            String term_source = "null";
            String term_source_code = "null";
            String term_subsource = "null";

            PropertyQualifier[] qualifiers = p.getPropertyQualifier();
            if (qualifiers != null) {
                for (int j = 0; j < qualifiers.length; j++) {
                    PropertyQualifier q = qualifiers[j];
                    String qualifier_name = q.getPropertyQualifierName();
                    String qualifier_value = q.getValue().getContent();
                    if (qualifier_name.compareTo("source-code") == 0) {
                        term_source_code = qualifier_value;
                    }
                    if (qualifier_name.compareTo("subsource-name") == 0) {
                        term_subsource = qualifier_value;
                    }
                }
            }
            term_type = p.getRepresentationalForm();
            Source[] sources = p.getSource();
            if (sources != null && sources.length > 0) {
                Source src = sources[0];
                term_source = src.getContent();
            }
            v.add(term_name + "|" + term_type + "|" + term_source + "|"
                + term_source_code + "|" +  term_subsource);
        }
    }
    SortUtils.quickSort(v);
    return v;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:51,代码来源:ConceptDetails.java

示例3: getAllSynonyms

import org.LexGrid.concepts.Presentation; //导入方法依赖的package包/类
public Vector getAllSynonyms(String scheme, Entity concept) {
     if (concept == null)
         return null;
     Vector v = new Vector();
     Presentation[] properties = concept.getPresentation();
     int n = 0;
     boolean inclusion = true;
     for (int i = 0; i < properties.length; i++) {
         Presentation p = properties[i];
String term_name = p.getValue().getContent();
String term_type = "null";
String term_source = "null";
String term_source_code = "null";
String term_subsource = "null";

PropertyQualifier[] qualifiers = p.getPropertyQualifier();
if (qualifiers != null) {
	for (int j = 0; j < qualifiers.length; j++) {
		PropertyQualifier q = qualifiers[j];
		String qualifier_name = q.getPropertyQualifierName();
		String qualifier_value = q.getValue().getContent();
		if (qualifier_name.compareTo("source-code") == 0) {
			term_source_code = qualifier_value;
		}
		if (qualifier_name.compareTo("subsource-name") == 0) {
			term_subsource = qualifier_value;
		}
	}
}
term_type = p.getRepresentationalForm();
Source[] sources = p.getSource();
if (sources != null && sources.length > 0) {
	Source src = sources[0];
	term_source = src.getContent();
}
v.add(term_name + "|" + term_type + "|" + term_source + "|"
	+ term_source_code + "|" +  term_subsource);
     }
     SortUtils.quickSort(v);
     return v;
 }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:42,代码来源:ConceptDetails.java


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