com.sparsity.dex.io
Class NodeTypeExporter

java.lang.Object
  extended by com.sparsity.dex.io.TypeExporter
      extended by com.sparsity.dex.io.NodeTypeExporter

public class NodeTypeExporter
extends TypeExporter

NodeTypeExporter class.

Specific TypeExporter implementation for node types.

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

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

Constructor Summary
NodeTypeExporter()
          Creates a new instance.
NodeTypeExporter(RowWriter rw, Graph g, int t, AttributeList attrs)
          Creates a new instance.
 
Method Summary
 void register(TypeExporterListener tel)
          Registers a new listener.
 void run()
          See TypeExporter::Run.
 void setAttributes(AttributeList attrs)
          Sets the list of Attributes.
 void setFrequency(int freq)
          Sets the frequency of listener notification.
 void setGraph(Graph g)
          Sets the graph that will be exported.
 void setHeader(boolean header)
          Sets the presence of a header row.
 void setRowWriter(RowWriter rw)
          Sets the output data destination.
 void setType(int t)
          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

NodeTypeExporter

public NodeTypeExporter(RowWriter rw,
                        Graph g,
                        int t,
                        AttributeList attrs)
Creates a new instance.

Parameters:
rw - [in] Output RowWriter.
g - [in] Graph.
t - [in] Type identifier.
attrs - [in] Attribute identifiers to be exported.

NodeTypeExporter

public NodeTypeExporter()
Creates a new instance.

Method Detail

setRowWriter

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

rr[in] Input RowWriter.

Overrides:
setRowWriter in class TypeExporter
Parameters:
rw - null

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 TypeExporter::Run.

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

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.

setFrequency

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

freq [in] Frequency in number of rows managed to notify progress to all listeners

Overrides:
setFrequency in class TypeExporter
Parameters:
freq - null

setAttributes

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

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

setGraph

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

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

setType

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

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