Search in sources :

Example 6 with IGraphWriter

use of org.pentaho.metaverse.api.IGraphWriter in project pentaho-metaverse by pentaho.

the class VfsLineageWriterTest method testGetSetGraphWriter.

@Test
public void testGetSetGraphWriter() throws Exception {
    IGraphWriter graphWriter = writer.getGraphWriter();
    assertNotNull(graphWriter);
    writer.setGraphWriter(null);
    assertNull(writer.getGraphWriter());
}
Also used : IGraphWriter(org.pentaho.metaverse.api.IGraphWriter) Test(org.junit.Test)

Example 7 with IGraphWriter

use of org.pentaho.metaverse.api.IGraphWriter in project pentaho-metaverse by pentaho.

the class VfsLineageWriterTest method testSetGraphOutputStream.

@Test
public void testSetGraphOutputStream() throws IOException {
    try (OutputStream graphOutputStream = writer.getGraphOutputStream(null)) {
        assertNull(graphOutputStream);
    }
    IGraphWriter graphWriter = new GraphMLWriter();
    writer.setGraphWriter(graphWriter);
    try (OutputStream graphOutputStream = writer.getGraphOutputStream(holder)) {
        assertNotNull(graphOutputStream);
    }
    graphWriter = new GraphSONWriter();
    writer.setGraphWriter(graphWriter);
    try (OutputStream graphOutputStream = writer.getGraphOutputStream(holder)) {
        assertNotNull(graphOutputStream);
    }
    graphWriter = new GraphCsvWriter();
    writer.setGraphWriter(graphWriter);
    try (OutputStream graphOutputStream = writer.getGraphOutputStream(holder)) {
        assertNotNull(graphOutputStream);
    }
}
Also used : OutputStream(java.io.OutputStream) GraphSONWriter(org.pentaho.metaverse.graph.GraphSONWriter) GraphCsvWriter(org.pentaho.metaverse.graph.GraphCsvWriter) IGraphWriter(org.pentaho.metaverse.api.IGraphWriter) GraphMLWriter(org.pentaho.metaverse.graph.GraphMLWriter) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 IGraphWriter (org.pentaho.metaverse.api.IGraphWriter)7 Graph (com.tinkerpop.blueprints.Graph)2 OutputStream (java.io.OutputStream)2 IMetaverseBuilder (org.pentaho.metaverse.api.IMetaverseBuilder)2 GraphCsvWriter (org.pentaho.metaverse.graph.GraphCsvWriter)2 GraphMLWriter (org.pentaho.metaverse.graph.GraphMLWriter)2 GraphSONWriter (org.pentaho.metaverse.graph.GraphSONWriter)2 TinkerGraph (com.tinkerpop.blueprints.impls.tg.TinkerGraph)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 IExecutionProfile (org.pentaho.metaverse.api.model.IExecutionProfile)1 LineageHolder (org.pentaho.metaverse.api.model.LineageHolder)1 LineageWriter (org.pentaho.metaverse.impl.LineageWriter)1 ExecutionProfile (org.pentaho.metaverse.impl.model.ExecutionProfile)1