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