本文整理了Java中pl.edu.icm.model.bwmeta.y.YCurrent.setPosition()
方法的一些代码示例,展示了YCurrent.setPosition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YCurrent.setPosition()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YCurrent
类名称:YCurrent
方法名:setPosition
暂无
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
public void updateElementPages(org.jdom.Element ameta, YElement article, String hierarchy) {
StringBuilder sb = new StringBuilder();
sb.append(JDOMHelper.getChildTextTrim(ameta, "fpage"));
String lastPage = JDOMHelper.getChildTextTrim(ameta, "lpage");
if(lastPage != null && !"".equals(lastPage)){
sb.append("-");
sb.append(lastPage);
}
String s=sb.toString();
if (s==null || "null".equalsIgnoreCase(s.trim()) || StringUtils.isBlank(s)) {
return;
}
article.getStructure(hierarchy).getCurrent().setPosition(s);
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
private void updateArticleCurrentLevel(ZentralBlattSoFieldParser.SoFieldData soData) {
YStructure articleStructure = yArticle.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
YCurrent current = new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ARTICLE);
if (soData.pages != null && soData.pages.length() > 0) {
current.setPosition(soData.pages);
}
articleStructure.setCurrent(current);
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
protected void updatePages(Pages pages, YCurrent current) {
if (pages == null) {
return;
}
StringBuffer position = new StringBuffer();
if (pages.getFirstPage() != null) {
position.append(pages.getFirstPage());
}
if (pages.getLastPage() != null) {
position.append('-');
position.append(pages.getLastPage());
}
if (pages.getOtherPages() != null) {
if (position.length() > 0) {
position.append(SPACE);
}
position.append(pages.getOtherPages());
}
current.setPosition(position.toString());
}
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
private void addCurrent(YStructure journal, ArticleEditForm form) {
YCurrent yCurrent = new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ARTICLE);
yCurrent.setPosition(form.getPages());
journal.setCurrent(yCurrent);
}
代码示例来源:origin: pl.edu.icm.synat/synat-importer-direct
@Override
public void parseMetadata(YElement element, PublicationMeta pm, YLanguage defaultLanguage, List<YElement> ancestors) {
String pos = numberingGroupToPages(pm.getNumberingGroup());
if (pos != null) {
element.getStructures().get(0).getCurrent().setPosition(pos);
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
private void appendStructure(ResourceData resource, YElement yElement) {
final String hierarchy = ResourceDataConstants.MAP_TYPE_TO_HIERARCHY.get(resource.getType());
final String current = ResourceDataConstants.MAP_TYPE_TO_CURRENT.get(resource.getType());
YStructure structure = new YStructure(hierarchy);
final AncestorData pages = extractAncestorFromHierarchyData(resource, ResourceDataConstants.ANCESTOR_LEVEL_NAME_PAGES);
final String position = pages == null ? StringUtils.EMPTY : StringUtils.defaultString(pages.getName());
structure.setCurrent(new YCurrent(current).setPosition(position));
final Collection<YAncestor> ancestors = mapHierarchyToAncestors(resource.getType(), resource.getHierarchy());
if (CollectionUtils.isNotEmpty(ancestors)) {
structure.setAncestors(ancestors);
}
yElement.addStructure(structure);
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
Object pages=msg.get("pages");
if (pages!=null) {
curr.setPosition(pages.toString().trim());
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
article.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL).getCurrent().setPosition(ameta.getChildTextTrim("fpage") + "-" + ameta.getChildTextTrim("lpage"));
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
@Override
public YElement process(Book book, YElement parent, CrossrefIdGenerator generator) {
ContentItem contentItem = book.getContentItem();
YElement element = new YElement();
element.getNames().addAll(convertTitles(contentItem.getTitles()));
element.getRelations().addAll(convertCitationList(contentItem.getCitationList()));
element.getContributors().addAll(convert(contentItem.getContributors(), element));
element.getDates().addAll(convertDates(contentItem.getPublicationDates()));
String level = getContentItemLevel(contentItem.getComponentType());
YStructure structure = buildStructureFromParent(parent, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK, level);
if(contentItem.getLevelSequenceNumber() != null){
structure.getCurrent().setPosition(contentItem.getLevelSequenceNumber().toString());
} else {
updatePages(contentItem.getPages(), structure.getCurrent());
}
element.addStructure(structure);
if (contentItem.getDoiData() != null) {
element.getIds().add(new YId(IdSchemaIds.EXT_SCHEME_DOI, contentItem.getDoiData().getDoi()));
}
String id = generator.generateBookPartId(parent.getId(), contentItem.getComponentType(), element.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_DOI),
element.getOneName() != null ? element.getOneName().getText() : null);
element.setId(id);
return element;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
article.getStructure(EXT_HIERARCHY_JOURNAL).getCurrent().setPosition(ameta.getChildTextTrim("fpage") + "-" + ameta.getChildTextTrim("lpage"));
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
struct.getCurrent().setPosition(at.getPages());
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
current.setPosition(position);
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
yStructure.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ARTICLE).setPosition(source.getFirstFieldValue(BibEntry.FIELD_PAGES)));
yStructure.addAncestor(new YAncestor(YConstants.EXT_LEVEL_JOURNAL_ISSUE).addName(new YName(source.getFirstFieldValue(BibEntry.FIELD_NUMBER))));
yStructure.addAncestor(new YAncestor(YConstants.EXT_LEVEL_JOURNAL_VOLUME).addName(new YName(source.getFirstFieldValue(BibEntry.FIELD_VOLUME))));
内容来源于网络,如有侵权,请联系作者删除!