Search in sources :

Example 76 with JanusGraphDBEngine

use of org.onap.aai.serialization.engines.JanusGraphDBEngine in project aai-aai-common by onap.

the class HttpEntry method setHttpEntryProperties.

public HttpEntry setHttpEntryProperties(SchemaVersion version, String serverBase) {
    this.version = version;
    this.loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, version);
    this.dbEngine = new JanusGraphDBEngine(queryStyle, loader);
    getDbEngine().startTransaction();
    this.notification = new UEBNotification(loader, loaderFactory, schemaVersions);
    if ("true".equals(AAIConfig.get("aai.notification.depth.all.enabled", "true"))) {
        this.notificationDepth = AAIProperties.MAXIMUM_DEPTH;
    } else {
        this.notificationDepth = AAIProperties.MINIMUM_DEPTH;
    }
    this.serverBase = serverBase;
    return this;
}
Also used : UEBNotification(org.onap.aai.rest.ueb.UEBNotification) JanusGraphDBEngine(org.onap.aai.serialization.engines.JanusGraphDBEngine)

Example 77 with JanusGraphDBEngine

use of org.onap.aai.serialization.engines.JanusGraphDBEngine in project aai-aai-common by onap.

the class HttpEntry method setHttpEntryProperties.

public HttpEntry setHttpEntryProperties(SchemaVersion version, UEBNotification notification) {
    this.version = version;
    this.loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, version);
    this.dbEngine = new JanusGraphDBEngine(queryStyle, loader);
    this.notification = notification;
    if ("true".equals(AAIConfig.get("aai.notification.depth.all.enabled", "true"))) {
        this.notificationDepth = AAIProperties.MAXIMUM_DEPTH;
    } else {
        this.notificationDepth = AAIProperties.MINIMUM_DEPTH;
    }
    // start transaction on creation
    getDbEngine().startTransaction();
    return this;
}
Also used : JanusGraphDBEngine(org.onap.aai.serialization.engines.JanusGraphDBEngine)

Example 78 with JanusGraphDBEngine

use of org.onap.aai.serialization.engines.JanusGraphDBEngine in project aai-aai-common by onap.

the class HttpEntry method setHttpEntryProperties.

public HttpEntry setHttpEntryProperties(SchemaVersion version, UEBNotification notification, int notificationDepth) {
    this.version = version;
    this.loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, version);
    this.dbEngine = new JanusGraphDBEngine(queryStyle, loader);
    this.notification = notification;
    this.notificationDepth = notificationDepth;
    // start transaction on creation
    getDbEngine().startTransaction();
    return this;
}
Also used : JanusGraphDBEngine(org.onap.aai.serialization.engines.JanusGraphDBEngine)

Aggregations

JanusGraphDBEngine (org.onap.aai.serialization.engines.JanusGraphDBEngine)78 TransactionalGraphEngine (org.onap.aai.serialization.engines.TransactionalGraphEngine)51 GraphTraversalSource (org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource)45 Before (org.junit.Before)40 Vertex (org.apache.tinkerpop.gremlin.structure.Vertex)27 DBSerializer (org.onap.aai.serialization.db.DBSerializer)10 JanusGraphManagement (org.janusgraph.core.schema.JanusGraphManagement)8 SchemaVersion (org.onap.aai.setup.SchemaVersion)8 Loader (org.onap.aai.introspection.Loader)7 AAIException (org.onap.aai.exceptions.AAIException)5 ModelType (org.onap.aai.introspection.ModelType)3 QueryStyle (org.onap.aai.serialization.engines.QueryStyle)3 UrlBuilder (org.onap.aai.serialization.queryformats.utils.UrlBuilder)3 Properties (java.util.Properties)2 Test (org.junit.Test)2 NotificationHelper (org.onap.aai.migration.NotificationHelper)2 UEBNotification (org.onap.aai.rest.ueb.UEBNotification)2 JCommander (com.beust.jcommander.JCommander)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 URI (java.net.URI)1