Package com.gengoai.graph.io
Interface GraphRenderer<V>
-
- Type Parameters:
V
- the vertex type
- All Known Implementing Classes:
GraphViz
public interface GraphRenderer<V>
Common interface for rendering a graph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
render(Graph<V> graph, Resource location)
Renders the given graph to the give location, using the defined vertex and edge encoders.void
render(Graph<V> graph, Resource location, Multimap<String,String> parameters)
Renders the given graph to the give location, using the defined vertex and edge encoders.void
setEdgeEncoder(EdgeEncoder<V> edgeEncoder)
Sets the edge encoder.void
setVertexEncoder(VertexEncoder<V> vertexEncoder)
Sets the vertex encoder
-
-
-
Method Detail
-
setVertexEncoder
void setVertexEncoder(VertexEncoder<V> vertexEncoder)
Sets the vertex encoder- Parameters:
vertexEncoder
- the encoder
-
setEdgeEncoder
void setEdgeEncoder(EdgeEncoder<V> edgeEncoder)
Sets the edge encoder.- Parameters:
edgeEncoder
- the encoder
-
render
default void render(Graph<V> graph, Resource location) throws IOException
Renders the given graph to the give location, using the defined vertex and edge encoders.- Parameters:
graph
- the graph to renderlocation
- the location to write the rendering to- Throws:
IOException
- Something went wrong rendering the graph
-
render
void render(Graph<V> graph, Resource location, Multimap<String,String> parameters) throws IOException
Renders the given graph to the give location, using the defined vertex and edge encoders.- Parameters:
graph
- the graph to renderlocation
- the location to write the rendering toparameters
- multimap of parameters used by the underling render- Throws:
IOException
- Something went wrong rendering the graph
-
-