Upgrade SDC from Titan to Janus Graph
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / components / path / beans / JanusGraphTestSetup.java
@@ -1,11 +1,11 @@
 package org.openecomp.sdc.be.components.path.beans;
 
-import com.thinkaurelius.titan.core.PropertyKey;
-import com.thinkaurelius.titan.core.TitanGraph;
-import com.thinkaurelius.titan.core.TitanGraphQuery;
-import com.thinkaurelius.titan.core.schema.ConsistencyModifier;
-import com.thinkaurelius.titan.core.schema.TitanGraphIndex;
-import com.thinkaurelius.titan.core.schema.TitanManagement;
+import org.janusgraph.core.PropertyKey;
+import org.janusgraph.core.JanusGraph;
+import org.janusgraph.core.JanusGraphQuery;
+import org.janusgraph.core.schema.ConsistencyModifier;
+import org.janusgraph.core.schema.JanusGraphIndex;
+import org.janusgraph.core.schema.JanusGraphManagement;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.openecomp.sdc.be.dao.graph.datatype.ActionEnum;
@@ -25,24 +25,24 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 
-public class TitanGraphTestSetup {
+public class JanusGraphTestSetup {
 
 
-    private static final Logger logger = LoggerFactory.getLogger(TitanGraphTestSetup.class);
+    private static final Logger logger = LoggerFactory.getLogger(JanusGraphTestSetup.class);
 
-    private static TitanGraph graph;
+    private static JanusGraph graph;
 
-    public static boolean createGraph(  TitanGraph graph) {
-        TitanGraphTestSetup.graph = graph;
+    public static boolean createGraph(  JanusGraph graph) {
+        JanusGraphTestSetup.graph = graph;
         createIndexesAndDefaults();
 
-        logger.info("** Titan graph created ");
+        logger.info("** JanusGraph graph created ");
 
         return true;
     }
 
     private static boolean isVertexExist(Map<String, Object> properties) {
-        TitanGraphQuery query = graph.query();
+        JanusGraphQuery query = graph.query();
 
         if (properties != null && !properties.isEmpty()) {
             for (Map.Entry<String, Object> entry : properties.entrySet()) {
@@ -96,8 +96,8 @@ public class TitanGraphTestSetup {
     private static void createVertexIndixes() {
         logger.info("** createVertexIndixes started");
 
-        TitanManagement graphMgt = graph.openManagement();
-        TitanGraphIndex index = null;
+        JanusGraphManagement graphMgt = graph.openManagement();
+        JanusGraphIndex index = null;
         for (GraphPropertiesDictionary prop : GraphPropertiesDictionary.values()) {
             PropertyKey propKey = null;
             if (!graphMgt.containsPropertyKey(prop.getProperty())) {
@@ -139,7 +139,7 @@ public class TitanGraphTestSetup {
 
     private static void createEdgeIndixes() {
         logger.info("** createEdgeIndixes started");
-        TitanManagement graphMgt = graph.openManagement();
+        JanusGraphManagement graphMgt = graph.openManagement();
         for (GraphEdgePropertiesDictionary prop : GraphEdgePropertiesDictionary.values()) {
             if (!graphMgt.containsGraphIndex(prop.getProperty())) {
                 PropertyKey propKey = graphMgt.makePropertyKey(prop.getProperty()).dataType(prop.getClazz()).make();