本文整理了Java中com.hurence.logisland.record.Record.getAllFields
方法的一些代码示例,展示了Record.getAllFields
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.getAllFields
方法的具体详情如下:
包路径:com.hurence.logisland.record.Record
类名称:Record
方法名:getAllFields
暂无
代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin
@Override
public Collection<Record> process(ProcessContext context, Collection<Record> records) {
try {
List<String> fieldsToRemove = Lists.newArrayList(
context.getPropertyValue(FIELDS_TO_REMOVE).asString().split(","));
for (Record record : records) {
new ArrayList<>(record.getAllFields()).forEach(field -> {
String fieldName = field.getName();
if (fieldsToRemove.contains(fieldName)) {
record.removeField(fieldName);
}
});
}
} catch (Exception ex) {
logger.warn("issue while trying to remove field list {} : {}",
context.getPropertyValue(FIELDS_TO_REMOVE).asString(),
ex.toString());
}
return records;
}
代码示例来源:origin: com.hurence.logisland/logisland-solr-client-service-api
public SolrInputDocument toSolrInputDocument(Record record, String uniqueKey) {
SolrInputDocument document = createNewSolrInputDocument();
document.addField(uniqueKey, record.getId());
for (Field field : record.getAllFields()) {
if (field.isReserved()) {
continue;
}
document.addField(field.getName(), field.getRawValue());
}
return document;
}
代码示例来源:origin: com.hurence.logisland/logisland-common-processors-plugin
List<Field> leafFields = rootRecord.getAllFields().stream()
.filter(field -> field.getType().equals(FieldType.RECORD) &&
!field.getName().equals(FieldDictionary.RECORD_TYPE) &&
.collect(Collectors.toList());
List<Field> rootFields = rootRecord.getAllFields().stream()
.filter(field -> !field.getType().equals(FieldType.RECORD))
.collect(Collectors.toList());
内容来源于网络,如有侵权,请联系作者删除!