Search this API

y.io.graphml.output
Interface WriteEventListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
WriteEventListenerAdapter

public interface WriteEventListener
extends java.util.EventListener

Event listener for the WriteEvent.

This interface defines the available event callbacks for WriteEvents. Implement this class if you want to be notified of specific steps in the write process (e.g. when a node element is about to be written, or when writing the document has just been finished.

Implementations of this interface are usually registered on instances of WriteEventHandler which are provided by GraphMLWriteContext or GraphMLWriter.

See Also:
WriteEvent, GraphMLWriter, WriteEventHandler
 

Method Summary
 void onDataWriting(WriteEvent event)
          Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'data' element has been called.
 void onDataWritten(WriteEvent event)
          Occurs just before the XmlWriter.writeEndElement() for the GraphML 'data' element will be called.
 void onDocumentWriting(WriteEvent event)
          Occurs just after the XmlWriter.writeStartDocument() has been called.
 void onDocumentWritten(WriteEvent event)
          Occurs just before the XmlWriter.writeEndDocument() will be called.
 void onEdgeWriting(WriteEvent event)
          Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'edge' element has been called.
 void onEdgeWritten(WriteEvent event)
          Occurs just before the XmlWriter.writeEndElement() for the GraphML 'edge' element will be called.
 void onGraphMLWriting(WriteEvent event)
          Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'graphml' element has been called.
 void onGraphMLWritten(WriteEvent event)
          Occurs just before the XmlWriter.writeEndElement() for the GraphML 'graphml' element will be called.
 void onGraphWriting(WriteEvent event)
          Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'graph' element has been called.
 void onGraphWritten(WriteEvent event)
          Occurs just before the XmlWriter.writeEndElement() for the GraphML 'graph' element will be called.
 void onKeyWriting(WriteEvent event)
          Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'key' element has been called.
 void onKeyWritten(WriteEvent event)
          Occurs just before the XmlWriter.writeEndElement() for the GraphML 'key' element will be called.
 void onNodeWriting(WriteEvent event)
          Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphML 'node' element has been called.
 void onNodeWritten(WriteEvent event)
          Occurs just before the XmlWriter.writeEndElement() for the GraphML 'node' element will be called.
 void onPortWriting(WriteEvent event)
          Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'port' element has been called.
 void onPortWritten(WriteEvent event)
          Occurs just before the XmlWriter.writeEndElement() for the GraphML 'port' element will be called.
 

Method Detail

onDocumentWriting

void onDocumentWriting(WriteEvent event)
                       throws GraphMLWriteException
Occurs just after the XmlWriter.writeStartDocument() has been called.

Throws:
GraphMLWriteException

onDocumentWritten

void onDocumentWritten(WriteEvent event)
                       throws GraphMLWriteException
Occurs just before the XmlWriter.writeEndDocument() will be called.

Throws:
GraphMLWriteException

onNodeWriting

void onNodeWriting(WriteEvent event)
                   throws GraphMLWriteException
Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphML 'node' element has been called.

At that state, callees can use XmlWriter's writeAttribute methods to add custom attributes to the XML element or write a first custom inner element

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException
See Also:
XmlWriter.writeAttribute(GraphMLXmlAttribute), XmlWriter.writeAttribute(String, boolean), XmlWriter.writeAttribute(String, double), XmlWriter.writeAttribute(String, long), XmlWriter.writeAttribute(String, String), XmlWriter.writeAttribute(String, String, String, String)

onNodeWritten

void onNodeWritten(WriteEvent event)
                   throws GraphMLWriteException
Occurs just before the XmlWriter.writeEndElement() for the GraphML 'node' element will be called.

This can be used to append more custom elements to the node element.

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException

onEdgeWriting

void onEdgeWriting(WriteEvent event)
                   throws GraphMLWriteException
Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'edge' element has been called.

At that state, callees can use one of XmlWriter's writeAttribute methods to add custom attributes to the XML element or write a first custom inner element

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException
See Also:
XmlWriter.writeAttribute(GraphMLXmlAttribute), XmlWriter.writeAttribute(String, boolean), XmlWriter.writeAttribute(String, double), XmlWriter.writeAttribute(String, long), XmlWriter.writeAttribute(String, String), XmlWriter.writeAttribute(String, String, String, String)

onEdgeWritten

void onEdgeWritten(WriteEvent event)
                   throws GraphMLWriteException
Occurs just before the XmlWriter.writeEndElement() for the GraphML 'edge' element will be called.

This can be used to append more custom elements to the edge element.

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException

onPortWriting

void onPortWriting(WriteEvent event)
                   throws GraphMLWriteException
Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'port' element has been called.

At that state, callees can use one of XmlWriter's writeAttribute methods to add custom attributes to the XML element or write a first custom inner element

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException
See Also:
XmlWriter.writeAttribute(GraphMLXmlAttribute), XmlWriter.writeAttribute(String, boolean), XmlWriter.writeAttribute(String, double), XmlWriter.writeAttribute(String, long), XmlWriter.writeAttribute(String, String), XmlWriter.writeAttribute(String, String, String, String)

onPortWritten

void onPortWritten(WriteEvent event)
                   throws GraphMLWriteException
Occurs just before the XmlWriter.writeEndElement() for the GraphML 'port' element will be called.

This can be used to append more custom elements to the port element.

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException

onGraphWriting

void onGraphWriting(WriteEvent event)
                    throws GraphMLWriteException
Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'graph' element has been called.

At that state, callees can use one of XmlWriter's writeAttribute methods to add custom attributes to the XML element or write a first custom inner element

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException
See Also:
XmlWriter.writeAttribute(GraphMLXmlAttribute), XmlWriter.writeAttribute(String, boolean), XmlWriter.writeAttribute(String, double), XmlWriter.writeAttribute(String, long), XmlWriter.writeAttribute(String, String), XmlWriter.writeAttribute(String, String, String, String)

onGraphWritten

void onGraphWritten(WriteEvent event)
                    throws GraphMLWriteException
Occurs just before the XmlWriter.writeEndElement() for the GraphML 'graph' element will be called.

This can be used to append more custom elements to the graph element.

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException

onGraphMLWriting

void onGraphMLWriting(WriteEvent event)
                      throws GraphMLWriteException
Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'graphml' element has been called.

At that state, callees can use one of XmlWriter's writeAttribute methods to add custom attributes to the XML element or write a first custom inner element

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException
See Also:
XmlWriter.writeAttribute(GraphMLXmlAttribute), XmlWriter.writeAttribute(String, boolean), XmlWriter.writeAttribute(String, double), XmlWriter.writeAttribute(String, long), XmlWriter.writeAttribute(String, String), XmlWriter.writeAttribute(String, String, String, String)

onGraphMLWritten

void onGraphMLWritten(WriteEvent event)
                      throws GraphMLWriteException
Occurs just before the XmlWriter.writeEndElement() for the GraphML 'graphml' element will be called.

This can be used to append more custom elements to the graphml element.

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException

onDataWriting

void onDataWriting(WriteEvent event)
                   throws GraphMLWriteException
Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'data' element has been called.

At that state, callees can use one of XmlWriter's writeAttribute methods to add custom attributes to the XML element or write a first custom inner element

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException
See Also:
XmlWriter.writeAttribute(GraphMLXmlAttribute), XmlWriter.writeAttribute(String, boolean), XmlWriter.writeAttribute(String, double), XmlWriter.writeAttribute(String, long), XmlWriter.writeAttribute(String, String), XmlWriter.writeAttribute(String, String, String, String)

onDataWritten

void onDataWritten(WriteEvent event)
                   throws GraphMLWriteException
Occurs just before the XmlWriter.writeEndElement() for the GraphML 'data' element will be called.

This can be used to append more custom elements to the data element.

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException

onKeyWriting

void onKeyWriting(WriteEvent event)
                  throws GraphMLWriteException
Occurs right after the XmlWriter.writeStartElement(String,String,String) method for writing a GraphMl 'key' element has been called.

At that state, callees can use one of XmlWriter's writeAttribute methods to add custom attributes to the XML element or write a first custom inner element

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException
See Also:
XmlWriter.writeAttribute(GraphMLXmlAttribute), XmlWriter.writeAttribute(String, boolean), XmlWriter.writeAttribute(String, double), XmlWriter.writeAttribute(String, long), XmlWriter.writeAttribute(String, String), XmlWriter.writeAttribute(String, String, String, String)

onKeyWritten

void onKeyWritten(WriteEvent event)
                  throws GraphMLWriteException
Occurs just before the XmlWriter.writeEndElement() for the GraphML 'key' element will be called.

This can be used to append more custom elements to the key element.

Parameters:
event - The event containing all necessary data
Throws:
GraphMLWriteException

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.