本文整理汇总了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());
}
}
}
示例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;
}
示例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;
}