summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/schema/fieldoperation/NormalizingOperation.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/fieldoperation/NormalizingOperation.java')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/fieldoperation/NormalizingOperation.java34
1 files changed, 0 insertions, 34 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/fieldoperation/NormalizingOperation.java b/config-model/src/main/java/com/yahoo/schema/fieldoperation/NormalizingOperation.java
deleted file mode 100644
index 561c5b87899..00000000000
--- a/config-model/src/main/java/com/yahoo/schema/fieldoperation/NormalizingOperation.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.schema.fieldoperation;
-
-import com.yahoo.schema.document.NormalizeLevel;
-import com.yahoo.schema.document.SDField;
-
-/**
- * @author Einar M R Rosenvinge
- */
-public class NormalizingOperation implements FieldOperation {
-
- private final NormalizeLevel.Level level;
-
- public NormalizingOperation(String setting) {
- if ("none".equals(setting)) {
- this.level = NormalizeLevel.Level.NONE;
- } else if ("codepoint".equals(setting)) {
- this.level = NormalizeLevel.Level.CODEPOINT;
- } else if ("lowercase".equals(setting)) {
- this.level = NormalizeLevel.Level.LOWERCASE;
- } else if ("accent".equals(setting)) {
- this.level = NormalizeLevel.Level.ACCENT;
- } else if ("all".equals(setting)) {
- this.level = NormalizeLevel.Level.ACCENT;
- } else {
- throw new IllegalArgumentException("invalid normalizing setting: " + setting);
- }
- }
-
- public void apply(SDField field) {
- field.setNormalizing(new NormalizeLevel(level, true));
- }
-
-}