public class AttributeTableCSVExporter extends Object
Modifier and Type | Field and Description |
---|---|
static int |
FAKE_COLUMN_EDGE_SOURCE |
static int |
FAKE_COLUMN_EDGE_TARGET |
static int |
FAKE_COLUMN_EDGE_TYPE |
Constructor and Description |
---|
AttributeTableCSVExporter() |
Modifier and Type | Method and Description |
---|---|
static void |
writeCSVFile(Graph graph,
Table table,
File file)
Export a AttributeTable to the specified file.
|
static void |
writeCSVFile(Graph graph,
Table table,
File file,
Character separator,
Charset charset,
Integer[] columnIndexesToExport,
Element[] rows)
Export a AttributeTable to the specified file.
|
static void |
writeCSVFile(Graph graph,
Table table,
OutputStream out)
Export a AttributeTable to the specified file.
|
static void |
writeCSVFile(Graph graph,
Table table,
OutputStream out,
Character separator,
Charset charset,
Integer[] columnIndexesToExport,
Element[] rows)
Export a AttributeTable to the specified file.
|
public static final int FAKE_COLUMN_EDGE_SOURCE
public static final int FAKE_COLUMN_EDGE_TARGET
public static final int FAKE_COLUMN_EDGE_TYPE
public static void writeCSVFile(Graph graph, Table table, OutputStream out) throws IOException
Export a AttributeTable to the specified file.
graph
- Graph containing the table and rowstable
- Table to export. Cannot be nullout
- Ouput stream to write. Cannot be null.IOException
- When an error happens while writing the filepublic static void writeCSVFile(Graph graph, Table table, File file) throws IOException
Export a AttributeTable to the specified file.
graph
- Graph containing the table and rowstable
- Table to export. Cannot be nullfile
- File to write. Cannot be null.IOException
- When an error happens while writing the filepublic static void writeCSVFile(Graph graph, Table table, File file, Character separator, Charset charset, Integer[] columnIndexesToExport, Element[] rows) throws IOException
Export a AttributeTable to the specified file.
graph
- Graph containing the table and rowstable
- Table to export. Cannot be nullfile
- File to write. Cannot be null.separator
- Separator to use for separating values of a row in the CSV file. If null ',' will be used.charset
- Charset encoding for the file. If null, UTF-8 will be usedcolumnIndexesToExport
- Indicates the indexes of the columns to export. All columns will be exported if null. For special columns in edges table, use FAKE_COLUMN_EDGE_
values in this class.rows
- Elements (table rows: nodes/edges) to include in the exported file. Cannot be null. If null, all nodes/edges will be exported.IOException
- When an error happens while writing the filepublic static void writeCSVFile(Graph graph, Table table, OutputStream out, Character separator, Charset charset, Integer[] columnIndexesToExport, Element[] rows) throws IOException
Export a AttributeTable to the specified file.
graph
- Graph containing the table and rowstable
- Table to export. Cannot be nullout
- Ouput stream to write. Cannot be null.separator
- Separator to use for separating values of a row in the CSV file. If null ',' will be used.charset
- Charset encoding for the file. If null, UTF-8 will be usedcolumnIndexesToExport
- Indicates the indexes of the columns to export. All columns will be exported if null. For special columns in edges table, use FAKE_COLUMN_EDGE_
values in this class.rows
- Elements (table rows: nodes/edges) to include in the exported file. Cannot be null. If null, all nodes/edges will be exported.IOException
- When an error happens while writing the fileCopyright © 2007–2015 Gephi Consortium. All rights reserved.