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 f101f89..0e7642c 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * org.onap.aai
  * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
+
 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 {
 
-       @Override
-       public JsonObject formatObject(Object v) throws AAIFormatVertexException {
-               
-               JsonObject json = new JsonObject();
-               json.addProperty("result", v.toString());
-               
-               return json;
-       }
-
-       @Override
-       public int parallelThreshold() {
-               return 100;
-       }
+    @Override
+    public Optional<JsonObject> formatObject(Object v) throws AAIFormatVertexException {
+
+        JsonObject json = new JsonObject();
+        json.addProperty("result", v.toString());
+
+        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;
+    }
 
 }