blob: cdd089d9bf70c66508995e7b0a17741ccf25d92d (
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
|
// 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 <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
*/
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();
}
}
}
|