- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中pl.edu.icm.model.bwmeta.y.YRelation.<init>()
方法的一些代码示例,展示了YRelation.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YRelation.<init>()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YRelation
类名称:YRelation
方法名:<init>
暂无
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private static void replaceReferencesField(final YElement yElement, final String[] values) {
final List<YRelation> relations = yElement.getRelations();
final List<YRelation> referenceRelations = yElement.getRelations(YConstants.RL_REFERENCE_TO);
relations.removeAll(referenceRelations); // clean existing
for (final String value : values) {
final YRelation rel = new YRelation();
rel.setType(YConstants.RL_REFERENCE_TO);
rel.addAttribute(YConstants.AT_REFERENCE_TEXT, value);
relations.add(rel);
}
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
private List<YRelation> addNewReferencesToRelations(List<ReferenceInfo> references, List<YRelation> yRelations) {
int sequenceNumber = 0;
for (ReferenceInfo reference : references) {
YRelation relation = new YRelation();
relation.setType(YConstants.RL_REFERENCE_TO);
relation.addAttribute(YConstants.AT_REFERENCE_TEXT, reference.getText());
relation.addAttribute(YConstants.AT_REFERENCE_NUMBER, Integer.toString(sequenceNumber));
yRelations.add(relation);
++sequenceNumber;
}
return yRelations;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
public YRelation parse(String text) {
Node n = parser.parse(text);
if (n == null)
return null;
if (!"citation".equals(n.getName()))
throw new IllegalStateException("Unexpected node name");
YRelation yr = new YRelation();
yr.addAttribute(new YAttribute(YConstants.AT_REFERENCE_TEXT,text));
processReference(n, yr);
return yr;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private List<YRelation> toYRelations(final List<DocReference> references) {
final List<YRelation> relationsFromMetadata = new ArrayList<YRelation>();
for (final DocReference reference : references) {
final YRelation yRelation = new YRelation();
yRelation.setType(YConstants.RL_REFERENCE_TO);
yRelation.addAttribute(YConstants.AT_REFERENCE_TEXT, reference.getText());
final List<DocId> hits = reference.getMatches();
if (hits != null && !hits.isEmpty()) {
final DocId match = hits.get(0);
yRelation.setTarget(new YId(match.getDomain(), match.getId()));
if (hits.size() > 1) {
log.info(
"There are several documents matching reference {} of document {}. Presenting only first. All found:{}.",
new Object[] { reference.getText(), id, hits });
}
}
relationsFromMetadata.add(yRelation);
}
return relationsFromMetadata;
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
private YElement buildBookSeriesElement(SeriesMetadata seriesMetadata, YElement conferenceEventElement, CrossrefIdGenerator generator) {
YElement element = new YElement();
extractSeriesMetadata(null, generator, element, seriesMetadata);
YRelation proceedingsRelation = new YRelation(RelationTypes.RL_PROCEEDINGS_OF, new YId(StringUtils.EMPTY, conferenceEventElement.getId()));
element.getRelations().add(proceedingsRelation);
return element;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
String referenceString = text;
YRelation parsed = new YRelation();
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
public void updateElementExtLinks(org.jdom.Element ameta, YElement article) {
List<org.jdom.Element> extLinks = JDOMHelper.getChildren(ameta, "ext-link");
YRelation relation = new YRelation().setType(RelationTypes.RL_SAME_AS);
for (org.jdom.Element extLink : extLinks) {
String href = extLink.getAttributeValue("href", XLINK_NAMESPACE);
if ("mr-item-id".equals(extLink.getAttributeValue("ext-link-type"))) {
article.addId(new YId(IdSchemaIds.EXT_SCHEMA_MR, extLink.getTextTrim()));
if (JDOMHelper.toNull(href) != null) {
relation.addAttribute(JatsSpecificAttributeTypes.AT_NLM_ARTICLE_MR_URL, href);
}
} else if ("zbl-item-id".equals(extLink.getAttributeValue("ext-link-type"))) {
article.addId(new YId(IdSchemaIds.EXT_SCHEME_ZBL, extLink.getTextTrim()));
if (JDOMHelper.toNull(href) != null) {
relation.addAttribute(JatsSpecificAttributeTypes.AT_NLM_ARTICLE_ZBL_URL, href);
}
}
}
if (relation.getAttributes().size() > 0) {
article.addRelation(relation);
}
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
private void appendBibliography(ResourceData resource, YElement yElement) {
if (!resource.getBibliography().isEmpty()) {
for (BibliographyReference bib : resource.getBibliography()) {
YRelation relation = new YRelation();
relation.setType(RelationTypes.RL_REFERENCE_TO);
relation.addAttribute(ReferenceAttributeTypes.AT_REFERENCE_TEXT, bib.getText());
if (StringUtils.isNotBlank(bib.getAssignedId())) {
relation.setTarget(new YId(IdSchemaIds.EXT_SCHEME_YADDA, bib.getAssignedId()));
}
yElement.addRelation(relation);
}
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-process-common
private void addTitleList(YElement element, List<TitleHistoryElement> titles, String relationType) {
for (TitleHistoryElement titleHistoryElement : titles) {
YRelation relation = new YRelation();
relation.setType(relationType);
if (titleHistoryElement.getId() != null) {
relation.setTarget(new YId(IdSchemaIds.EXT_SCHEME_YADDA, titleHistoryElement.getId()));
} else if (titleHistoryElement.getIssn() != null) {
relation.setTarget(new YId(IdSchemaIds.EXT_SCHEME_ISSN, titleHistoryElement.getIssn()));
}
String dateRange = titleHistoryElement.getDateRange();
if (StringUtils.isNotBlank(dateRange)) {
relation.addAttribute(ReferenceAttributeTypes.AT_REFERENCE_PARSED_DATE, dateRange);
}
String title = titleHistoryElement.getTitleName();
if (StringUtils.isNotBlank(title)) {
relation.addAttribute(ReferenceAttributeTypes.AT_REFERENCE_PARSED_TITLE, title);
}
element.addRelation(relation);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
@Override
public EnrichedPayload<YElement> process(EnrichedPayload<BxDocument> input, ProcessContext ctx) throws Exception {
YElement yElement = metadataExtractor.extractMetadata(input.getObject());
String[] references = bibReferenceExtractor.extractBibReferences(input.getObject());
for(String reference : references) {
YRelation yRelation = new YRelation().setType(YConstants.RL_REFERENCE_TO);
yRelation.addAttribute(YConstants.AT_REFERENCE_TEXT, reference);
yElement.addRelation(yRelation);
}
return new EnrichedPayload(input.getId(), yElement, input.getCollections(), input.getLicenses());
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
private YElement buildBookElementFromProceedings(ProceedingsMetadata proceedingsMetadata, YElement conferenceEventElement, YElement seriesElement,
CrossrefIdGenerator generator) {
YElement bookElement = new YElement();
if (seriesElement == null) {
YRelation proceedingsRelation = new YRelation(RelationTypes.RL_PROCEEDINGS_OF, new YId(StringUtils.EMPTY, conferenceEventElement.getId()));
bookElement.getRelations().add(proceedingsRelation);
bookElement.addStructure(buildStructureFromParent(null, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK, HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK));
} else {
bookElement.addStructure(buildStructureFromParent(seriesElement, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK,
HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK));
}
bookElement.getNames().add(new YName(proceedingsMetadata.getProceedingsTitle()));
bookElement.getDates().addAll(convertDates(proceedingsMetadata.getPublicationDates()));
bookElement.getIds().addAll(convertIsbns(proceedingsMetadata.getIsbns()));
bookElement.getIds().addAll(convertIssns(proceedingsMetadata.getIssns()));
if (StringUtils.isNotBlank(proceedingsMetadata.getProceedingsSubject())) {
YName subject = new YName(proceedingsMetadata.getProceedingsSubject());
subject.setType(NameTypes.NM_SUBTITLE);
bookElement.addName(subject);
}
if (proceedingsMetadata.getDoiData() != null) {
bookElement.getIds().add(new YId(IdSchemaIds.EXT_SCHEME_DOI, proceedingsMetadata.getDoiData().getDoi()));
}
String id = generator.generateBookId(bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_DOI),
bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_ISBN), bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_EISBN),
getDefaultName(bookElement));
bookElement.setId(id);
return bookElement;
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
text = formatElementCitation(ref.getChild("element-citation"));
article.addRelation(new YRelation().setType(RelationTypes.RL_REFERENCE_TO).addAttribute(ReferenceAttributeTypes.AT_REFERENCE_TEXT, text));
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
YRelation relation = new YRelation().setType(RL_REFERENCE_TO);
org.jdom.Element mc = ref.getChild("mixed-citation");
if (mc != null) {
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
YRelation yr = new YRelation();
yr.setType(RelationTypes.RL_REFERENCE_TO);
if (StringUtils.isNotBlank(rt.getPolindexId())) {
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
public void updateArticleRefs(org.jdom.Element reflist, YElement article) {
List<org.jdom.Element> refs = JDOMHelper.optChildren(reflist, "ref");
for (org.jdom.Element ref : refs) {
YRelation relation = new YRelation().setType(RelationTypes.RL_REFERENCE_TO);
org.jdom.Element mc = JDOMHelper.getChild(ref, "mixed-citation");
if (mc==null) {
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
target.setValue(citation.getDoi());
YRelation relation = new YRelation(RelationTypes.RL_REFERENCE_TO, target);
if (citation.getUnstructuredCitation() != null) {
YRichText richContent = convertText(citation.getUnstructuredCitation().getContent());
本文整理了Java中pl.edu.icm.model.bwmeta.YElement类的一些代码示例,展示了YElement类的具体用法。这些代码示例主要来源于Github/Stackoverflow
本文整理了Java中pl.edu.icm.model.bwmeta.YContributor类的一些代码示例,展示了YContributor类的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContentFile类的一些代码示例,展示了YContentFile类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription类的一些代码示例,展示了YDescription类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YCurrent类的一些代码示例,展示了YCurrent类的具体用法。这些代码示例主要来源于Github/Stackoverfl
本文整理了Java中pl.edu.icm.model.bwmeta.y.YName类的一些代码示例,展示了YName类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
本文整理了Java中pl.edu.icm.model.bwmeta.y.YStructure类的一些代码示例,展示了YStructure类的具体用法。这些代码示例主要来源于Github/Stackov
本文整理了Java中pl.edu.icm.model.bwmeta.y.YElement类的一些代码示例,展示了YElement类的具体用法。这些代码示例主要来源于Github/Stackoverfl
本文整理了Java中pl.edu.icm.model.bwmeta.y.YCategoryRef类的一些代码示例,展示了YCategoryRef类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContentDirectory类的一些代码示例,展示了YContentDirectory类的具体用法。这些代码示例主要来源于
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContentEntry类的一些代码示例,展示了YContentEntry类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中pl.edu.icm.model.bwmeta.y.YId类的一些代码示例,展示了YId类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平
本文整理了Java中pl.edu.icm.model.bwmeta.y.YRelation类的一些代码示例,展示了YRelation类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中pl.edu.icm.model.bwmeta.y.YAncestor类的一些代码示例,展示了YAncestor类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中pl.edu.icm.model.bwmeta.y.YAffiliation类的一些代码示例,展示了YAffiliation类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDate类的一些代码示例,展示了YDate类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
本文整理了Java中pl.edu.icm.model.bwmeta.y.YLanguage类的一些代码示例,展示了YLanguage类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContributor类的一些代码示例,展示了YContributor类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YTagList类的一些代码示例,展示了YTagList类的具体用法。这些代码示例主要来源于Github/Stackoverfl
本文整理了Java中pl.edu.icm.model.bwmeta.y.YAttribute类的一些代码示例,展示了YAttribute类的具体用法。这些代码示例主要来源于Github/Stackov
我是一名优秀的程序员,十分优秀!