|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.upc.dama.dex.io.Exporter
public class Exporter
Export data of node or edge type.
It allows for export data structured as rows in a node or edge type
from a Graph.
Since data is structured as rows (CSV files, etc), it uses a
RowWriter to set all data.
When the exporter is running a Exporter.ExporterEvent is sent
to their listeners with a given frequency.
| Nested Class Summary | |
|---|---|
class |
Exporter.ExporterEvent
Constains information of the running Exporter. |
| Field Summary | |
|---|---|
protected long |
headAttr
Attribute identifier in the Graph of the tail node type. |
protected int |
headPos
Position to be written the head id on the RowWriter. |
protected long |
tailAttr
Attribute identifier in the Graph of the tail node type. |
protected int |
tailPos
Position to be written the tail id on the RowWriter. |
| Constructor Summary | |
|---|---|
Exporter(RowWriter rowWriter,
Graph graph,
int objectType)
Creates a new instance of Exporter. |
|
Exporter(RowWriter rowWriter,
Graph graph,
int objectType,
java.lang.Long[] exportAttr)
Creates a new instance of Exporter. |
|
| Method Summary | |
|---|---|
int |
getFrequency()
Gets the frequency when Exporter.ExporterEvents are sent
to their ExporterListener. |
boolean |
getNamesOnTop()
Gets the policy of print attributes information on the first line of the writer. |
void |
registerUnloaderListener(ExporterListener ul)
Adds a new ExporterListener. |
void |
run()
Start the exportation. |
void |
setFrequency(int frequency)
Updates the frequency of the Exporter.ExporterEvents. |
void |
setNamesOnTop(boolean b)
Sets the policy of print attributes information on the first line of the writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int headPos
RowWriter.
protected int tailPos
RowWriter.
protected long headAttr
Graph of the tail node type.
protected long tailAttr
Graph of the tail node type.
| Constructor Detail |
|---|
public Exporter(RowWriter rowWriter,
Graph graph,
int objectType,
java.lang.Long[] exportAttr)
Exporter.
rowWriter - RowWriter to write data.graph - Graph that objects are exported.objectType - Node or edge type to be exported.exportAttr - Attributes id of the objectType to be
exported.
public Exporter(RowWriter rowWriter,
Graph graph,
int objectType)
Exporter.
rowWriter - RowWriter to write data.graph - Graph that objects are exported.objectType - Node or edge type to be exported.| Method Detail |
|---|
public void registerUnloaderListener(ExporterListener ul)
ExporterListener.
ul - A ExporterListener to be registered.public void setFrequency(int frequency)
Exporter.ExporterEvents.
frequency - New frequency value.public int getFrequency()
Exporter.ExporterEvents are sent
to their ExporterListener.
public void setNamesOnTop(boolean b)
b - If true, atrribute information is printed on the
first line of the writer.public boolean getNamesOnTop()
public void run()
throws java.io.IOException
java.io.IOException - If bad things happen during the write.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||