- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContributor
类的一些代码示例,展示了YContributor
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YContributor
类的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YContributor
类名称:YContributor
暂无
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
private static void proceedAffiliationRefs(YContributor yc,
LinkedList<PredicateAndObject> pao, YElement in_item) {
if(!yc.getAffiliationRefs().isEmpty())
for(String ya : yc.getAffiliationRefs())
pao.add(new PredicateAndObject(RelConstants.RL_IS_AFFILIATED_WITH_ID,ya));
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
protected boolean isVisible(final YContributor contributor) {
if (contributor.getRole() == null) {
return allowedRoles == null;
}
if (allowedRoles != null && !ArrayUtils.contains(allowedRoles, contributor.getRole())) {
return false;
}
if (ignoredRoles != null && ArrayUtils.contains(ignoredRoles, contributor.getRole())) {
return false;
}
return true;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-client-common-api
private String getContributorFirstName(final YContributor cont) {
if (cont.getOneName(YConstants.NM_FORENAMES) != null) {
return cont.getOneName(YConstants.NM_FORENAMES).getText();
}
final YAttribute person = cont.getOneAttribute(YConstants.AT_CONTRIBUTOR_PERSON);
if (person != null) {
return person.getOneAttributeSimpleValue(YConstants.AT_CONTRIBUTOR_PERSON_FIRSTNAME);
} else {
return cont.getOneAttributeSimpleValue(YConstants.AT_CONTRIBUTOR_PERSON_FIRSTNAME);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-client-common-api
private CONTRIBUTOR_TYPE detectContributorType(final YContributor cont) {
CONTRIBUTOR_TYPE type = CONTRIBUTOR_TYPE.UNKNOWN;
if (cont.isPerson()) {
type = CONTRIBUTOR_TYPE.PERSON;
} else if (cont.isInstitution()) {
type = CONTRIBUTOR_TYPE.INSTITUTION;
}
return type;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
private static void proceedInstitutions(YContributor yc,
LinkedList<PredicateAndObject> pao) {
if(yc.isInstitution()){
if (yc.getIdentity()!=null & ! yc.getIdentity().isEmpty())
pao.add(new PredicateAndObject(RelConstants.RL_IS_INSTITUTION,RelConstants.NS_INSTITUTION+yc.getIdentity()));
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
for(YAttribute ya : yc.getAttributes(YConstants.AT_CONTACT_EMAIL))
pao.add(new PredicateAndObject(RelConstants.RL_CONTACT_EMAIL,ya.getValue()));
String zblfingerprint = yc.getOneAttributeSimpleValue(YConstants.AT_ZBL_AUTHOR_FINGERPRINT);
if(zblfingerprint!=null && !zblfingerprint.isEmpty()){
pao.add(new PredicateAndObject(RelConstants.RL_IS_PERSON, RelConstants.NS_ZBL_PERSON + zblfingerprint));
if(!yc.getRole().isEmpty())
pao.add(new PredicateAndObject(RelConstants.RL_HAS_ROLE,yc.getRole()));
if(!yc.getIdentity().isEmpty())
pao.add(new PredicateAndObject(RelConstants.RL_IS_PERSON,RelConstants.NS_PERSON+yc.getIdentity()));
if(!yc.getNames().isEmpty()){
String sname = "";
String fname = "";
String cname = null;
for(YName yn : yc.getNames()){
if("canonical".equals(yn.getType())){
cname = yn.getText().trim();
if(yc.isInstitution()){
if (yc.getIdentity()!=null & ! yc.getIdentity().isEmpty())
pao.add(new PredicateAndObject(RelConstants.RL_IS_INSTITUTION,RelConstants.NS_INSTITUTION+yc.getIdentity()));
if(yc.getAffiliationRefs().isEmpty()){
for(String ya : yc.getAffiliationRefs()){
int aff_inner=0;
for(YAffiliation a : in_item.getAffiliations()){
代码示例来源:origin: pl.edu.icm.synat/synat-importer-direct
YContributor cont = new YContributor();
ret.add(cont);
if (StringUtils.isNotBlank(cret.getCreatorRole())) {
switch (cret.getCreatorRole().toLowerCase()) {
case "author":
cont.setRole(ContributorRoles.CR_AUTHOR);
break;
case "editor":
cont.setRole(ContributorRoles.CR_EDITOR);
break;
default:
buildPersonContributor(cont, name);
} else if (name instanceof UnparsedName) {
cont.addName(new YName(((UnparsedName) name).getvalue()));
cont.setInstitution(false);
} else if (name instanceof GroupName) {
cont.addName(new YName(((GroupName) name).getvalue()));
cont.setInstitution(true);
String foreNames = YModelUtils.getNameByType(cont, NameTypes.NM_FORENAMES);
canonical.add(foreNames);
YAttribute fmPrefix = cont.getOneAttribute(WileyComponentConstants.WILEY_ATT_FAMILY_NAME_PREFIX);
if (fmPrefix != null) {
canonical.add(fmPrefix.getValue());
name.setText(canonicalName);
name.setType(NameTypes.NM_CANONICAL);
cont.addName(name);
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
String fname = null;
String cname = null;
for(YName name : nc.getNames()){
if("canonical".equals(name.getType())) cname = name.getText();
else if("forenames".equals(name.getType())) fname = name.getText();
if(sname!=null && zblc.getOneName("surname")!=null && sname.equals(zblc.getOneName("surname").getText())){
if(zblc.getOneName("forenames").getText().split(" ").length >fname.split(" ").length){
fname = zblc.getOneName("forenames").getText();
YName fn = new YName(fname);
fn.setType("forenames");
ynames.add(sn);
ynames.add(cn);
nc.setNames(ynames);
for(YAttribute a : zblc.getAttributes(YConstants.AT_ZBL_AUTHOR_FINGERPRINT)){
nc.addAttribute(a);
代码示例来源:origin: pl.edu.icm.synat/synat-process-common
if (CollectionUtils.isNotEmpty(removedAffiliations) && CollectionUtils.isNotEmpty(contributor.getAffiliationRefs())) {
contributor.getAffiliationRefs().removeAll(removedAffiliations);
for (YName name : contributor.getNames()) {
String cleared = name.getText();
for (String pattern : PATTERNS_TO_REMOVE) {
final String email = contributor.getOneAttributeSimpleValue(CommonAttributeTypes.AT_CONTACT_EMAIL);
if (StringUtils.isNotBlank(email)) {
final String newEmail = StringUtils.removePattern(email, "E[-]?mail:");
if (!StringUtils.equals(email, newEmail)) {
Iterator<YAttribute> itr = contributor.getAttributes().iterator();
while (itr.hasNext()) {
if (CommonAttributeTypes.AT_CONTACT_EMAIL.equals(itr.next().getKey())) {
contributor.addAttribute(CommonAttributeTypes.AT_CONTACT_EMAIL, newEmail);
modify = true;
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
if(!yc.getRole().isEmpty())
pao.add(new PredicateAndObject(RelConstants.RL_HAS_ROLE,yc.getRole()));
if(!yc.getIdentity().isEmpty())
pao.add(new PredicateAndObject(RelConstants.RL_IS_PERSON,RelConstants.NS_PERSON+yc.getIdentity()));
if(!yc.getNames().isEmpty()){
String sname = "";
String fname = "";
String cname = null;
for(YName yn : yc.getNames()){
if("canonical".equals(yn.getType())){//TODO czy zapamietujemy CANONICAL? nie ma go celowo w RelConstants?
cname = yn.getText();
if(yc.isInstitution()){
if (yc.getIdentity()!=null & ! yc.getIdentity().isEmpty())
pao.add(new PredicateAndObject(RelConstants.RL_IS_INSTITUTION,RelConstants.NS_INSTITUTION+yc.getIdentity()));
if(yc.getAffiliationRefs().isEmpty()){
for(String ya : yc.getAffiliationRefs()){
int aff_inner=0;
for(YAffiliation a : item.getAffiliations()){
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
id = identity;
} else {
id = (contributor.isPerson()) ? BwmetaContributorUtils.buildContributorId(documentId, contributor) : null;
personPortalRole = PersonPortalRole.PERSON;
for (String ref : contributor.getAffiliationRefs()) {
if (StringUtils.isNotBlank(ref)) {
if (affiliationsMap.containsKey(ref)) {
final String email = contributor.getOneAttributeSimpleValue(CommonAttributeTypes.AT_CONTACT_EMAIL);
final ContributorData personData;
if(StringUtils.isNotBlank(canonicalName)){
personData = new ContributorData(id, canonicalName, personPortalRole, contributor.getRole());
} else if (StringUtils.isNotBlank(surname) && StringUtils.isNotBlank(nameName)) {
personData = new ContributorData(id, nameName, surname, personPortalRole, contributor.getRole());
}else {
final String description = YModelUtils.getDefaultDescription(contributor);
personData = new ContributorData(id, name, description, personPortalRole, contributor.getRole());
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
if (StringUtils.isNotEmpty(canonicalName)){
if (contributorRoles.contains(ctValue)) {
YContributor cont=new YContributor(ctValue, false).
addName(y.canonicalName(YLanguage.NoLinguisticContent, canonicalName))
.addName(y.name(YLanguage.NoLinguisticContent, surname, NameTypes.NM_SURNAME))
.addName(y.name(YLanguage.NoLinguisticContent, forenames, NameTypes.NM_FORENAMES))
.addAttribute(CommonAttributeTypes.AT_CONTACT_EMAIL, JDOMHelper.toNull(JDOMHelper.getTextTrim(JDOMHelper.optDescendant(c, "email"))))
.addAffiliationRef(aref);
for (String a:aRefs){
cont.addAffiliationRef(a);
YContributor cont=new YContributor(ContributorRoles.CR_OTHER, false)
.addName(y.canonicalName(YLanguage.NoLinguisticContent, canonicalName))
.addName(y.name(YLanguage.NoLinguisticContent, surname, NameTypes.NM_SURNAME))
.addName(y.name(YLanguage.NoLinguisticContent, forenames, NameTypes.NM_FORENAMES))
.addAttribute(CommonAttributeTypes.AT_CONTACT_EMAIL, JDOMHelper.toNull(JDOMHelper.getTextTrim(JDOMHelper.optDescendant(c, "email"))))
.addAffiliationRef(aref);
for (String a:aRefs){
cont.addAffiliationRef(a);
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
private static void putAuthor(YElement element, String author, List<String> refs) {
author = author.replaceAll(" +\\.", ".");
YName name = new YName().setType(YConstants.NM_CANONICAL).setText(author);
YContributor contributor = new YContributor().setRole(YConstants.CR_AUTHOR).addName(name);
for (String ref : refs) {
if (ref.equals("*") || ref.equals("†")) {
// Currently nothing is done
} else {
String id = Enhancers.affiliationIdFromIndex(ref);
if (element.getAffiliation(id) != null) {
contributor.addAffiliationRef(id);
}
}
}
element.addContributor(contributor);
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
/**
* Processes <code>journal-meta</code> metadata creating a publisher element.
*
* @param jmeta the metadata element to extract publisher info from
* @return the created publisher element
*/
private YElement processPublisher(Element jmeta) {
YName pname = y.canonicalName(YLanguage.Undetermined, getTextTrim(optDescendant(jmeta, "publisher", "publisher-name")));
// TODO: add publisher-loc
return y.element(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_PUBLISHER, pname, ROOT).addContributor(new YContributor(ContributorRoles.CR_PUBLISHER, true).addName(pname));
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
public void updateElementPublisher(org.jdom.Element jmeta, YElement journal) {
YName pname = y.canonicalName(YLanguage.Undetermined,
JDOMHelper.getTextTrim(JDOMHelper.optDescendant(jmeta, "publisher", "publisher-name")));
String loc = JDOMHelper.getTextTrim(JDOMHelper.optDescendant(jmeta, "publisher", "publisher-loc"));
journal.addContributor(new YContributor(ContributorRoles.CR_PUBLISHER, true).addName(pname).addAttribute(NlmToYConstants.AT_PUBLISHER_LOCATION, loc));
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
public EditorialOfficeInfo getEditorialOfficeInfo(AbstractElementInfo<?> abstractElementInfo) {
List<YContributor> contributors = abstractElementInfo.getContributors();
if (contributors != null) {
for (YContributor contributor : contributors) {
if (contributor.isInstitution() &&
ContributorConstants.ROLE_EDITORIAL_OFFICE.equals(contributor.getRole())) {
YAttribute institution = contributor.getOneAttribute(YConstants.AT_INSTITUTION);
if (institution != null) {
String email = elementAttributesExtractor.getInstitutionEmail(institution);
String www = elementAttributesExtractor.getInstitutionWWW(institution);
return new EditorialOfficeInfo(email, www);
}
}
}
}
return null;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-client-common
private YContributor createYContributor(Map<String, String> contributorInfoMap) {
Map<String, String> cim = contributorInfoMap;
YContributor yc = new YContributor();
if(cim.get("forenames")!=null)
namelist.add(new YName(cim.get("forenames")));
yc.setNames(namelist);
if(cim.get("affil")!=null){
affil.add(cim.get("affil"));
yc.setAffiliationRefs(affil);
yc.setIdentity(cim.get("personId"));
if(cim.get("contrib")!=null) yc.setContributorId(cim.get("contrib"));
yc.setInstitution(true);
else
yc.setInstitution(false);
if(cim.get("role")!=null) yc.setRole(cim.get("role"));
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
public void updateArticleInBookWithBookMeta(Element bmeta, final YElement article) {
YDate date = article.getDate(DateTypes.DT_PUBLISHED);
if (date == null) {
updater.updateElementPubdate(bmeta, article);
}
boolean noPublisher = true;
List<YContributor> yContributorList = article.getContributors();
List<YContributor> yPublisherList = new ArrayList<YContributor>();
for (YContributor yContributor : yContributorList) {
if (yContributor.getRole().equals(ContributorRoles.CR_PUBLISHER)) {
yPublisherList.add(yContributor);
}
}
if (!yPublisherList.isEmpty()) {
String publisher = yPublisherList.get(0).getOneName(NameTypes.NM_CANONICAL).getText();
String location = yPublisherList.get(0).getOneAttributeSimpleValue(NlmToYConstants.AT_PUBLISHER_LOCATION);
if (publisher != null && location != null) {
noPublisher = false;
}
}
if (noPublisher) {
updater.updateElementPublisher(bmeta, article);
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
public void convertContributors(BibEntry source, YElement yElement) {
List<YContributor> yContributors = new ArrayList();
//authors
List<YContributor> yAuthors = parseBibEntryPersons(source.getAllFieldValues(BibEntry.FIELD_AUTHOR), YConstants.CR_AUTHOR);
//editors
List<YContributor> yEditors = parseBibEntryPersons(source.getAllFieldValues(BibEntry.FIELD_EDITOR), YConstants.CR_EDITOR);
yContributors.addAll(yAuthors);
yContributors.addAll(yEditors);
//publisher
if (source.getFirstFieldValue(BibEntry.FIELD_ADDRESS) != null
&& source.getFirstFieldValue(BibEntry.FIELD_PUBLISHER) != null) {
String publisher = source.getFirstFieldValue(BibEntry.FIELD_PUBLISHER);
String address = source.getFirstFieldValue(BibEntry.FIELD_ADDRESS);
YContributor yPublisher = new YContributor();
yPublisher.setRole(YConstants.CR_PUBLISHER);
yPublisher.addName(new YName().setType(YConstants.NM_CANONICAL).setText(publisher));
yPublisher.addAttribute(YConstants.AT_ADDRESS_CITY, address);
yContributors.add(yPublisher);
}
yElement.setContributors(yContributors);
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
if (yContributor.getRole().equals(YConstants.CR_AUTHOR)) {
yAuthorList.add(yContributor);
if (yContributor.getRole().equals(YConstants.CR_EDITOR)) {
yEditorList.add(yContributor);
if (yContributor.getRole().equals(YConstants.CR_PUBLISHER)) {
yPublisherList.add(yContributor);
bibEntry.setField(BibEntry.FIELD_PUBLISHER, yPublisherList.get(0).getOneName(YConstants.NM_CANONICAL).getText());
if (yPublisherList.get(0).getOneAttribute(YConstants.AT_ADDRESS_CITY) != null) {
String address = yPublisherList.get(0).getOneAttribute(YConstants.AT_ADDRESS_CITY).getValue();
bibEntry.setField(BibEntry.FIELD_ADDRESS, address);
我刚刚编写了这些代码,但输出不同。第二个代码的输出符合我的预期,但第一个代码的输出不正确。但为什么呢? 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
我是一名优秀的程序员,十分优秀!