1616package org .eclipse .jnosql .databases .tinkerpop .cdi ;
1717
1818import com .arangodb .tinkerpop .gremlin .structure .ArangoDBGraph ;
19+ import com .arangodb .tinkerpop .gremlin .structure .ArangoDBGraphConfig ;
1920import org .apache .commons .configuration2 .BaseConfiguration ;
2021import org .apache .commons .configuration2 .Configuration ;
2122import org .apache .tinkerpop .gremlin .neo4j .structure .Neo4jGraph ;
2627import org .testcontainers .containers .GenericContainer ;
2728
2829import java .io .File ;
30+ import java .util .List ;
2931import java .util .function .Supplier ;
3032import java .util .logging .Logger ;
3133
@@ -51,6 +53,15 @@ public Graph get() {
5153 Configuration configuration = new BaseConfiguration ();
5254 configuration .addProperty ("gremlin.graph" , ArangoDBGraph .class .getName ());
5355 configuration .addProperty ("gremlin.arangodb.conf.graph.enableDataDefinition" , true );
56+ configuration .addProperty ("gremlin.arangodb.conf.graph.type" , ArangoDBGraphConfig .GraphType .COMPLEX .name ());
57+ configuration .addProperty ("gremlin.arangodb.conf.graph.edgeDefinitions" , List .of (
58+ "reads:[Human]->[Magazine]" ,
59+ "knows:[Person]->[Person]" ,
60+ "eats:[Creature]->[Creature]" ,
61+ "loves:[Human]->[Human]" ,
62+ "likes:[Human]->[Creature]" ,
63+ "friend:[Person]->[Person]"
64+ ));
5465 configuration .addProperty ("gremlin.arangodb.conf.driver.hosts" , container .getHost () + ":" + container .getFirstMappedPort ());
5566 return GraphFactory .open (configuration );
5667 }
0 commit comments