本文整理了Java中pl.edu.icm.model.bwmeta.y.YElement.setNames()
方法的一些代码示例,展示了YElement.setNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YElement.setNames()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YElement
类名称:YElement
方法名:setNames
暂无
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
/**
* Reads title from field [ti] and writes to yElement.
*
* @param src
* @param yelement
*/
private void updateArticleTitle(ZentralBlattRecord src, YElement yelement) {
if (!src.hasField("ti")) {
return;
}
List<YName> names = new LinkedList<YName>();
YRichText richTxtTitle = new YRichText(src.getField("ti").trim());
names.add(new YName(richTxtTitle));
yelement.setNames(names);
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
public ArticleBuilder setTitles(LocalizedString canonicalTitle, List<LocalizedString> alternativesTitles) {
List<YName> yNames = removeTitles();
yNames.add((createYName(canonicalTitle.getLang(), canonicalTitle.getText(), YConstants.NM_CANONICAL)));
addAlternativeTitles(alternativesTitles, yNames);
article.setNames(yNames);
return this;
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
private YElement buildElement(HierarchyLevel hierarchyLevel, String elementLevel, String parentId,
String parentLevel, String parentName) {
final String elementId = hierarchyLevel.getId();
final String name = hierarchyLevel.getName();
YElement element = new YElement(elementId);
element.setNames(Lists.newArrayList(new YName(name)));
final YStructure yStructure = new YStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
yStructure.setCurrent(new YCurrent(elementLevel));
final YAncestor parent = new YAncestor(parentLevel, parentId);
parent.addName(new YName(parentName));
yStructure.addAncestor(parent);
element.setStructures(Lists.newArrayList(yStructure));
return element;
}
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
journal.setNames(Collections.EMPTY_LIST);
wrongDataLogger.error("Element contains no Journal Title");
} else {
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
protected void updateYElement(final DataSet dataSet, final YElement yElement) {
YStructure yStructure = new YStructure(DATA_SET_YSTRUCTURE);
YCurrent yCurrent = new YCurrent(DATA_SET_YLEVEL);
yStructure.setCurrent(yCurrent);
Collection<YStructure> structures = Collections.singletonList(yStructure);
yElement.setStructures(structures);
if (StringUtils.isNotBlank(dataSet.getId())) {
yElement.setId(DATA_SET_YELEMENT_ID_PREFIX + dataSet.getId());
}
if (StringUtils.isNotBlank(dataSet.getName())) {
yElement.setNames(Collections.singletonList(new YName(dataSet.getName())));
}
if (StringUtils.isNotBlank(dataSet.getDescription())) {
yElement.setDescriptions(Collections.singletonList(new YDescription(YLanguage.Undetermined, dataSet.getDescription())));
}
if (dataSet.getDefaultLicense() != null) {
YTagList tagList = new YTagList();
tagList.setType(YModelUtils.LICENSE);
tagList.addValue(dataSet.getDefaultLicense().getId());
yElement.addTagList(tagList);
}
}
内容来源于网络,如有侵权,请联系作者删除!