|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--quoggles.auxiliary.gmlxml.GMLXMLWriter
Provides a GML writer. This writer does not yet support all GML features yet.
Unknown attributes are written in XML style. See http://infosun.fmi.uni-passau.de/Graphlet/GML/ for more details
| Field Summary | |
private java.util.Map |
attMapping
A map of attributes, which should be written to the stream. |
private java.util.Map |
colMapping
A map of collection attributes, which should be written to the stream. |
private java.util.Collection |
dontWriteAttrs
A collection of attribute paths that should not be written explicitly. |
private java.lang.String |
eol
DOCUMENT ME! |
private static java.lang.String |
TAB
Prepresents a tabulator. |
| Constructor Summary | |
GMLXMLWriter()
Constructs a new GML writer. |
|
| Method Summary | |
private java.lang.String |
colToHex(org.graffiti.attributes.Attribute colorAtt)
Converts the given color attribute into a hex string. |
private java.lang.String |
createTabs(int level)
Creates and returns TAB + TAB + ... + TAB (level). |
java.lang.String[] |
getExtensions()
|
private java.lang.StringBuffer |
getWrittenAttributeHierarchy(org.graffiti.attributes.Attribute a,
int level)
This method does not actually write the hierarchy to the stream, but stores it into a StringBuffer. |
private void |
warning(java.lang.String msg)
Prints the given warning to system.out. |
void |
write(java.io.OutputStream o,
org.graffiti.graph.Graph g)
|
private void |
writeAttributable(java.io.PrintStream p,
org.graffiti.attributes.Attributable a,
int level)
Writes the attribute hierarchy of the specified attributable. |
private void |
writeEdges(java.io.PrintStream p,
org.graffiti.graph.Graph g,
java.util.ArrayList nodeIds)
Writes the edge of the given graph to the given print stream. |
private void |
writeGraph(java.io.PrintStream p,
org.graffiti.graph.Graph g)
Method writeGraph. |
private java.util.ArrayList |
writeNodes(java.io.PrintStream p,
org.graffiti.graph.Graph g)
Writes the nodes of the given graph to the given print stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String TAB
private final java.lang.String eol
private java.util.Collection dontWriteAttrs
private java.util.Map attMapping
private java.util.Map colMapping
| Constructor Detail |
public GMLXMLWriter()
| Method Detail |
public java.lang.String[] getExtensions()
getExtensions in interface org.graffiti.plugin.io.SerializerSerializer.getExtensions()
public void write(java.io.OutputStream o,
org.graffiti.graph.Graph g)
throws java.io.IOException
write in interface org.graffiti.plugin.io.OutputSerializerjava.io.IOExceptionOutputSerializer.write(OutputStream, Graph)
private java.lang.StringBuffer getWrittenAttributeHierarchy(org.graffiti.attributes.Attribute a,
int level)
a - the collection attribute to get the attribute from.level - the indentation level.
private java.lang.String colToHex(org.graffiti.attributes.Attribute colorAtt)
#000000, if the given color attribute could not be
converted.
colorAtt - DOCUMENT ME!
private java.lang.String createTabs(int level)
level - the indentation level.
private void warning(java.lang.String msg)
msg - the warning msg.
private void writeAttributable(java.io.PrintStream p,
org.graffiti.attributes.Attributable a,
int level)
p - the print stream to write to.a - the attributable to read the attributes from.level - the indentation level.
private void writeEdges(java.io.PrintStream p,
org.graffiti.graph.Graph g,
java.util.ArrayList nodeIds)
p - the stream to write to.g - the graph to get the data from.nodeIds - the ordered list of node ids.
private void writeGraph(java.io.PrintStream p,
org.graffiti.graph.Graph g)
p - g -
private java.util.ArrayList writeNodes(java.io.PrintStream p,
org.graffiti.graph.Graph g)
p - the stream to write to.g - the graph to get the data from.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||