blob: f9d71f03972c9aa12c894be0a5e21ba1c5f74976 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition;
import com.yahoo.document.Field;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.document.SDField;
/**
* @author Einar M R Rosenvinge
*/
public class FieldOperationApplier {
public void process(SDDocumentType sdoc) {
if (!sdoc.isStruct()) {
apply(sdoc);
}
}
protected void apply(SDDocumentType type) {
for (Field field : type.fieldSet()) {
apply(field);
}
}
protected void apply(Field field) {
if (field instanceof SDField) {
SDField sdField = (SDField) field;
sdField.applyOperations();
}
}
}
|