当前位置: 首页>>代码示例>>Java>>正文


Java RecordImpl.addValue方法代码示例

本文整理汇总了Java中no.priv.garshol.duke.RecordImpl.addValue方法的典型用法代码示例。如果您正苦于以下问题:Java RecordImpl.addValue方法的具体用法?Java RecordImpl.addValue怎么用?Java RecordImpl.addValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在no.priv.garshol.duke.RecordImpl的用法示例。


在下文中一共展示了RecordImpl.addValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

import no.priv.garshol.duke.RecordImpl; //导入方法依赖的package包/类
public void run(String[] argv)
  throws IOException, SAXException {
  Collection<CommandLineParser.Option> options =
    Collections.singleton((CommandLineParser.Option) new CommandLineParser.StringOption("maxhits", 'H'));
  argv = init(argv, 3, 3, options);
  int max_hits = 10000;
  if (parser.getOptionValue("maxhits") != null)
    max_hits = Integer.parseInt(parser.getOptionValue("maxhits"));

  // build record
  RecordImpl prototype = new RecordImpl();
  prototype.addValue(argv[1], argv[2]);

  // search
  Collection<Record> records = database.findCandidateMatches(prototype);
  int hitno = 1;
  for (Record record : records) {
    PrintMatchListener.prettyPrint(record, config.getProperties());
    System.out.println();
    if (hitno++ == max_hits)
      break;
  }
}
 
开发者ID:enricopal,项目名称:STEM,代码行数:24,代码来源:RecordSearch.java

示例2: convertToRecord

import no.priv.garshol.duke.RecordImpl; //导入方法依赖的package包/类
/**
 * Helper method which receives an <tt>HpCloudItem</tt> and creates a new <tt>Record</tt> to be
 * used by Duke.
 *
 * @param item The object where the properties' values are going to be read from.
 * @return A <tt>Record</tt> containing all the properties specified in the constructor of this
 *         class.
 */
protected Record convertToRecord(final T item) {
    RecordImpl newRecord = new RecordImpl();

    // This method is called from a parallelised one. Hence, there is no need for this one to be
    // parallelised.
    for (String property : propertiesInfo.keySet()) {
        String value = item.getCore().getAttributeAsString(propertiesInfo.get(property));
        newRecord.addValue(property, value);
    }

    return newRecord;
}
 
开发者ID:HewlettPackard,项目名称:loom,代码行数:21,代码来源:HpCloudDataSource.java

示例3: addValue

import no.priv.garshol.duke.RecordImpl; //导入方法依赖的package包/类
private void addValue(RecordImpl record, String subject,
                      String property, String object) {
  if (record.isEmpty())
    for (Column idcol : columns.get("?uri"))
      record.addValue(idcol.getProperty(), subject);

  record.addValue(property, object);      
}
 
开发者ID:enricopal,项目名称:STEM,代码行数:9,代码来源:NTriplesDataSource.java


注:本文中的no.priv.garshol.duke.RecordImpl.addValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。