AAI-1523 Batch reformat aai-schema-ingest
[aai/aai-common.git] / aai-schema-ingest / src / main / java / org / onap / aai / edges / JsonIngestor.java
index 713103a..b686b3a 100644 (file)
@@ -24,7 +24,6 @@ import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 import com.jayway.jsonpath.DocumentContext;
 import com.jayway.jsonpath.JsonPath;
-import org.onap.aai.setup.SchemaVersion;
 
 import java.io.BufferedReader;
 import java.io.FileReader;
@@ -35,17 +34,19 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import org.onap.aai.setup.SchemaVersion;
+
 /**
  * JsonIngestor produces DocumentContexts from json files
  */
 public class JsonIngestor {
-       private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(JsonIngestor.class);
-    
+    private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(JsonIngestor.class);
+
     /**
      * Reads in given json files to queryable DocumentContexts.
      *
      * @param filesToIngest - map of filenames to ingest
-     *                         per Version
+     *        per Version
      * @return Map<SchemaVersion, List<DocumentContext>> - map of DocumentContexts per Version
      */
     public Map<SchemaVersion, List<DocumentContext>> ingest(Map<SchemaVersion, List<String>> filesToIngest) {
@@ -90,13 +91,13 @@ public class JsonIngestor {
      */
     public String readInJsonFile(String rulesFilename) {
         StringBuilder sb = new StringBuilder();
-        try(BufferedReader br = new BufferedReader(new FileReader(rulesFilename))) {
+        try (BufferedReader br = new BufferedReader(new FileReader(rulesFilename))) {
             String line;
             while ((line = br.readLine()) != null) {
                 sb.append(line);
             }
         } catch (IOException e) {
-            LOGGER.warn("Exception in file"+e.getMessage());
+            LOGGER.warn("Exception in file" + e.getMessage());
             throw new ExceptionInInitializerError(e);
         }
         return sb.toString();