|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uci.ics.jung.io.GraphMLWriter<V,E>
public class GraphMLWriter<V,E>
Writes graphs out in GraphML format. Current known issues:
Field Summary | |
---|---|
protected boolean |
directed
|
protected Map<String,GraphMLMetadata<E>> |
edge_data
|
protected org.apache.commons.collections15.Transformer<E,String> |
edge_desc
|
protected org.apache.commons.collections15.Transformer<E,String> |
edge_ids
|
protected Map<String,GraphMLMetadata<Hypergraph<V,E>>> |
graph_data
|
protected org.apache.commons.collections15.Transformer<Hypergraph<V,E>,String> |
graph_desc
|
protected int |
nest_level
|
protected Map<String,GraphMLMetadata<V>> |
vertex_data
|
protected org.apache.commons.collections15.Transformer<V,String> |
vertex_desc
|
protected org.apache.commons.collections15.Transformer<V,String> |
vertex_ids
|
Constructor Summary | |
---|---|
GraphMLWriter()
|
Method Summary | |
---|---|
void |
addEdgeData(String id,
String description,
String default_value,
org.apache.commons.collections15.Transformer<E,String> edge_transformer)
Adds a new edge data specification. |
void |
addGraphData(String id,
String description,
String default_value,
org.apache.commons.collections15.Transformer<Hypergraph<V,E>,String> graph_transformer)
Adds a new graph data specification. |
void |
addVertexData(String id,
String description,
String default_value,
org.apache.commons.collections15.Transformer<V,String> vertex_transformer)
Adds a new vertex data specification. |
protected String |
format(String type,
String attr,
String value,
String contents)
|
void |
save(Hypergraph<V,E> graph,
Writer w)
|
void |
setEdgeData(Map<String,GraphMLMetadata<E>> edge_map)
Provides a map from data type name to edge data. |
void |
setEdgeDescriptions(org.apache.commons.collections15.Transformer<E,String> edge_desc)
Provides edge descriptions. |
void |
setEdgeIDs(org.apache.commons.collections15.Transformer<E,String> edge_ids)
Provides an ID that will be used to identify an edge in the output file. |
void |
setGraphData(Map<String,GraphMLMetadata<Hypergraph<V,E>>> graph_map)
Provides a map from data type name to graph data. |
void |
setGraphDescriptions(org.apache.commons.collections15.Transformer<Hypergraph<V,E>,String> graph_desc)
Provides graph descriptions. |
void |
setVertexData(Map<String,GraphMLMetadata<V>> vertex_map)
Provides a map from data type name to vertex data. |
void |
setVertexDescriptions(org.apache.commons.collections15.Transformer<V,String> vertex_desc)
Provides vertex descriptions. |
void |
setVertexIDs(org.apache.commons.collections15.Transformer<V,String> vertex_ids)
Provides an ID that will be used to identify a vertex in the output file. |
protected void |
writeEdgeData(Hypergraph<V,E> g,
Writer w)
|
protected void |
writeIndentedText(BufferedWriter w,
String to_write)
|
protected void |
writeKeySpecification(String key,
String type,
GraphMLMetadata<?> ds,
BufferedWriter bw)
|
protected void |
writeVertexData(Hypergraph<V,E> graph,
BufferedWriter w)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.commons.collections15.Transformer<V,String> vertex_ids
protected org.apache.commons.collections15.Transformer<E,String> edge_ids
protected Map<String,GraphMLMetadata<Hypergraph<V,E>>> graph_data
protected Map<String,GraphMLMetadata<V>> vertex_data
protected Map<String,GraphMLMetadata<E>> edge_data
protected org.apache.commons.collections15.Transformer<V,String> vertex_desc
protected org.apache.commons.collections15.Transformer<E,String> edge_desc
protected org.apache.commons.collections15.Transformer<Hypergraph<V,E>,String> graph_desc
protected boolean directed
protected int nest_level
Constructor Detail |
---|
public GraphMLWriter()
Method Detail |
---|
public void save(Hypergraph<V,E> graph, Writer w) throws IOException
graph
- w
-
IOException
protected void writeIndentedText(BufferedWriter w, String to_write) throws IOException
IOException
protected void writeVertexData(Hypergraph<V,E> graph, BufferedWriter w) throws IOException
IOException
protected void writeEdgeData(Hypergraph<V,E> g, Writer w) throws IOException
IOException
protected void writeKeySpecification(String key, String type, GraphMLMetadata<?> ds, BufferedWriter bw) throws IOException
IOException
protected String format(String type, String attr, String value, String contents)
public void setVertexIDs(org.apache.commons.collections15.Transformer<V,String> vertex_ids)
toString
(and thus not guaranteed to be unique).
vertex_ids
- public void setEdgeIDs(org.apache.commons.collections15.Transformer<E,String> edge_ids)
edge_ids
- public void setGraphData(Map<String,GraphMLMetadata<Hypergraph<V,E>>> graph_map)
public void setVertexData(Map<String,GraphMLMetadata<V>> vertex_map)
public void setEdgeData(Map<String,GraphMLMetadata<E>> edge_map)
public void addGraphData(String id, String description, String default_value, org.apache.commons.collections15.Transformer<Hypergraph<V,E>,String> graph_transformer)
public void addVertexData(String id, String description, String default_value, org.apache.commons.collections15.Transformer<V,String> vertex_transformer)
public void addEdgeData(String id, String description, String default_value, org.apache.commons.collections15.Transformer<E,String> edge_transformer)
public void setVertexDescriptions(org.apache.commons.collections15.Transformer<V,String> vertex_desc)
public void setEdgeDescriptions(org.apache.commons.collections15.Transformer<E,String> edge_desc)
public void setGraphDescriptions(org.apache.commons.collections15.Transformer<Hypergraph<V,E>,String> graph_desc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |