本文整理汇总了Java中no.priv.garshol.duke.Record.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java Record.getValue方法的具体用法?Java Record.getValue怎么用?Java Record.getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类no.priv.garshol.duke.Record
的用法示例。
在下文中一共展示了Record.getValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAssociationBetweenRecords
import no.priv.garshol.duke.Record; //导入方法依赖的package包/类
/**
* Creates an association and saves it in the DB.
*
* @param r1 first record which represents an item
* @param r2 second record which represents an item
* @param confidence associationValue
*/
public void createAssociationBetweenRecords(Record r1, Record r2, double confidence) {
Date execution = new Date();
ItemAssocVO<Integer, Integer> itemAssoc = new ItemAssocVO<Integer, Integer>(
confTanantId,
new ItemVO(profileDukeGenerator.getTenantId(),
r1.getValue("ItemID"),
profileDukeGenerator.getItemType()),
assocType, confidence,
new ItemVO(profileDukeGenerator.getTenantId(),
r2.getValue("ItemID"),
profileDukeGenerator.getItemType()),
sourceType, "ProfileDuke Plugin", viewType, null, execution);
numberOfCreatedAssociations++;
itemAssocDAO.insertOrUpdateItemAssoc(itemAssoc);
}
示例2: index
import no.priv.garshol.duke.Record; //导入方法依赖的package包/类
/**
* Add the record to the index.
*/
@Override
public void index(Record record) {
if (this.client == null) {
this.init();
}
String id = null;
Map<String, Object> json = new HashMap<String, Object>();
for (String propname : record.getProperties()) {
Property prop = config.getPropertyByName(propname);
if (prop == null) {
throw new DukeConfigException("Record has property " + propname
+ " for which there is no configuration");
}
if (prop.isIdProperty()) {
id = record.getValue(propname);
} else {
Collection<String> values = record.getValues(propname);
if (values != null && !values.isEmpty()) {
if (values.size() == 1) {
json.put(propname, Iterables.get(values, 0));
} else {
json.put(propname, values);
}
}
}
}
this.addToIndex(id, json);
}
示例3: getId
import no.priv.garshol.duke.Record; //导入方法依赖的package包/类
private String getId(Record r) {
for (Property idprop : config.getIdentityProperties()) {
String v = r.getValue(idprop.getName());
if (v != null)
return v;
}
return null;
}
示例4: getid
import no.priv.garshol.duke.Record; //导入方法依赖的package包/类
private String getid(Record r) {
for (Property p : idprops) {
String v = r.getValue(p.getName());
if (v == null)
continue;
return v;
}
throw new DukeException("No identity for record " + r);
}
示例5: matches
import no.priv.garshol.duke.Record; //导入方法依赖的package包/类
@Override
public void matches(Record base, Record candidate, double confidence) {
String baseId = base.getValue(ID_PROP);
String candidateId = candidate.getValue(ID_PROP);
stitches.get(baseObjectRetriever.retrieve(baseId)).add(candidateObjectRetriever.retrieve(candidateId));
}
示例6: makeKey
import no.priv.garshol.duke.Record; //导入方法依赖的package包/类
public String makeKey(Record record) {
return record.getValue("NAME");
}
示例7: getid
import no.priv.garshol.duke.Record; //导入方法依赖的package包/类
private String getid(Record r) {
for (String propname : r.getProperties())
if (config.getPropertyByName(propname).isIdProperty())
return r.getValue(propname);
return null;
}