Search this API

y.io.graphml.output
Interface OutputHandler

All Known Implementing Classes:
AbstractDataProviderOutputHandler, AbstractOutputHandler, AbstractWriteNodePortHandler, ComplexDataProviderOutputHandler, EdgeLayoutOutputHandler, GraphMLHandler.BooleanDataProviderOutputHandler, GraphMLHandler.DoubleDataProviderOutputHandler, GraphMLHandler.FloatDataProviderOutputHandler, GraphMLHandler.IntDataProviderOutputHandler, GraphMLHandler.LongDataProviderOutputHandler, GraphMLHandler.StringDataProviderOutputHandler, NodeLayoutOutputHandler, NodePortGeometryWriter, NodePortGraphicsWriter, NodePortUserDataWriter, PortConstraintOutputHandler, PostprocessorOutputHandler, WriteEdgeRealizerHandler, WriteNodeRealizerHandler

public interface OutputHandler

The interface used by the GraphMLHandler for writing data attributes to the GraphML.

 

Method Summary
 java.util.Collection getDataTagAttributes()
          Gets the XML attributes that should be added to the data element.
 java.util.Collection getKeyDefinitionAttributes()
          Gets the XML attributes that should be added to the key definition in the GraphML key element.
 WritePrecedence getPrecedence()
          Gets the write precedence that is associated with this instance.
 boolean isDefaultValue(GraphMLWriteContext ctx)
          Determines whether in the current context, the value is the default value and therefore no data element needs to be written.
 void writeKeyDefinitionContent(GraphMLWriteContext ctx)
          Writes the contents of the key definition.
 void writeValue(GraphMLWriteContext ctx)
          Actually writes the value for the current context.
 

Method Detail

getPrecedence

WritePrecedence getPrecedence()
Gets the write precedence that is associated with this instance.

Registered output handlers are written either before or after the (optional) child content of the governing GraphML element.

Returns:
The write precedence for this instance.
See Also:
WritePrecedence

getKeyDefinitionAttributes

java.util.Collection getKeyDefinitionAttributes()
Gets the XML attributes that should be added to the key definition in the GraphML key element. The return value should contain instances of GraphMLXmlAttribute that represent the attribute data.

Returns:
The key definition attributes.

getDataTagAttributes

java.util.Collection getDataTagAttributes()
Gets the XML attributes that should be added to the data element. The return value should contain instances of GraphMLXmlAttribute that represent the attribute data.

Returns:
The attributes for the data element.

isDefaultValue

boolean isDefaultValue(GraphMLWriteContext ctx)
                       throws GraphMLWriteException
Determines whether in the current context, the value is the default value and therefore no data element needs to be written.

Parameters:
ctx - The context.
Returns:
true if for the current context the default value applies and therefore no data element needs to be written; false otherwise.
Throws:
GraphMLWriteException

writeValue

void writeValue(GraphMLWriteContext ctx)
                throws GraphMLWriteException
Actually writes the value for the current context.

At the time this method is called, the surrounding 'data' element has already been written.

Parameters:
ctx - The context.
Throws:
GraphMLWriteException

writeKeyDefinitionContent

void writeKeyDefinitionContent(GraphMLWriteContext ctx)
                               throws GraphMLWriteException
Writes the contents of the key definition.

At the time this method is called, the surrounding 'key' element has already been written. However no 'default' element is written by the framework.

Parameters:
ctx - The context.
Throws:
GraphMLWriteException

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