AAI-1523 Batch reformat aai-schema-ingest
[aai/aai-common.git] / aai-schema-ingest / src / main / java / org / onap / aai / validation / nodes / NodeValidator.java
index 38b3a70..ac9ecbd 100644 (file)
@@ -33,28 +33,29 @@ import org.springframework.stereotype.Component;
 public class NodeValidator {
 
     private ConfigTranslator translator;
-       private SchemaErrorStrategy strat;
-       private DuplicateNodeDefinitionValidationModule dupChecker;
+    private SchemaErrorStrategy strat;
+    private DuplicateNodeDefinitionValidationModule dupChecker;
 
-       @Autowired
-       public NodeValidator( ConfigTranslator translator, SchemaErrorStrategy strategy, DuplicateNodeDefinitionValidationModule dupChecker) {
+    @Autowired
+    public NodeValidator(ConfigTranslator translator, SchemaErrorStrategy strategy,
+            DuplicateNodeDefinitionValidationModule dupChecker) {
         this.translator = translator;
-               this.strat = strategy;
-               this.dupChecker = dupChecker;
-       }
-       
-       public boolean validate() {
-               
-               for(Entry<SchemaVersion, List<String>> entry : translator.getNodeFiles().entrySet()) {
-                       String result = dupChecker.findDuplicates(entry.getValue(), entry.getKey());
-                       if (!"".equals(result)) {
-                               strat.notifyOnError(result);
-                       }
-               }
-               return strat.isOK();
-       }
-       
-       public String getErrorMsg() {
-               return strat.getErrorMsg();
-       }
+        this.strat = strategy;
+        this.dupChecker = dupChecker;
+    }
+
+    public boolean validate() {
+
+        for (Entry<SchemaVersion, List<String>> entry : translator.getNodeFiles().entrySet()) {
+            String result = dupChecker.findDuplicates(entry.getValue(), entry.getKey());
+            if (!"".equals(result)) {
+                strat.notifyOnError(result);
+            }
+        }
+        return strat.isOK();
+    }
+
+    public String getErrorMsg() {
+        return strat.getErrorMsg();
+    }
 }