當前位置: 首頁>>代碼示例>>Java>>正文


Java Presentation.getRepresentationalForm方法代碼示例

本文整理匯總了Java中org.LexGrid.concepts.Presentation.getRepresentationalForm方法的典型用法代碼示例。如果您正苦於以下問題:Java Presentation.getRepresentationalForm方法的具體用法?Java Presentation.getRepresentationalForm怎麽用?Java Presentation.getRepresentationalForm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.LexGrid.concepts.Presentation的用法示例。


在下文中一共展示了Presentation.getRepresentationalForm方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: dumpProperty

import org.LexGrid.concepts.Presentation; //導入方法依賴的package包/類
public void dumpProperty(Property property) {
	System.out.println("\n" + property.getPropertyType());
	System.out.println(property.getPropertyName() + ": " + property.getValue().getContent());

	PropertyQualifier[] qualifiers = property.getPropertyQualifier();
	if (qualifiers != null) {
		System.out.println("Property Qualifiers: " );
		for (int i=0; i<qualifiers.length; i++) {
			PropertyQualifier qualifier = qualifiers[i];
			System.out.println("\t" + qualifier.getPropertyQualifierName() + ": " + qualifier.getValue().getContent());
		}
	}
	Source[] sources = property.getSource();

	if (sources != null) {
		System.out.println("Sources: " );
		for (int i=0; i<sources.length; i++) {
			Source source = sources[i];
			System.out.println("\t" + source.getContent());
		}
    }
    if (property instanceof Presentation) {
		Presentation presentation = (Presentation) property;
		if (presentation.getRepresentationalForm() != null) {
			System.out.println("RepresentationalForm: " + presentation.getRepresentationalForm());
	    }
	}
}
 
開發者ID:NCIP,項目名稱:nci-term-browser,代碼行數:29,代碼來源:EntityExporter.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.getRepresentationalForm方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。