|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.XGMMLWriter
public class XGMMLWriter
Writes nodes and edges of any network to XGMML format. Supports arbitrary annotations for both edges and nodes.
NetworkWriter
,
XGMMLGenerator
Constructor Summary | |
---|---|
XGMMLWriter(OutputStream outstream)
Creates a new XGMML writer to a given OutputStream |
|
XGMMLWriter(String outfile)
Create a new XGMML writer to a specified output file |
Method Summary | |
---|---|
void |
close()
Closes the writer and the underlying stream |
void |
footer()
Prints the XGMML footer |
void |
writeEdge(String label,
String source,
String target,
Map<String,? extends Object> annotations)
Writes an edge to the XGMML data. |
void |
writeEdge(String label,
String source,
String target,
Map<String,? extends Object> annotations,
boolean directed)
Writes an edge to the XGMML data. |
void |
writeNode(String ID,
String label,
Map<String,? extends Object> annotations)
Write a network node in XGMML format. |
void |
writeNode(String id,
String label,
Map<String,? extends Object> annotations,
boolean transition)
Write a network node in XGMML format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XGMMLWriter(String outfile) throws FileNotFoundException
outfile
- path to the output file
FileNotFoundException
- if the file could not be openedpublic XGMMLWriter(OutputStream outstream)
OutputStream
outstream
- the output streamMethod Detail |
---|
public void footer()
public void close()
public void writeNode(String ID, String label, Map<String,? extends Object> annotations)
ID
- internal identifier for that node, not written to the XGMML
data but used for uniquely identifying that node when creating
edges with this XGMML writerlabel
- label of that node, stored as canonicalName
attribute in the XGMML dataannotations
- list of key/values pairs which are annotated with
that node, the string representation of each value
will be usedpublic void writeNode(String id, String label, Map<String,? extends Object> annotations, boolean transition)
id
- internal identifier for that node, not written to the XGMML
data but used for uniquely identifying that node when creating
edges with this XGMML writerlabel
- label of that node, stored as canonicalName
attribute in the XGMML dataannotations
- list of key/values pairs which are annotated with
that node, the string representation of each value
will be usedtransition
- special argument used for petri net creation, normal
nodes will be displayed as circles, but if
transition
the node will be displayed as a
rectanglepublic void writeEdge(String label, String source, String target, Map<String,? extends Object> annotations)
writeNode(java.lang.String, java.lang.String, java.util.Map)
calls.
label
- label of that edge, will be stored as a label
attributesource
- internal identifier of the source nodetarget
- internal identifier of the target nodeannotations
- list of key/values pairs which are annotated with
that node, the string representation of each value
will be usedpublic void writeEdge(String label, String source, String target, Map<String,? extends Object> annotations, boolean directed)
writeNode(java.lang.String, java.lang.String, java.util.Map)
calls.
label
- label of that edge, will be stored as a label
attributesource
- internal identifier of the source nodetarget
- internal identifier of the target nodeannotations
- list of key/values pairs which are annotated with
that node, the string representation of each value
will be useddirected
- if true
there will be an arrow towards the
target node in the graph
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |