本文整理了Java中pl.edu.icm.model.bwmeta.y.YAttribute.getRichValue()
方法的一些代码示例,展示了YAttribute.getRichValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAttribute.getRichValue()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YAttribute
类名称:YAttribute
方法名:getRichValue
暂无
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private String getXMLFragmentFrom(YAttribute attribute){
if(attribute == null){
return null;
}
YRichText yrichText = attribute.getRichValue();
final String result = YRTHelper.toXmlFragment(yrichText, "");
return result;
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
private String getXMLFragmentFrom(YAttribute referanceText) {
if(referanceText == null){
return "";
} else {
YRichText yrichText = referanceText.getRichValue();
final String result = YRTHelper.toXmlFragment(yrichText, "");
return result;
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-core-services-impl
private Object getAttributeValue(YAttribute attribute){
if(attribute.getAttributes() == null || attribute.getAttributes().isEmpty()){
YRichText richText = attribute.getRichValue();
Object richTextObject = converter.convertToMongoType(richText);
return richTextObject;
} else {
DBObject attributeValue = (DBObject) converter.convertToMongoType(attribute, ClassTypeInformation.from(attribute.getClass()));
attributeValue.removeField("key");
return attributeValue;
}
}
代码示例来源: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-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 YAttribute extractOneReferenceTextAttributeScNode(YAttribute ya) {
if(! ll.contains(ya.getKey())) return ya;
for(Part p:ya.getRichValue().toParts()){
if(p instanceof Node){
if("sc".equals(((Node)p).getTag()))
return new YAttribute(ya.getKey(),new YRichText(((Node)p).getParts().get(0).toString()));
}else if(p instanceof Leaf)
return new YAttribute(ya.getKey(),new YRichText(((Leaf)p).toPlainText()));
}
return ya;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
private static YAttribute extractOneReferenceTextAttributeScNode(YAttribute ya) {
if(! ll.contains(ya.getKey())) return ya;
for(Part p:ya.getRichValue().toParts()){
if(p instanceof Node){
if("sc".equals(((Node)p).getTag()))
return new YAttribute(ya.getKey(),new YRichText(((Node)p).getParts().get(0).toString()));
}else if(p instanceof Leaf)
// if(p.toPlainText()!=null && !p.toPlainText().matches("[\\s]+"))
return new YAttribute(ya.getKey(),new YRichText(((Leaf)p).toPlainText()));
}
return ya;
}
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
YAttribute title = relation.getOneAttribute(ReferenceAttributeTypes.AT_REFERENCE_PARSED_TITLE);
if (title != null) {
parts.addAll(title.getRichValue().toParts());
parts.add(new YRichText.Leaf(", "));
内容来源于网络,如有侵权,请联系作者删除!