Search this API

y.io.graphml.layout
Class EdgeLayoutInputHandler

java.lang.Object
  extended by y.io.graphml.input.AbstractInputHandler
      extended by y.io.graphml.layout.EdgeLayoutInputHandler
All Implemented Interfaces:
InputHandler

public class EdgeLayoutInputHandler
extends AbstractInputHandler

Input handler for edge layout information in GraphML.

 

Constructor Summary
EdgeLayoutInputHandler()
          Initializes a new EdgeLayoutInputHandler instance.
 
Method Summary
 boolean acceptKey(org.w3c.dom.Element keyDefinition)
          Accepts keys with attribute yfiles.type="edgegraphics".
 void applyDefault(GraphMLParseContext context)
          Does nothing.
protected  java.lang.Object parseDataCore(GraphMLParseContext context, org.w3c.dom.Node node)
          Calls context.deserialize(context, n, EdgeLayout.class) for the first child element n of the given XML node.
protected  void setValue(GraphMLParseContext context, java.lang.Object key, java.lang.Object data)
          Does nothing.
 
Methods inherited from class y.io.graphml.input.AbstractInputHandler
getDefaultValue, getPrecedence, getValidScopes, initializeFromKeyDefinition, isDefaultExists, isParseDefaultValue, parseData, setDefaultExists, setDefaultValue, setParseDefaultValue, setPrecedence, setValidScopes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeLayoutInputHandler

public EdgeLayoutInputHandler()
Initializes a new EdgeLayoutInputHandler instance.

Method Detail

acceptKey

public boolean acceptKey(org.w3c.dom.Element keyDefinition)
Accepts keys with attribute yfiles.type="edgegraphics".

Parameters:
keyDefinition - the XML data key element to check.
Returns:
true if the specified element has a yfiles.type="edgegraphics" attribute; false otherwise.

parseDataCore

protected java.lang.Object parseDataCore(GraphMLParseContext context,
                                         org.w3c.dom.Node node)
                                  throws GraphMLParseException
Calls context.deserialize(context, n, EdgeLayout.class) for the first child element n of the given XML node.

Specified by:
parseDataCore in class AbstractInputHandler
Parameters:
context - the current parse context.
node - the XML node that contains the data. This is either the GraphML data element or the default element.
Returns:
the deserialized EdgeLayout instance or null if the given XML node has no child elements.
Throws:
GraphMLParseException - if a problem occurs during deserialization.

setValue

protected void setValue(GraphMLParseContext context,
                        java.lang.Object key,
                        java.lang.Object data)
Does nothing. The actual layout information is read in a DeserializationHandler dedicated to EdgeLayout instances.

Specified by:
setValue in class AbstractInputHandler
Parameters:
context - The context.
key - The key.
data - The data.

applyDefault

public void applyDefault(GraphMLParseContext context)
Does nothing.

Specified by:
applyDefault in interface InputHandler
Overrides:
applyDefault in class AbstractInputHandler
Parameters:
context - the current parse context.

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