Example #1
0
  @Override
  public Map<SchemaId, Object> getFieldsById() {
    Map<QName, Object> fields = record.getFields();
    Map<SchemaId, Object> fieldsById = new HashMap<SchemaId, Object>(fields.size());

    for (Map.Entry<SchemaId, QName> entry : mapping.entrySet()) {
      Object value = fields.get(entry.getValue());
      if (value != null) {
        fieldsById.put(entry.getKey(), value);
      }
    }

    return fieldsById;
  }
Example #2
0
 @Override
 public Map<QName, Object> getFields() {
   return record.getFields();
 }