pl.edu.icm.model.bwmeta.y.YPerson.getNames()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(90)

本文整理了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

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;
  }
}

相关文章

YPerson类方法