- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中pl.edu.icm.model.bwmeta.y.YCurrent.<init>()
方法的一些代码示例,展示了YCurrent.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YCurrent.<init>()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YCurrent
类名称:YCurrent
方法名:<init>
暂无
代码示例来源: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/yadda-polindex
/**
* Returns YCurrent object representing level of element in journal
* hierarchy. Method never returns null - if journal hierarchy level is not
* specified, empty YCurrent object is returned.
*/
public static YCurrent yCurrentInJournalHierarchy(final YElement element) {
YCurrent result = null;
final YStructure struct = element.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
if (struct != null) {
result = struct.getCurrent();
}
return result == null ? new YCurrent() : result;
}
代码示例来源: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/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 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.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.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 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.synat/synat-importer-direct
@Override
protected YCurrent getCurrent(PublicationMeta meta, YElement directAncestor) {
YCurrent current = new YCurrent();
switch (meta.getLevel().toLowerCase()) {
case WileyComponentConstants.PMETA_SERIES:
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_BOOK_SERIES);
break;
case WileyComponentConstants.PMETA_PRODUCT:
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK);
break;
case WileyComponentConstants.PMETA_PART:
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_BOOK_PART);
break;
case WileyComponentConstants.PMETA_UNIT:
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_BOOK_CHAPTER);
break;
default:
throw new ConfigurationException("Unknown level: " + meta.getLevel());
}
return current;
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
protected YStructure buildStructureFromParent(YElement parent, String hierarchy, String currentLevel) {
YStructure structure = new YStructure(hierarchy);
YCurrent current = new YCurrent(currentLevel);
structure.setCurrent(current);
if (parent != null) {
YStructure parentStructure = parent.getStructure(hierarchy);
structure.getAncestors().addAll(parentStructure.getAncestors());
YAncestor ancestor = new YAncestor(parentStructure.getCurrent().getLevel(), parent.getId());
ancestor.getNames().addAll(parent.getNames());
ancestor.getIds().addAll(parent.getIds());
structure.addAncestor(ancestor);
}
return structure;
}
代码示例来源: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.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);
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-importer-yadda
Collections.singletonList(id));
yElement.addContent(viedoContnentUrl);
YCurrent currentLevel = new YCurrent().setLevel(VideoConstants.VIDEO_CURRENT_LEVEL);
yElement.addStructure(new YStructure().setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_PUBLICATION).setCurrent(currentLevel));
NativeDocument nativeDocument = documentFactory.createDocument(recordId.getUid());
代码示例来源:origin: pl.edu.icm.synat/synat-importer-direct
@Override
protected YCurrent getCurrent(PublicationMeta meta, YElement directAncestor) {
YCurrent current = new YCurrent();
switch (meta.getLevel().toLowerCase()) {
case WileyComponentConstants.PMETA_SERIES:
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_SERIES);
break;
case WileyComponentConstants.PMETA_PRODUCT:
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_JOURNAL);
break;
case WileyComponentConstants.PMETA_PART:
String lastLevel = getLevel(directAncestor);
current.setLevel(getNextPartLevel(meta, lastLevel));
break;
case WileyComponentConstants.PMETA_UNIT:
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_ARTICLE);
break;
default:
throw new ConfigurationException("Unknown level: " + meta.getLevel());
}
return current;
}
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
/**
* Creates an element in the hierarchy.
*
* @param level hierarchy for the element
* @param level level for the element in the hierarchy
* @param name name to use as the canonical name of the element
* @param parent parent for the element in the hierarchy
* @param id eudml id
* @return the created element
*/
public YElement element(String hierarchy, String level, YName name, YElement parent, String id) {
YStructure ps = parent==null ? null : parent.getStructure(hierarchy);
YStructure struct = new YStructure(hierarchy).setCurrent(new YCurrent(level));
List<String> issns = parent==null ? null : parent.getIds(IdSchemaIds.EXT_SCHEME_ISSN);
String issn = (issns==null || issns.isEmpty()) ? null : issns.get(0);
if (ps != null) {
YAncestor ancestor = new YAncestor(ps.getCurrent().getLevel(), parent.getId()).addName(parent.getDefaultName());
if (StringUtils.isNotEmpty(issn)) {
ancestor.addId(new YId(IdSchemaIds.EXT_SCHEME_ISSN, issn));
}
struct.setAncestors(ps.getAncestors()).addAncestor(ancestor);
}
return new YElement(id).addName(name).addStructure(struct);
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
@Override
public YElement process(Book book, YElement parent, CrossrefIdGenerator generator) {
BookSeriesMetadata bookSeriesMetadata = book.getBookSeriesMetadata();
String id = generator.generateBookVolumeId(parent.getId(), bookSeriesMetadata.getVolume());
YElement element = new YElement();
element.setId(id);
element.addName(new YName(bookSeriesMetadata.getVolume()));
YStructure structure = new YStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK);
YCurrent current = new YCurrent(HierarchyWithLevelIds.EXT_LEVEL_BOOK_VOLUME);
structure.setCurrent(current);
structure.getAncestors().addAll(parent.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK).getAncestors());
element.addStructure(structure);
return element;
}
代码示例来源:origin: pl.edu.icm.synat/synat-importer-speech-to-text
private void prepareYElementFromApi(Video video, YElement yElement) throws ParseException {
yElement.addName(new YName(video.getSnippet().getTitle()));
yElement.addDescription(new YDescription(YLanguage.Undetermined, video.getSnippet().getDescription()
, DescriptionTypes.DS_SUMMARY));
prepareDate(video, yElement);
String license = video.getStatus().getLicense();
if(null != license && license.contains("creativeCommon")) {
yElement.addTagList(new YTagList().setType(YModelUtils.LICENSE).addValue("cc0"));
}
prepareContent(video, yElement);
List<String> tags = video.getSnippet().getTags();
if (CollectionUtils.isNotEmpty(tags)) {
yElement.addTagList(new YTagList().setType(TagTypes.TG_KEYWORD).setValues(tags));
}
YCurrent currentLevel = new YCurrent().setLevel(VideoConstants.VIDEO_CURRENT_LEVEL);
yElement.addStructure(new YStructure()
.setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_PUBLICATION)
.setCurrent(currentLevel));
prepareAttributes(video, yElement);
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
/**
* Creates an element in the hierarchy specified by the <code>hierarchy</code> property.
*
* @param level level for the element in the hierarchy
* @param name name to use as the canonical name of the element
* @param parent parent for the element in the hierarchy
* @return the created element
*/
public YElement element(String level, YName name, YElement parent) {
YStructure ps = parent.getStructure(getHierarchy());
YStructure struct = new YStructure(getHierarchy()).setCurrent(new YCurrent(level));
if (ps != null)
struct
.setAncestors(ps.getAncestors())
.addAncestor(
new YAncestor(ps.getCurrent().getLevel(), parent.getId())
.addName(parent.getDefaultName()));
return new YElement(
generateId(EXT_PREFIX_ELEMENT, parent, name))
.addName(name)
.addStructure(struct);
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
YCurrent current = new YCurrent();
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_YEAR);
structure.setCurrent(current);
我刚刚编写了这些代码,但输出不同。第二个代码的输出符合我的预期,但第一个代码的输出不正确。但为什么呢? def fib(n): x = 0 y = 1 print x
#include #include #define CUBE(y)y*(y*y) main() { int j; j = CUBE(-2+4);
这个问题在这里已经有了答案: Multiple assignment and evaluation order in Python (11 个答案) 关闭 1 年前。 我看到下面的代码,但不知道它做
我正在阅读 book , 并讲了 typeclass Eq 的定义 有两个功能== , /=在等式中,它们被实现为: x == y = not (x /= y) x /= y = not (
我最近参加了一个代码力量竞赛。在比赛的编辑部分,我看到了按位运算符之间的一种美妙关系,即 x + y = x & y + x |是的我还不知道证据。我拿了几个数字来看看这个等式是否正确。我很高兴知道这
我使用 CGRectMake(x,x,x,x) 在我的 View 中放置了一个按钮,当然 x 是位置和大小。当我使用 -(BOOL)shouldAutoRotate... 旋转 View 时,我想将按
this.x = (Math.random()*canvasWidth); this.y = (Math.random()*canvasHeight); (1) this.shift = {x: th
我想将此代码运行为“if 'Britain' or 'UK' in string do stuff, but don't do stuff if "Ex UK" 在字符串中": #Case insen
早上好,我是新来的,我带来了一个小问题。我无法针对以下问题开发有效的算法:我需要找到三个正数 x、y 和 z 的组合,以便 x + y、x - y、y + z、y - z、x + z 和 x - z
我现在正在使用 C++ 编写方案的解释器。我有一个关于定义和 lambda 的问题。 (define (add x y) (+ x y)) 扩展为 (define add (lambda (x y)
我正在尝试使用一台主机通过 FTP 将内容上传到另一台主机。 “我不会打开到 172.xxx.xxx.xxx(仅到 54.xxx.xxx.xxx)的连接”甚至不相关,因为我没有连接到那个主持人。这是托
在 Python 中,使用 [] 解包函数调用有什么区别? , 与 ()还是一无所有? def f(): return 0, 1 a, b = f() # 1 [a, b] = f() # 2
给定方程 z = z(x,y) 2 个表面 I和 II : z_I(x, y) = a0 + a1*y + a2*x + a3*y**2 + a4*x**2 + a5*x*y z_II(x, y)
几年前我有这个面试问题,但我还没有找到答案。 x 和 y 应该是什么才能形成无限循环? while (x = y && x != y) { } 我们尝试了 Nan,infinity+/-,null f
我正在尝试使用 Camel FTP Producer 将文件发送到第三方 ftp 服务器(似乎由 Amazon 托管),但遇到了一个问题,写入文件失败,并显示:文件操作失败...主机尝试数据连接 x.
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 8 年前。 Improve t
我正在使用 torch.tensor.repeat() x = torch.tensor([[1, 2, 3], [4, 5, 6]]) period = x.size(1) repeats = [1
#include int main() { int x = 9; int y = 2; int z = x - (x / y) * y; printf("%d", z
我很难理解先有定义然后有两个异或表达式的含义。这个定义的作用是什么? 我尝试发送 x=8, y=7,结果是 x=15 和 y=8为什么会这样? 这是程序: #define FUNC(a,b) a^=b
我正在尝试使用 SIMD 优化此功能,但我不知道从哪里开始。 long sum(int x,int y) { return x*x*x+y*y*y; } 反汇编函数如下所示: 4007a0
我是一名优秀的程序员,十分优秀!