本文整理了Java中pl.edu.icm.model.bwmeta.y.YElement.getStructure()
方法的一些代码示例,展示了YElement.getStructure()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YElement.getStructure()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YElement
类名称:YElement
方法名:getStructure
暂无
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
private YAncestor getAncestor(YElement element, String hierarchy, String level) {
YStructure structure = element.getStructure(hierarchy);
if(structure == null){
return null;
}
YAncestor ancestor = structure.getAncestor(level);
return ancestor;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-cli
static boolean isArticle(YElement el) {
if (el.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL)!=null) {
YStructure struct=el.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
if (struct.getCurrent().getLevel().equalsIgnoreCase(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_ARTICLE)) {
return true;
}
}
return false;
}
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
private YCurrent getCurrentLevel(YElement element, String hierarchy) {
YStructure structure = element.getStructure(hierarchy);
return structure.getCurrent();
}
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
public void exposeContentDetails(YElement yElement, Model model) {
model.addAttribute(HAS_CONTENT_RENDERABLE_PARTS, resourceDisplayUtils.hasRenderableParts(yElement));
if (yElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK) != null
&& yElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK).getCurrent() != null) {
model.addAttribute(
HAS_CONTENT_CHAPTERS_PARTS,
relatedDisplayUtils.verifyIfIsSomeoneAncestor(yElement.getId(), yElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK)
.getCurrent().getLevel()));
} else {
model.addAttribute(HAS_CONTENT_CHAPTERS_PARTS, false);
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-sdk-sample-services
private boolean isArticle(YElement element) {
YStructure structure = element.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
if (structure == null) {
return false;
}
return HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_ARTICLE.equals(structure.getCurrent().getLevel());
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
public String getPosition(YElement yElement){
YStructure structure = yElement.getStructure(YaddaIdConstants.ID_HIERARACHY_JOURNAL);
YCurrent current = structure.getCurrent();
return current.getPosition();
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
private void updateJournalCurrentLevel() {
YStructure struct = yJournal.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
struct.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_JOURNAL));
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
private void updateIssueCurrentLevel() {
YStructure struct = yIssue.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
struct.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ISSUE));
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
private void updateYearCurrentLevel() {
YStructure struct = yYear.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
struct.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_YEAR));
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
private void updateVolumeCurrentLevel() {
YStructure struct = yVolume.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
struct.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_VOLUME));
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
public static String articlePosition(YElement element) {
String position = null;
YStructure anc = element.getStructure(YaddaIdConstants.ID_HIERARACHY_JOURNAL);
if (anc != null) {
YCurrent cAnc = anc.getCurrent();
if (cAnc != null && !StringUtils.isEmpty(cAnc.getPosition()))
position = cAnc.getPosition();
}
return position;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
private static <T> T getProcessedDefaultStructure(YElement element, Function<YStructure, T> processor) {
for (final String hierarhyId : ALLOWED_HIERARCHY_ID) {
YStructure yStructure = element.getStructure(hierarhyId);
if (yStructure != null && yStructure.getCurrent() != null && yStructure.getCurrent().getLevel() != null) {
return processor.apply(yStructure);
}
}
return null;
}
代码示例来源: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.synat/synat-portal-core
private boolean shouldUrlBeVisible(ElementMetadata elementMetadata) {
String licenseTag = RepositoryStoreConstants.TAG_NAME_LICENSING_POLICY + RepositoryStoreConstants.TAG_SEPARATOR
+ LicensingPolicyType.ORGANISATIONS.label();
boolean licensedResource = elementMetadata.getTags().contains(licenseTag);
YElement yElement = (YElement) elementMetadata.getContent();
boolean journalElement = yElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL) != null;
return journalElement && !licensedResource;
}
代码示例来源:origin: pl.edu.icm.synat/synat-sdk-sample-services
private boolean isYearInYear(YElement element) {
YStructure structure = element.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
if (structure != null) {
if (HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_YEAR.equals(structure.getCurrent().getLevel())) {
YAncestor ancestor = structure.getAncestor(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_YEAR);
return ancestor != null;
}
}
return false;
}
代码示例来源:origin: pl.edu.icm.synat/synat-importer-direct
protected String getLevel(YElement element) {
if(element == null){
return null;
}
YStructure structure = element.getStructure(getSupportedHierarchyId());
if (structure == null) {
return null;
}
return structure.getCurrent().getLevel();
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
private void updateVolume(ZentralBlattSoFieldParser.SoFieldData soData) {
if (soData.volume != null && soData.volume.length() > 0) {
YAncestor ancestor = new YAncestor(YConstants.EXT_LEVEL_JOURNAL_VOLUME); // TODO
// UID?
YName volumeName = new YName(soData.volume);
yVolume.addName(volumeName);
ancestor.setIdentity(yVolume.getId());
ancestor.addName(volumeName);
yIssue.getStructure(YConstants.EXT_HIERARCHY_JOURNAL).addAncestor(ancestor);
yArticle.getStructure(YConstants.EXT_HIERARCHY_JOURNAL).addAncestor(ancestor);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
public static YStructure getOrCreateJournalStructure(YElement element) {
YStructure structure = element.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
if (structure == null) {
structure = new YStructure(YConstants.EXT_HIERARCHY_JOURNAL);
structure.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ARTICLE));
element.addStructure(structure);
}
return structure;
}
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
private void fillBookTitle(HtmlMetaHeaders headers, YElement yElement) {
YStructure booklStructure = yElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK);
YAncestor bookAncestor = booklStructure.getAncestor(HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK);
if (bookAncestor != null) {
headers.addMetadataName(WP_INBOOK_TITLE, bookAncestor.getOneName().getText());
}
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
private void updateIssue(ZentralBlattSoFieldParser.SoFieldData soData) {
if (soData.issue != null && soData.issue.length() > 0) {
YAncestor ancestor = new YAncestor(YConstants.EXT_LEVEL_JOURNAL_ISSUE); // TODO
// UID?
YName issueName = new YName(soData.issue);
yIssue.addName(issueName);
ancestor.setIdentity(yIssue.getId());
ancestor.addName(issueName);
yArticle.getStructure(YConstants.EXT_HIERARCHY_JOURNAL).addAncestor(ancestor);
}
}
内容来源于网络,如有侵权,请联系作者删除!