graphtoxmlhandler.java

来自「OpenJGraph是一个开源的Java库」· Java 代码 · 共 56 行

JAVA
56
字号
package salvo.jesus.graph.xml;import salvo.jesus.graph.Vertex;import salvo.jesus.graph.Edge;import salvo.jesus.graph.Graph;import salvo.jesus.graph.visual.VisualGraph;/** * An interface to handle events generated by <tt>GraphToXMLEventGenerator</tt>. * Ideally, a <tt>GraphToXMLEventGenerator</tt> serializes all Vertices, before serializes * all Edges. * * @author Jesus M. Salvo Jr. */public interface GraphToXMLHandler {    /**     * Called only once before the serialization process begins.     */    public void startSerialize( Graph graph ) throws Exception;    /**     * Called only once before the serialization process begins.     */    public void startSerialize( VisualGraph vGraph ) throws Exception;    /**     * Called only once for each <tt>Vertex</tt> in the <tt>Graph</tt> being serialized.     *     * @param   vertex  The <tt>Vertex</tt> that needs to be serialized     */    public void serializeVertex( Vertex vertex ) throws Exception;    public void endSerializeVertex( Vertex vertex ) throws Exception;    /**     * Called only once for each <tt>Edge</tt> in the <tt>Graph</tt> being serialized.     *     * @param   edge  The <tt>Edge</tt> that needs to be serialized     */    public void serializeEdge( Edge edge ) throws Exception;    public void endSerializeEdge( Edge edge ) throws Exception;    /**     * Called only once after the serialization process begins.     */    public void endSerialize() throws Exception;    /**     * Returns the <tt>GraphToXMLEventGenerator</tt> that is generating the events.     */    public GraphToXMLEventGenerator getEventGenerator();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?