Reduce the number of problems in aai-common by removing unused imports
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / serialization / queryformats / Console.java
index ba20c65..0e7642c 100644 (file)
@@ -22,8 +22,11 @@ package org.onap.aai.serialization.queryformats;
 
 import com.google.gson.JsonObject;
 
+import java.util.List;
+import java.util.Map;
 import java.util.Optional;
 
+import org.onap.aai.serialization.queryformats.exceptions.AAIFormatQueryResultFormatNotSupported;
 import org.onap.aai.serialization.queryformats.exceptions.AAIFormatVertexException;
 
 public class Console implements FormatMapper {
@@ -37,6 +40,14 @@ public class Console implements FormatMapper {
         return Optional.of(json);
     }
 
+    @Override
+    public Optional<JsonObject> formatObject(Object o, Map<String, List<String>> properties)
+            throws AAIFormatVertexException, AAIFormatQueryResultFormatNotSupported {
+        JsonObject json = new JsonObject();
+        json.addProperty("result", o.toString());
+        return Optional.of(json);
+    }
+
     @Override
     public int parallelThreshold() {
         return 100;