Search this API

y.io.graphml.graph2d
Class ReadNodeRealizerHandler

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

public class ReadNodeRealizerHandler
extends AbstractInputHandler

Input handler for NodeRealizer data attributes in GraphML.

 

Constructor Summary
ReadNodeRealizerHandler()
           
 
Method Summary
 boolean acceptKey(org.w3c.dom.Element keyDefinition)
           
 void applyDefault(GraphMLParseContext context)
          This method is invoked when no data tag is defined, and the default value should be applied.
protected  java.lang.Object parseDataCore(GraphMLParseContext context, org.w3c.dom.Node node)
          Abstract method callback that actually parses the data.
protected  void setValue(GraphMLParseContext context, java.lang.Object key, java.lang.Object data)
          Abstract method callback that actually stores the value with the keys.
 
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

ReadNodeRealizerHandler

public ReadNodeRealizerHandler()
Method Detail

acceptKey

public boolean acceptKey(org.w3c.dom.Element keyDefinition)

parseDataCore

protected java.lang.Object parseDataCore(GraphMLParseContext context,
                                         org.w3c.dom.Node node)
                                  throws GraphMLParseException
Description copied from class: AbstractInputHandler
Abstract method callback that actually parses the data.

Specified by:
parseDataCore in class AbstractInputHandler
Parameters:
context - The context.
node - The node that contains the data. This is either the GraphML data element or the default element.
Returns:
The parsed data.
Throws:
GraphMLParseException

setValue

protected void setValue(GraphMLParseContext context,
                        java.lang.Object key,
                        java.lang.Object data)
Description copied from class: AbstractInputHandler
Abstract method callback that actually stores the value with the keys.

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

applyDefault

public void applyDefault(GraphMLParseContext context)
Description copied from class: AbstractInputHandler
This method is invoked when no data tag is defined, and the default value should be applied.

This implementation delegates to AbstractInputHandler.setValue(GraphMLParseContext, Object, Object). if AbstractInputHandler.isDefaultExists()

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.