Merge "Fix sonar issues in SchemaGenerator"
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / util / UniquePropertyCheck.java
index 72e5380..bfa0f3a 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.
@@ -16,8 +16,6 @@
  * 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.util;
 import java.util.HashMap;
@@ -39,8 +37,8 @@ import org.slf4j.MDC;
 import com.att.eelf.configuration.Configuration;
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
-import com.thinkaurelius.titan.core.TitanFactory;
-import com.thinkaurelius.titan.core.TitanGraph;
+import org.janusgraph.core.JanusGraphFactory;
+import org.janusgraph.core.JanusGraph;
 import org.onap.aai.dbmap.AAIGraphConfig;
 
 public class UniquePropertyCheck {
@@ -89,12 +87,12 @@ public class UniquePropertyCheck {
                try {   
                AAIConfig.init();
                System.out.println("    ---- NOTE --- about to open graph (takes a little while)--------\n");
-               TitanGraph tGraph = TitanFactory.open(new AAIGraphConfig.Builder(AAIConstants.REALTIME_DB_CONFIG).forService(UniquePropertyCheck.class.getSimpleName()).withGraphType("realtime").buildConfiguration());
+               JanusGraph tGraph = JanusGraphFactory.open(new AAIGraphConfig.Builder(AAIConstants.REALTIME_DB_CONFIG).forService(UniquePropertyCheck.class.getSimpleName()).withGraphType("realtime").buildConfiguration());
                
                if( tGraph == null ) {
                        LoggingContext.statusCode(StatusCode.ERROR);
                        LoggingContext.responseCode(LoggingContext.AVAILABILITY_TIMEOUT_ERROR);
-                       logAndPrint(logger, " Error:  Could not get TitanGraph ");
+                       logAndPrint(logger, " Error:  Could not get JanusGraph ");
                        System.exit(1);
                }