public class GraphToXGMMLSAXHandler extends Object implements GraphToXMLHandler
This class simply delegates handling of events to either the inner class GraphToXGMMLSAXHandler.GraphHandler or GraphToXGMMLSAXHandler.VisualGraphHandler, depending on which method between startSerialize() is called. Users should simply create an instance of this class and should not be concerned of the inner classes, and call the appropriate overloaded startSerialize() method.
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.xml.serialize.XMLSerializer |
serializer |
| Constructor and Description |
|---|
GraphToXGMMLSAXHandler(GraphToXMLEventGenerator eventGenerator,
org.apache.xml.serialize.XMLSerializer serializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
endSerialize()
Calls the delegate's serializerVertex() method
|
void |
endSerializeEdge(Edge edge)
Calls the delegate's endSerializerEdge() method
|
void |
endSerializeVertex(Vertex vertex)
Calls the delegate's endSerializerVertex() method
|
GraphToXMLEventGenerator |
getEventGenerator()
Returns the GraphToXMLEventGenerator that is generating the events.
|
void |
serializeEdge(Edge edge)
Calls the delegate's serializerEdge() method
|
void |
serializeVertex(Vertex vertex)
Calls the delegate's serializerVertex() method
|
void |
startSerialize(Graph graph)
Initializes the delegate to be the inner class GraphHandler,
and calls the startSerialize() method of the delegate.
|
void |
startSerialize(VisualGraph vGraph)
Initializes the delegate to be the inner class VisualGraphHandler,
and calls the startSerialize() method of the delegate.
|
public GraphToXGMMLSAXHandler(GraphToXMLEventGenerator eventGenerator, org.apache.xml.serialize.XMLSerializer serializer)
public void startSerialize(Graph graph) throws Exception
startSerialize in interface GraphToXMLHandlerExceptionpublic void startSerialize(VisualGraph vGraph) throws Exception
startSerialize in interface GraphToXMLHandlerExceptionpublic void serializeEdge(Edge edge) throws Exception
serializeEdge in interface GraphToXMLHandleredge - The Edge that needs to be serializedExceptionpublic void endSerializeEdge(Edge edge) throws Exception
endSerializeEdge in interface GraphToXMLHandlerExceptionpublic void serializeVertex(Vertex vertex) throws Exception
serializeVertex in interface GraphToXMLHandlervertex - The Vertex that needs to be serializedExceptionpublic void endSerializeVertex(Vertex vertex) throws Exception
endSerializeVertex in interface GraphToXMLHandlerExceptionpublic void endSerialize()
throws Exception
endSerialize in interface GraphToXMLHandlerExceptionpublic GraphToXMLEventGenerator getEventGenerator()
GraphToXMLHandlergetEventGenerator in interface GraphToXMLHandlerCopyright © 2019 JULIE Lab, Germany. All rights reserved.