Search this API

y.io.graphml.graph2d
Interface NodeLabelDeserializer.ConfigurationFactory

Enclosing class:
NodeLabelDeserializer

public static interface NodeLabelDeserializer.ConfigurationFactory

Interface for dynamic creation and registration of configurations for NodeLabel.

If an instance of this interface is present in Lookup.lookup(Class), createConfiguration(y.view.NodeLabel,org.w3c.dom.Node,y.io.graphml.input.GraphMLParseContext) will be called if a configuration does not exist in the node label configuration factory.

A default implementation that registers a default configuration under the given name is provided by Graph2DGraphMLHandler.configureLookup(y.base.Graph,y.io.graphml.input.GraphMLParser).

 

Method Summary
 void createConfiguration(NodeLabel label, org.w3c.dom.Node node, GraphMLParseContext context)
          Fallback method that is called by NodeLabelDeserializer.parseNodeLabel(y.io.graphml.input.GraphMLParseContext, org.w3c.dom.Node, y.view.NodeLabel) if the specified configuration is not registered.
 

Method Detail

createConfiguration

void createConfiguration(NodeLabel label,
                         org.w3c.dom.Node node,
                         GraphMLParseContext context)
Fallback method that is called by NodeLabelDeserializer.parseNodeLabel(y.io.graphml.input.GraphMLParseContext, org.w3c.dom.Node, y.view.NodeLabel) if the specified configuration is not registered.

Implementations should provide some fallback behaviour, and set a configuration for the specified node label if applicable.

A default implementation that registers a default configuration under the given name is provided by Graph2DGraphMLHandler.configureLookup(y.base.Graph,y.io.graphml.input.GraphMLParser).

Parameters:
label - The node label to configure.
node - The top level DOM node that holds the node label data.
context - The current parse context.

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