com.intel.hadoop.graphbuilder.graph.glgraph
Class GLJsonFormatter

java.lang.Object
  extended by com.intel.hadoop.graphbuilder.graph.glgraph.GLJsonFormatter
All Implemented Interfaces:
EdgeFormatter

public class GLJsonFormatter
extends java.lang.Object
implements EdgeFormatter

A JSON encoding of GLGraph.


Constructor Summary
GLJsonFormatter()
           
 
Method Summary
 java.io.StringWriter edataWriter(Graph g)
           
 java.io.StringWriter structWriter(Graph graph)
           
 java.io.StringWriter vid2lvidWriter(GLGraph g)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLJsonFormatter

public GLJsonFormatter()
Method Detail

vid2lvidWriter

public java.io.StringWriter vid2lvidWriter(GLGraph g)
Parameters:
g -
Returns:
A JSON string of the vid2lvid map of a GLGraph.

edataWriter

public java.io.StringWriter edataWriter(Graph g)
Specified by:
edataWriter in interface EdgeFormatter
Parameters:
g - the graph to output.
Returns:
StringWriter with the string representation of the graph's all edge data. The output edge data should be aligned with its adjacency structure.

structWriter

public java.io.StringWriter structWriter(Graph graph)
Specified by:
structWriter in interface EdgeFormatter
Parameters:
graph - the graph to output.
Returns:
a StringWriter with the string representation of the graph's adjacency structure.