Search in sources :

Example 6 with TinkerGraph

use of com.tinkerpop.blueprints.impls.tg.TinkerGraph in project pentaho-metaverse by pentaho.

the class LineageClientTest method setUp.

@Before
public void setUp() throws Exception {
    lineageClient = new LineageClient();
    g = new TinkerGraph();
    LineageGraphMap.getInstance().clear();
}
Also used : TinkerGraph(com.tinkerpop.blueprints.impls.tg.TinkerGraph) Before(org.junit.Before)

Example 7 with TinkerGraph

use of com.tinkerpop.blueprints.impls.tg.TinkerGraph in project pentaho-metaverse by pentaho.

the class BlueprintsGraphMetaverseReaderTest method init.

@Before
public void init() {
    graph = new TinkerGraph();
    loadGraph(graph);
}
Also used : TinkerGraph(com.tinkerpop.blueprints.impls.tg.TinkerGraph) Before(org.junit.Before)

Example 8 with TinkerGraph

use of com.tinkerpop.blueprints.impls.tg.TinkerGraph in project pentaho-metaverse by pentaho.

the class SynchronizedGraphFactoryTest method testWrapGraph.

@Test
public void testWrapGraph() throws Exception {
    Graph g = new TinkerGraph();
    SynchronizedGraph wrapped = (SynchronizedGraph) SynchronizedGraphFactory.wrapGraph(g);
    assertTrue(wrapped instanceof SynchronizedGraph);
    assertTrue(wrapped.graph instanceof IdGraph);
    assertTrue(wrapped.graph instanceof KeyIndexableGraph);
}
Also used : TinkerGraph(com.tinkerpop.blueprints.impls.tg.TinkerGraph) Graph(com.tinkerpop.blueprints.Graph) KeyIndexableGraph(com.tinkerpop.blueprints.KeyIndexableGraph) IdGraph(com.tinkerpop.blueprints.util.wrappers.id.IdGraph) TinkerGraph(com.tinkerpop.blueprints.impls.tg.TinkerGraph) KeyIndexableGraph(com.tinkerpop.blueprints.KeyIndexableGraph) IdGraph(com.tinkerpop.blueprints.util.wrappers.id.IdGraph) Test(org.junit.Test)

Example 9 with TinkerGraph

use of com.tinkerpop.blueprints.impls.tg.TinkerGraph in project pentaho-metaverse by pentaho.

the class LineageWriterTest method testOutputLineageGraph.

@Test
public void testOutputLineageGraph() throws Exception {
    Graph g = new TinkerGraph();
    IMetaverseBuilder builder = new MetaverseBuilder(g);
    holder.setMetaverseBuilder(builder);
    writer.setGraphOutputStream(System.out);
    IGraphWriter graphWriter = mock(IGraphWriter.class);
    writer.setGraphWriter(graphWriter);
    writer.outputLineageGraph(holder);
}
Also used : TinkerGraph(com.tinkerpop.blueprints.impls.tg.TinkerGraph) Graph(com.tinkerpop.blueprints.Graph) TinkerGraph(com.tinkerpop.blueprints.impls.tg.TinkerGraph) IGraphWriter(org.pentaho.metaverse.api.IGraphWriter) IMetaverseBuilder(org.pentaho.metaverse.api.IMetaverseBuilder) IMetaverseBuilder(org.pentaho.metaverse.api.IMetaverseBuilder) Test(org.junit.Test)

Example 10 with TinkerGraph

use of com.tinkerpop.blueprints.impls.tg.TinkerGraph in project pentaho-metaverse by pentaho.

the class MetaverseBuilderTest method before.

@Before
public void before() {
    graph = new TinkerGraph();
    builder = new MetaverseBuilder(graph);
    node.setStringID("node1");
    node.setName("node1 name");
    node.setType("test type");
}
Also used : TinkerGraph(com.tinkerpop.blueprints.impls.tg.TinkerGraph) Before(org.junit.Before)

Aggregations

TinkerGraph (com.tinkerpop.blueprints.impls.tg.TinkerGraph)105 Vertex (com.tinkerpop.blueprints.Vertex)66 Graph (com.tinkerpop.blueprints.Graph)58 Test (org.junit.Test)42 Edge (com.tinkerpop.blueprints.Edge)33 ByteArrayOutputStream (java.io.ByteArrayOutputStream)12 ByteArrayInputStream (java.io.ByteArrayInputStream)11 JSONObject (org.codehaus.jettison.json.JSONObject)10 IMetaverseBuilder (org.pentaho.metaverse.api.IMetaverseBuilder)10 InputStream (java.io.InputStream)9 HashSet (java.util.HashSet)9 JSONTokener (org.codehaus.jettison.json.JSONTokener)8 KeyIndexableGraph (com.tinkerpop.blueprints.KeyIndexableGraph)7 Map (java.util.Map)6 MetaverseBuilder (org.pentaho.metaverse.impl.MetaverseBuilder)6 TypedGraphModuleBuilder (com.tinkerpop.frames.modules.typedgraph.TypedGraphModuleBuilder)5 HashMap (java.util.HashMap)5 Before (org.junit.Before)5 IndexableGraph (com.tinkerpop.blueprints.IndexableGraph)4 IgnoreIdTinkerGraph (com.tinkerpop.blueprints.impls.tg.IgnoreIdTinkerGraph)4