bcds.phison.io
Interface GraphFormatter<V,E>

All Known Implementing Classes:
GraphFormatterBare, PropertyBasedFormatter

public interface GraphFormatter<V,E>

A GraphFormatter is an auxiliary object that assists when exporting a graph to another format. One (and the primary) use of this interface is in the generation of "fancy" DOT files. For example, nodes can have different colors depending on some attribute or contition. In such a case, it possible to write a formatter that adds the required extra attributes using the DOT language. Thus, this interface tries to isolate the exporter (see DotExporter) from the details of deciding which DOT attributes to emit.

Note that the return value of each method below is context-dependent, so the comments are only general.

Author:
Juan Segovia S.

Method Summary
 java.lang.String getEdgeDesc(E a)
          Returns basic information on edge e.
 java.lang.String getEdgeExtraAttr(E a)
          Returns any extra attribute of edge v.
 java.lang.String getVertexDesc(V v)
          Returns further information on node v, for example, a long name or "label".
 java.lang.String getVertexExtraAttr(V v)
          Returns any extra attribute of node v.
 java.lang.String getVertexId(V v)
          Returns the "id" of node v.
 

Method Detail

getVertexId

java.lang.String getVertexId(V v)
Returns the "id" of node v.


getVertexDesc

java.lang.String getVertexDesc(V v)
Returns further information on node v, for example, a long name or "label".


getVertexExtraAttr

java.lang.String getVertexExtraAttr(V v)
Returns any extra attribute of node v.


getEdgeDesc

java.lang.String getEdgeDesc(E a)
Returns basic information on edge e.


getEdgeExtraAttr

java.lang.String getEdgeExtraAttr(E a)
Returns any extra attribute of edge v.