com.intel.hadoop.graphbuilder.graph.simplegraph
Class SimpleJsonFormatter

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

public class SimpleJsonFormatter
extends java.lang.Object
implements EdgeFormatter

A JSON encoding of SimpleGraph or SimpleSubGraph.


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

Constructor Detail

SimpleJsonFormatter

public SimpleJsonFormatter()
Method Detail

structWriter

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

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.