public class GraphMLWriter extends Object
| Constructor and Description |
|---|
GraphMLWriter(Graph graph) |
| Modifier and Type | Method and Description |
|---|---|
static void |
outputGraph(Graph graph,
OutputStream graphMLOutputStream)
Write the data in a Graph to a GraphML OutputStream.
|
static void |
outputGraph(Graph graph,
OutputStream graphMLOutputStream,
Map<String,String> vertexKeyTypes,
Map<String,String> edgeKeyTypes)
Write the data in a Graph to a GraphML OutputStream.
|
static void |
outputGraph(Graph graph,
String filename)
Write the data in a Graph to a GraphML file.
|
static void |
outputGraph(Graph graph,
String filename,
Map<String,String> vertexKeyTypes,
Map<String,String> edgeKeyTypes)
Write the data in a Graph to a GraphML file.
|
void |
outputGraph(OutputStream graphMLOutputStream)
Write the data in a Graph to a GraphML OutputStream.
|
void |
outputGraph(String filename)
Write the data in a Graph to a GraphML file.
|
void |
setEdgeKeyTypes(Map<String,String> edgeKeyTypes) |
void |
setEdgeLabelKey(String edgeLabelKey)
Set the name of the edge label in the GraphML.
|
void |
setNormalize(boolean normalize) |
void |
setVertexKeyTypes(Map<String,String> vertexKeyTypes) |
void |
setXmlSchemaLocation(String xmlSchemaLocation) |
public GraphMLWriter(Graph graph)
graph - the Graph to pull the data frompublic void setXmlSchemaLocation(String xmlSchemaLocation)
xmlSchemaLocation - the location of the GraphML XML Schema instancepublic void setEdgeLabelKey(String edgeLabelKey)
edgeLabelKey - if the label of an edge will be handled by the data property.public void setNormalize(boolean normalize)
normalize - whether to normalize the output. Normalized output is deterministic with respect to the order of
elements and properties in the resulting XML document, and is compatible with line diff-based tools
such as Git. Note: normalized output is memory-intensive and is not appropriate for very large graphs.public void setVertexKeyTypes(Map<String,String> vertexKeyTypes)
vertexKeyTypes - a Map of the data types of the vertex keyspublic void setEdgeKeyTypes(Map<String,String> edgeKeyTypes)
edgeKeyTypes - a Map of the data types of the edge keyspublic void outputGraph(String filename) throws IOException
filename - the name of the file write the Graph data (as GraphML) toIOException - thrown if there is an error generating the GraphML datapublic void outputGraph(OutputStream graphMLOutputStream) throws IOException
graphMLOutputStream - the GraphML OutputStream to write the Graph data toIOException - thrown if there is an error generating the GraphML datapublic static void outputGraph(Graph graph, OutputStream graphMLOutputStream) throws IOException
graph - the Graph to pull the data fromgraphMLOutputStream - the GraphML OutputStream to write the Graph data toIOException - thrown if there is an error generating the GraphML datapublic static void outputGraph(Graph graph, String filename) throws IOException
graph - the Graph to pull the data fromfilename - the name of the file write the Graph data (as GraphML) toIOException - thrown if there is an error generating the GraphML datapublic static void outputGraph(Graph graph, String filename, Map<String,String> vertexKeyTypes, Map<String,String> edgeKeyTypes) throws IOException
graph - the Graph to pull the data fromfilename - the name of the file write the Graph data (as GraphML) tovertexKeyTypes - a Map of the data types of the vertex keysedgeKeyTypes - a Map of the data types of the edge keysIOException - thrown if there is an error generating the GraphML datapublic static void outputGraph(Graph graph, OutputStream graphMLOutputStream, Map<String,String> vertexKeyTypes, Map<String,String> edgeKeyTypes) throws IOException
graph - the Graph to pull the data fromgraphMLOutputStream - the GraphML OutputStream to write the Graph data tovertexKeyTypes - a Map of the data types of the vertex keysedgeKeyTypes - a Map of the data types of the edge keysIOException - thrown if there is an error generating the GraphML dataCopyright © 2010-2014. All Rights Reserved.