use of org.onap.aai.serialization.engines.JanusGraphDBEngine in project aai-aai-common by onap.
the class DbSerializerDeltasTest method setup.
@Before
public void setup() throws Exception {
// createGraph();
version = schemaVersions.getDefaultVersion();
loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, version);
dbEngine = new JanusGraphDBEngine(queryStyle, loader);
engine = new JanusGraphDBEngine(queryStyle, loader);
}
use of org.onap.aai.serialization.engines.JanusGraphDBEngine in project aai-aai-common by onap.
the class EdgerPairCanBeBothCousinAndParentChildTest method setup.
@Before
public void setup() throws UnsupportedEncodingException, AAIException, URISyntaxException {
version = schemaVersions.getDefaultVersion();
loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, version);
engine = new JanusGraphDBEngine(queryStyle, loader);
initData();
}
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) {
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;
}
return this;
}
use of org.onap.aai.serialization.engines.JanusGraphDBEngine in project aai-aai-common by onap.
the class AggregateFormatTest method createLoaderEngineSetup.
private void createLoaderEngineSetup() throws AAIException {
if (loader == null) {
loader = loaderFactory.createLoaderForVersion(factoryType, version);
dbEngine = spy(new JanusGraphDBEngine(QueryStyle.TRAVERSAL, loader));
DBSerializer serializer = new DBSerializer(version, dbEngine, factoryType, "Junit");
aggregate = new Aggregate.Builder(loader, serializer, urlBuilder).build();
TransactionalGraphEngine.Admin spyAdmin = spy(dbEngine.asAdmin());
when(dbEngine.tx()).thenReturn(graph);
when(dbEngine.asAdmin()).thenReturn(spyAdmin);
when(spyAdmin.getReadOnlyTraversalSource()).thenReturn(graph.traversal().withStrategies(ReadOnlyStrategy.instance()));
when(spyAdmin.getTraversalSource()).thenReturn(graph.traversal());
}
}
use of org.onap.aai.serialization.engines.JanusGraphDBEngine in project aai-aai-common by onap.
the class LegacyQueryTest method setup.
public void setup() {
version = new SchemaVersion("v10");
dbEngine = new JanusGraphDBEngine(QueryStyle.GREMLIN_TRAVERSAL, loaderFactory.createLoaderForVersion(ModelType.MOXY, version), false);
}
Aggregations