本文整理了Java中pl.edu.icm.model.bwmeta.y.YAttribute.setValue()
方法的一些代码示例,展示了YAttribute.setValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAttribute.setValue()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YAttribute
类名称:YAttribute
方法名:setValue
暂无
代码示例来源:origin: pl.edu.icm.synat/synat-core-services-impl
private List<YAttribute> processAttributes(String key, Object value) {
List<YAttribute> attributes = new ArrayList<>();
if(value instanceof String){
YAttribute attribute = new YAttribute();
attribute.setValue(value.toString());
attribute.setKey(key);
attributes.add(attribute);
} else if(value instanceof List){
for(Object object:((BasicDBList) value)){
attributes.addAll(processAttributes(key, object));
}
} else if(value instanceof DBObject) {
YAttribute attribute = getConverter().read(YAttribute.class, (DBObject) value);
attribute.setKey(key);
attributes.add(attribute);
}
return attributes;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
String sn = separateAuthorSurnamesList.get(s1);
YAttribute ya = new YAttribute();
ya.setValue(separateAuthorForenamesList.get(s1)+" "+separateAuthorSurnamesList.get(s1));
ya.setKey(YConstants.AT_REFERENCE_PARSED_AUTHOR);
if(separateAuthorForenamesList.get(s1)!=null && separateAuthorForenamesList.get(s1).length()>0) ya.addAttribute(new YAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_FORENAMES, separateAuthorForenamesList.get(s1).toString()));
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
private static YElement putRelationReferenceToLeafsIntoNodes(YElement yelement) {
for(YRelation yr : yelement.getRelations()){
// LinkedList<YAttribute> lya = new LinkedList<YAttribute>();
for(YAttribute ya : yr.getAttributes()){
if(! ll.contains(ya.getKey()))continue;
removeGivenTag("sc", ya.getRichValue().toParts());
ya.setValue(new YRichText(extractLeafs(removeNodeWithGivenTag("ext-link", ya.getRichValue().toParts()))));
// lya.add(ya);
}
// if(lya.size()>0)yr.setAttributes(lya);
}
return yelement;
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
private static YElement putRelationReferenceToLeafsIntoNodes(YElement yelement) {
for(YRelation yr : yelement.getRelations()){
for(YAttribute ya : yr.getAttributes()){
if(! ll.contains(ya.getKey()))continue;
removeGivenTag("sc", ya.getRichValue().toParts());
ya.setValue(new YRichText(extractLeafs(removeNodeWithGivenTag("ext-link", ya.getRichValue().toParts()))));
}
}
return yelement;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
ya.setKey(YConstants.AT_REFERENCE_PARSED_AUTHOR);
if(forename!=null && surname!=null && forename.length()>0 && surname.length()>0){
ya.setValue(forename+" "+surname);
ya.addAttribute(new YAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_FORENAMES, forename));
ya.addAttribute(new YAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_SURNAME, surname));
} else if(surname!=null && forename.length()==0 && surname.length()>0){
ya.setValue(surname);
ya.addAttribute(new YAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_SURNAME, surname));
} else if(forename!=null && forename.length()>0 && surname.length()==0){
ya.setValue(forename);
ya.addAttribute(new YAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_FORENAMES, forename));
} else ya.setValue("");
parsed.addAttribute(ya);
内容来源于网络,如有侵权,请联系作者删除!