Search this API

y.io.graphml.layout
Class EdgeLayoutOutputHandler

java.lang.Object
  extended by y.io.graphml.output.AbstractOutputHandler
      extended by y.io.graphml.layout.EdgeLayoutOutputHandler
All Implemented Interfaces:
java.util.EventListener, OutputHandler, OutputHandlerProvider

public class EdgeLayoutOutputHandler
extends AbstractOutputHandler

Output handler for edge layout information in GraphML.

 

Constructor Summary
EdgeLayoutOutputHandler()
           
 
Method Summary
 java.util.Collection getKeyDefinitionAttributes()
          Adds the key definition for edge layout information.
protected  java.lang.Object getValue(GraphMLWriteContext context, java.lang.Object key)
          Retrieves the EdgeLayout instances associated to the specified key edge.
protected  void writeValueCore(GraphMLWriteContext context, java.lang.Object data)
          Calls context.serialize(data) for EdgeLayout data.
 
Methods inherited from class y.io.graphml.output.AbstractOutputHandler
addNameToKeyDefinition, addScopeToKeyDefinition, addTypeToKeyDefinition, addUriToKeyDefinition, getDataTagAttributes, getDefaultValue, getPrecedence, getScope, getValidScopes, hasDefaultValueAssigned, isDefaultValue, isValidScope, isWriteKeyDefault, onQueryOutputHandler, setDefaultValue, setDefaultValueAssigned, setPrecedence, setScope, setValidScopes, setWriteKeyDefault, writeKeyDefinitionContent, writeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeLayoutOutputHandler

public EdgeLayoutOutputHandler()
Method Detail

getKeyDefinitionAttributes

public java.util.Collection getKeyDefinitionAttributes()
Adds the key definition for edge layout information. For compatibility with Graph2DGraphMLHandler generated GraphML, yfiles.type="edgegraphics" is used.

Specified by:
getKeyDefinitionAttributes in interface OutputHandler
Overrides:
getKeyDefinitionAttributes in class AbstractOutputHandler
Returns:
the key definition attributes for edge layout information.
See Also:
AbstractOutputHandler.addNameToKeyDefinition(String), AbstractOutputHandler.addScopeToKeyDefinition(y.io.graphml.KeyScope), AbstractOutputHandler.addTypeToKeyDefinition(y.io.graphml.KeyType), AbstractOutputHandler.addUriToKeyDefinition(String)

writeValueCore

protected void writeValueCore(GraphMLWriteContext context,
                              java.lang.Object data)
                       throws GraphMLWriteException
Calls context.serialize(data) for EdgeLayout data.

Specified by:
writeValueCore in class AbstractOutputHandler
Parameters:
context - The current serialization context.
data - The EdgeLayout instance to serialize.
Throws:
GraphMLWriteException - if a problem occurs during serialization.

getValue

protected java.lang.Object getValue(GraphMLWriteContext context,
                                    java.lang.Object key)
Retrieves the EdgeLayout instances associated to the specified key edge.

Specified by:
getValue in class AbstractOutputHandler
Parameters:
context - The current serialization context.
key - The Edge instance that is serialized.
Returns:
the EdgeLayout instances associated to the specified key edge.

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