本文整理了Java中pl.edu.icm.model.bwmeta.y.YPerson.getNames()
方法的一些代码示例,展示了YPerson.getNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YPerson.getNames()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YPerson
类名称:YPerson
方法名:getNames
暂无
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
protected List<Statements> processPerson(YPerson item) {
List<Statements> retL = new LinkedList<Statements>();
if(!item.getNames().isEmpty()){
Statements s = new Statements();
s.setSubject(RelConstants.NS_PERSON+item.getId());
LinkedList<PredicateAndObject> pao = new LinkedList<PredicateAndObject>();
for(YName name : item.getNames()){
if(name.getType().equals("canonical"))
pao.add(new PredicateAndObject(RelConstants.RL_NAME,name.getText()));
else if(name.getType().equals("forenames")){
pao.add(new PredicateAndObject(RelConstants.RL_FORENAMES,name.getText().replace("[ \\\"]", "")));
}
else if(name.getType().equals("surname")){
pao.add(new PredicateAndObject(RelConstants.RL_SURNAME,name.getText().replace("[ \\\"]", "") ));
}
}
s.setContinuations(pao);
retL.add(s);
}else;
return retL;
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
protected List<Statements> processPerson(YPerson item) {
List<Statements> retL = new LinkedList<Statements>();
if(!item.getNames().isEmpty()){
Statements s = new Statements();
s.setSubject(RelConstants.NS_PERSON+item.getId());
LinkedList<PredicateAndObject> pao = new LinkedList<PredicateAndObject>();
for(YName name : item.getNames()){
if(name.getType().equals("canonical"))
pao.add(new PredicateAndObject(RelConstants.RL_NAME,name.getText()));
else if(name.getType().equals("forenames")){
pao.add(new PredicateAndObject(RelConstants.RL_FORENAMES,name.getText().replace("[ \\\"]", "")));
}
else if(name.getType().equals("surname")){
pao.add(new PredicateAndObject(RelConstants.RL_SURNAME,name.getText().replace("[ \\\"]", "") ));
}
}
s.setContinuations(pao);
retL.add(s);
}else;
return retL;
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
protected List<Statements> processPerson(YPerson item) {
List<Statements> retL = new LinkedList<Statements>();
if(!item.getNames().isEmpty()){
Statements s = new Statements();
s.setSubject(RelConstants.NS_PERSON+item.getId());
LinkedList<PredicateAndObject> pao = new LinkedList<PredicateAndObject>();
for(YName name : item.getNames()){
if(name.getType().equals("canonical"))
pao.add(new PredicateAndObject(RelConstants.RL_NAME,NameProceeder.unifyCanonical(name.getText())));
else if(name.getType().equals("forenames")){
pao.add(new PredicateAndObject(RelConstants.RL_FORENAMES,NameProceeder.unifyForenames(name.getText())));
}
else if(name.getType().equals("surname")){
pao.add(new PredicateAndObject(RelConstants.RL_SURNAME,NameProceeder.unifySurname(name.getText())));
}
}
s.setContinuations(pao);
retL.add(s);
}else;
return retL;
}
}
内容来源于网络,如有侵权,请联系作者删除!