public class GMLReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LABEL |
| Constructor and Description |
|---|
GMLReader(Graph graph)
Create a new GML reader
(Uses default edge label DEFAULT_LABEL)
|
GMLReader(Graph graph,
String defaultEdgeLabel)
Create a new GML reader
|
| Modifier and Type | Method and Description |
|---|---|
static void |
inputGraph(Graph graph,
InputStream inputStream)
Load the GML file into the Graph.
|
static void |
inputGraph(Graph inputGraph,
InputStream inputStream,
int bufferSize,
String defaultEdgeLabel,
String vertexIdKey,
String edgeIdKey,
String edgeLabelKey)
Load the GML file into the Graph.
|
static void |
inputGraph(Graph graph,
String filename)
Load the GML file into the Graph.
|
static void |
inputGraph(Graph inputGraph,
String filename,
int bufferSize,
String defaultEdgeLabel,
String vertexIdKey,
String edgeIdKey,
String edgeLabelKey)
Load the GML file into the Graph.
|
void |
inputGraph(InputStream inputStream)
Read the GML from from the stream.
|
void |
inputGraph(InputStream inputStream,
int bufferSize)
Read the GML from from the stream.
|
void |
inputGraph(String filename)
Read the GML from from the stream.
|
void |
inputGraph(String filename,
int bufferSize)
Read the GML from from the stream.
|
void |
setEdgeIdKey(String edgeIdKey) |
void |
setEdgeLabelKey(String edgeLabelKey) |
void |
setVertexIdKey(String vertexIdKey) |
public static final String DEFAULT_LABEL
public GMLReader(Graph graph)
graph - the graph to load data intopublic void setVertexIdKey(String vertexIdKey)
vertexIdKey - gml property to use as id for verticiespublic void setEdgeIdKey(String edgeIdKey)
edgeIdKey - gml property to use as id for edgespublic void setEdgeLabelKey(String edgeLabelKey)
edgeLabelKey - gml property to assign edge Labels topublic void inputGraph(InputStream inputStream) throws IOException
inputStream - IOExceptionpublic void inputGraph(String filename) throws IOException
filename - IOExceptionpublic void inputGraph(InputStream inputStream, int bufferSize) throws IOException
inputStream - bufferSize - IOExceptionpublic void inputGraph(String filename, int bufferSize) throws IOException
filename - bufferSize - IOExceptionpublic static void inputGraph(Graph graph, String filename) throws IOException
graph - to receive the datafilename - GML fileIOException - thrown if the data is not validpublic static void inputGraph(Graph graph, InputStream inputStream) throws IOException
graph - to receive the datainputStream - GML fileIOException - thrown if the data is not validpublic static void inputGraph(Graph inputGraph, String filename, int bufferSize, String defaultEdgeLabel, String vertexIdKey, String edgeIdKey, String edgeLabelKey) throws IOException
inputGraph - to receive the datafilename - GML filedefaultEdgeLabel - default edge label to be used if not defined in the datavertexIdKey - if the id of a vertex is a <data/> property, fetch it from the data property.edgeIdKey - if the id of an edge is a <data/> property, fetch it from the data property.edgeLabelKey - if the label of an edge is a <data/> property, fetch it from the data property.IOException - thrown if the data is not validpublic static void inputGraph(Graph inputGraph, InputStream inputStream, int bufferSize, String defaultEdgeLabel, String vertexIdKey, String edgeIdKey, String edgeLabelKey) throws IOException
inputGraph - to receive the datainputStream - GML filedefaultEdgeLabel - default edge label to be used if not defined in the datavertexIdKey - if the id of a vertex is a <data/> property, fetch it from the data property.edgeIdKey - if the id of an edge is a <data/> property, fetch it from the data property.edgeLabelKey - if the label of an edge is a <data/> property, fetch it from the data property.IOException - thrown if the data is not validCopyright © 2010-2014. All Rights Reserved.