com.sparsity.sparksee.io
Class EdgeTypeExporter

java.lang.Object
  extended by com.sparsity.sparksee.io.TypeExporter
      extended by com.sparsity.sparksee.io.EdgeTypeExporter

public class EdgeTypeExporter
extends TypeExporter

EdgeTypeExporter class.

Specific TypeExporter implementation for edge types.

Check out the 'Data export' section in the SPARKSEE User Manual for more details on this.

Author:
Sparsity Technologies http://www.sparsity-technologies.com

Constructor Summary
EdgeTypeExporter()
          Creates a new instance.
EdgeTypeExporter(RowWriter rowWriter, Graph graph, int type, AttributeList attrs, int hPos, int tPos, int hAttr, int tAttr)
          Creates a new instance.
 
Method Summary
 void register(TypeExporterListener tel)
          Registers a new listener.
 void run()
          See the TypeExporter class Run method.
 void setAttributes(AttributeList attrs)
          Sets the list of Attributes.
 void setFrequency(int freq)
          Sets the frequency of listener notification.
 void setGraph(Graph graph)
          Sets the graph that will be exported.
 void setHeadAttribute(int attr)
          Sets the attribute that will be used to get the value to be dumped for the head of the edge.
 void setHeader(boolean header)
          Sets the presence of a header row.
 void setHeadPosition(int pos)
          Sets the position (index column) of the head attribute in the exported data.
 void setRowWriter(RowWriter rw)
          Sets the output data destination.
 void setTailAttribute(int attr)
          Sets the attribute that will be used to get the value to be dumped for the tail of the edge.
 void setTailPosition(int pos)
          Sets the position (index column) of the tail attribute in the exported data.
 void setType(int type)
          Sets the type to be exported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeTypeExporter

public EdgeTypeExporter(RowWriter rowWriter,
                        Graph graph,
                        int type,
                        AttributeList attrs,
                        int hPos,
                        int tPos,
                        int hAttr,
                        int tAttr)
Creates a new instance.

Parameters:
rowWriter - [in] Output RowWriter.
graph - [in] Graph.
type - [in] Type identifier.
attrs - [in] Attribute identifiers to be exported.
hPos - [in] The position (index column) for the head value.
tPos - [in] The position (index column) for the tail value.
hAttr - [in] The attribute identifier to get the value to be dumped for the head.
tAttr - [in] The attribute identifier to get the value to be dumped for the tail.

EdgeTypeExporter

public EdgeTypeExporter()
Creates a new instance.

Method Detail

setTailAttribute

public void setTailAttribute(int attr)
Sets the attribute that will be used to get the value to be dumped for the tail of the edge.

Parameters:
attr - [in] Tail Attribute

setFrequency

public void setFrequency(int freq)
Sets the frequency of listener notification.

Overrides:
setFrequency in class TypeExporter
Parameters:
freq - [in] Frequency in number of rows managed to notify progress to all listeners

setHeadAttribute

public void setHeadAttribute(int attr)
Sets the attribute that will be used to get the value to be dumped for the head of the edge.

Parameters:
attr - [in] Head Attribute

setType

public void setType(int type)
Sets the type to be exported.

Overrides:
setType in class TypeExporter
Parameters:
type - [in] Type identifier.

setTailPosition

public void setTailPosition(int pos)
Sets the position (index column) of the tail attribute in the exported data.

Parameters:
pos - [in] Tail position

setRowWriter

public void setRowWriter(RowWriter rw)
Sets the output data destination.

Overrides:
setRowWriter in class TypeExporter
Parameters:
rw - [in] Input RowWriter.

register

public void register(TypeExporterListener tel)
Registers a new listener.

Overrides:
register in class TypeExporter
Parameters:
tel - [in] TypeExporterListener to be registered.

run

public void run()
         throws java.io.IOException,
                java.lang.RuntimeException
See the TypeExporter class Run method.

Overrides:
run in class TypeExporter
Throws:
java.io.IOException - null
java.lang.RuntimeException - null

setGraph

public void setGraph(Graph graph)
Sets the graph that will be exported.

Overrides:
setGraph in class TypeExporter
Parameters:
graph - [in] Graph.

setHeader

public void setHeader(boolean header)
Sets the presence of a header row.

Overrides:
setHeader in class TypeExporter
Parameters:
header - [in] If TRUE, a header row is dumped with the name of the attributes.

setHeadPosition

public void setHeadPosition(int pos)
Sets the position (index column) of the head attribute in the exported data.

Parameters:
pos - [in] Head position

setAttributes

public void setAttributes(AttributeList attrs)
Sets the list of Attributes.

Overrides:
setAttributes in class TypeExporter
Parameters:
attrs - [in] Attribute identifiers to be exported